Enabling Rozenite causes Chromium 'Failed parsing key usage' cert errors to leak into terminal (macOS)
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- electron, react-native, typescript
调研方向
Start in LaunchUtils.js, focusing on the debugger-shell stdout/stderr forwarding used by openDebuggerMiddleware. Reproduce the full react-native start to DevTools-launch flow with Rozenite enabled and disabled, then determine how the known Chromium startup noise can be prevented from appearing in the Metro terminal without hiding actionable errors. Done means the certificate-parsing lines no longer leak during the affected flow.
由索引模型根据 Issue 内容生成。
描述
Summary
Enabling Rozenite (withRozenite(..., { enabled: true }) via WITH_ROZENITE=true) causes noisy Chromium certificate-parsing errors to appear in the Metro terminal output on macOS, every single time React Native DevTools is launched:
[debugger-shell stderr] [PID:MMDD/HHMMSS.ffffff:ERROR:net/cert/internal/trust_store_mac.cc:807] Error parsing certificate:
ERROR: Failed parsing key usage
This does not occur when Rozenite is disabled (confirmed by toggling WITH_ROZENITE on/off in the same project — reverting Rozenite makes the noise disappear, and it is 100% reliably present when Rozenite is enabled).
Root cause (as far as I could trace it)
- Rozenite's Metro middleware serves its own DevTools frontend at
/rozenite/rn_fusebox.html(confirmed viaGET /json/list—devtoolsFrontendUrlpoints to this path instead of the default RN DevTools frontend). - This appears to force
@react-native/dev-middleware'sopenDebuggerMiddlewareto launch the standalone Fusebox Electron shell (@react-native/debugger-shell, a bundled Electron/Chromium app resolved viadotslash) rather than opening the debug target in the user's regular installed browser (Chrome/Edge) vialaunchDebuggerAppWindow. - The standalone Electron shell spins up its own fresh Chromium
NetworkServiceutility process with its own user-data-dir (~/Library/Application Support/React Native DevTools), which enumerates every certificate in the macOS Keychain (Login, System, System Roots, iCloud) to build its trust store. Because at least one cert in the Keychain has a non-standard/malformedKey UsageX.509 extension (common with legacy/self-signed certs accepted once for local devices, VPNs, MDM profiles, etc.), Chromium's stricter parser logsnet/cert/internal/trust_store_mac.cc:807 Error parsing certificate: Failed parsing key usage— and does so on every single launch of the shell, not intermittently. - Critically,
@react-native/dev-middleware'sLaunchUtils.jsexplicitly pipes this child process's stdout/stderr into the Metro terminal output (console.warn("[debugger-shell stderr] " + data)), which is why this becomes visible with Rozenite enabled but is invisible otherwise (a normal browser's own process output is never piped into the terminal).
I want to stress this Keychain certificate issue itself is a macOS/Chromium-level quirk unrelated to Rozenite or this repo — I confirmed via manual process tracing that the error originates purely from Chromium's own cert trust-store code (net/cert/internal/trust_store_mac.cc), not from any Rozenite code. However, Rozenite's choice to route through the standalone debugger-shell (and have its stderr piped to the terminal) is what makes this pre-existing, otherwise-invisible noise show up as soon as Rozenite is enabled — consistently, every time.
Steps to reproduce
- Have at least one certificate with a malformed
Key Usageextension somewhere in your macOS Keychain (common on developer machines with lots of VPN/MDM/self-signed router certs accumulated over time). - Enable Rozenite in
metro.config.js:module.exports = withRozenite(mergeConfig(getDefaultConfig(__dirname), config), { enabled: true, // or process.env.WITH_ROZENITE === 'true' }); - Run
react-native start(orexpo start), then open React Native DevTools (pressj, or hit/open-debugger). - Observe the
[debugger-shell stderr] ... trust_store_mac.cc:807 ... Failed parsing key usagelines in the terminal — this happens on every launch, not occasionally. - Disable Rozenite (
enabled: false), repeat steps 3–4 — the error no longer appears in the terminal.
Expected behavior
No unrelated Chromium/macOS Keychain internals should leak into the developer's terminal output as a side effect of enabling Rozenite, since the noise is not actionable from the app/repo side and can look like Rozenite is doing something wrong with certificates (it isn't).
Suggested fixes
- Consider not forcing the standalone Fusebox Electron shell purely because Rozenite's custom frontend is served, if the user's regular DevTools launch flow (browser-based) would otherwise be used — or clearly document that Rozenite requires/prefers the standalone shell and why.
- Alternatively/additionally, filter or suppress known-benign Chromium startup stderr noise (e.g.
trust_store_mac.cc,Window move completed without beginning) before re-emittingdebugger-shell stderrlines to the terminal, so only actionable errors are surfaced. - At minimum, document this known noise in Rozenite's README/troubleshooting so users don't mistake it for a Rozenite bug.
Environment
- Rozenite:
@rozenite/metro,@rozenite/middleware, etc. v2.4.0 - React Native: 0.86.3
- Metro: 0.84.6
- OS: macOS 27.0 (build 26A428), Apple Silicon
- Package manager: pnpm (monorepo)
- Installed Rozenite plugin:
@rozenite/react-navigation-plugin
Additional notes
- I verified this is not a malformed cert issue in the standard
login.keychain-dborSystem.keychain(scanned viasecurity find-certificate -a -p+openssl x509 -noout -text, all parsed cleanly) — the offending cert is likely in the newer SQLite-backed keychain store or iCloud Keychain, which isn't easily enumerable outside the Keychain Access GUI. - Note: when manually launching the
debugger-shellbinary directly/standalone (bypassing the real Metro + connected-app flow, e.g. to try to isolate the exact offending cert with extra Chromium logging flags), the error did not reproduce — it only reproduces reliably through the realreact-native start→ DevTools-launch flow described above. So the repro steps above (full flow) are the reliable ones; ad-hoc standalone launches of the binary are not representative.
Happy to provide more logs/details if useful.
- 主要语言
- TypeScript
- 星标
- 680
- 派生
- 58
- 平均合并
- 5 天 1 小时
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstackincubator/rozenite 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 54/100
callstackincubator/rozenite#585 ·
-
难度 3/5 1-2 天 新手友好度 65/100
callstackincubator/rozenite#573 · 2 条评论 ·
查看 callstackincubator/rozenite 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
cursor/community-plugins#583 ·
维护者通常 1 天内回复
-
afk-ok importer size:S
难度 2/5 1-3 小时 新手友好度 72/100
enorm-labs/event-junkie#5404 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
Wavvon/Wavvon-clients#493 ·
维护者通常 1 天内回复
-
documentation
难度 1/5 1-3 小时 新手友好度 72/100
answerLoops/answerLoops#679 ·
维护者通常 1 天内回复