Skip to content

[Bug] 系统通知无法送达 #524

Description

@achievejia

What happened? / 问题描述

应用无法发送 macOS 系统通知。任务完成时既不弹通知横幅,系统设置 → 通知 列表中
也找不到 PI-Desktop。日志显示 macOS 直接拒绝了应用的通知请求。

Steps to reproduce / 复现步骤

  1. 启动 PI-Desktop 0.14.8(macOS)
  2. 让 PI-Desktop 窗口失焦(切到其他应用,以满足原生通知的触发条件)
  3. 在任意会话中发起一轮对话并等待其完成
  4. 观察:没有出现通知横幅

对比:系统设置 → 通知 中根本不存在 PI-Desktop 这一项。

Expected behavior / 预期行为

窗口失焦时,任务完成应弹出 macOS 通知横幅;应用应出现在
系统设置 → 通知 列表中。

Actual behavior / 实际行为

通知请求被 usernotificationsd 拒绝(hasError: 1),无任何通知送达,
应用也从未完成通知注册,因此不出现在系统设置里。

App version / 应用版本

0.14.8

Operating system / 操作系统

macOS

Extra environment / 其他环境信息

No response

Logs / 日志

$ log show --predicate 'eventMessage CONTAINS "com.pi-desktop.app"' --last 1h --style compact


2026-09-17 16:35:14.215 Df PI-Desktop[22524:45f566] [com.apple.UserNotifications:Connections] [com.pi-desktop.app] Adding notification request 7AFD-F4FF to destinations: Default, contentDate: (null)
2026-09-17 16:35:14.215 E  usernotificationsd[958:464300] [com.apple.usernotificationsd:Connections] [Electron] Entitlement 'com.apple.private.usernotifications.bundle-identifiers' required to request user notifications
2026-09-17 16:35:14.215 E  usernotificationsd[958:464300] [com.apple.usernotificationsd:Connections] [Electron] addRequest not allowed: com.pi-desktop.app
2026-09-17 16:35:14.215 Df PI-Desktop[22524:46a56b] [com.apple.UserNotifications:Connections] [com.pi-desktop.app] Added notification request: [ hasError: 1 hasCompletionHandler: 1 ]

Screenshots / 截图

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions