Skip to content

OpenCLIApp 0.1.26 GUI 不显示窗口(macOS 26.5,Tauri WebContent 被 sandbox 拒访) #1990

Description

@stevenpeng289

环境

  • macOS 26.5 (25F71), Apple Silicon
  • OpenCLIApp 0.1.26 (com.opencli.browserbridge, .pkg 安装, Developer ID 签名有效, arm64 native)
  • 后端: Tauri (tao + wry + WebKit) — 通过 sample 堆栈确认

症状

点击 app 图标 / open -a OpenCLIApp无窗口出现,dock 跳一下后消失。无 .ips crash 报告。几秒后 main 进程被系统自动终止(log 中 _kLSApplicationWouldBeTerminatedByTALKey=1)。GUI 配置面板完全不可用。

关键证据

1. main 进程没崩,进了事件循环但没建窗口sample 全部 867/867 样本):

main → opencli_app::main → opencli_app_lib::run
  → tauri::app::App::run
  → tao::platform_impl::platform::event_loop::EventLoop::run
  → -[NSApplication run]
  → -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
  → _DPSNextEvent
  → _BlockUntilNextEventMatchingListInMode

整个 sample 期间没有任何 NSWindow 创建调用

2. WebContent 子进程能启动,但 markLayersVolatile 指数级重试后失败:

[WebKit:ProcessSuspension] WebContent[19760]: [webPageID=33] WebPage::markLayersVolatile:
  Failed to mark all layers as volatile, will retry in 320 ms
... 640 ms ... 1280 ms ...
[WebKit:ProcessSuspension] WebContent[19760] WebProcess::markAllLayersVolatile:
  Failed to mark layers as volatile for webPageID=33

3. WebContent 子进程被 sandbox 拒访 WindowServer / TCC / launchservicesd:

[CFPasteboard] WebContent[4500] Connection init failed at lookup with error 159 - Sandbox restriction
[TCC:access] WebContent[4500] TCCAccessRequest_block_invoke: Connection invalid
[SkyLight] WebContent[4500] Conn 0x0 is not a valid connection ID
[launchservices:cas] WebContent[4500] CONNECT: Attempt to connect to launchservicesd
  prohibited because kLSServerConnectionStatusProcessIsDaemonMask is set
[CarbonCore:sharedcache] WebContent[4500] checkinWithServer Failed bootstrap_lookup2
  for name of coreservicesd, kern_return_t=#1100/0x44c Permission denied

4. codesign -dv --entitlements - 输出无显式 entitlements 段(仅 Internal requirements count=1 size=188)。

5. daemon + Chrome 扩展完全正常,不受影响:

$ curl -s -H "X-OpenCLI: 1" http://127.0.0.1:19825/status
{"ok":true,"pid":22739,"uptime":330858,...,
 "daemonVersion":"1.8.0","extensionConnected":true,"extensionVersion":"1.0.20"}

~/Library/Application Support/BrowserBridge/state.jsonserver.status: "running"

根因猜测

BrowserBridge 0.1.26 用的 wry 版本在 macOS 26 下与新 sandbox / WindowServer 策略不兼容。WebContent 子进程被拒访关键系统服务(WindowServer / TCC / launchservicesd / pboard),导致 markLayersVolatile 失败 → 渲染层无法初始化 → Tauri 主流程虽进 NSApp 事件循环但未触发 NSWindow 创建。

影响

  • GUI 配置面板(keep-awake、auth-refresh、skills 一键安装、Chrome 检测)不可用
  • 核心功能(daemon + Chrome 扩展)完全不受影响,CLI 路径照常工作

临时绕过

  • 卸载 GUI 释放资源: sudo /Applications/OpenCLIApp.app/Contents/Resources/uninstall.sh --remove-skills
  • 继续用 npm CLI: opencli doctor, opencli list, npx skills add jackwener/opencli
  • 等待更新 wry / 增加 entitlements

复现步骤

  1. macOS 26.5 (M 系列) 干净安装 BrowserBridge 0.1.26
  2. open -a /Applications/OpenCLIApp.app
  3. 观察: dock 图标跳一下后消失,无窗口出现
  4. log show --last 1m --predicate 'process == "opencli-app"' --style compact 看到上述错误模式

已收集的诊断数据

完整 sample 输出 + 启动期 log stream 已保存,可按需提供。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions