Enabling Rozenite causes Chromium 'Failed parsing key usage' cert errors to leak into terminal (macOS)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- electron, react-native, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 680
- Fork
- 58
- Merge medio
- 5g 1h
- PR unite (30g)
- 7
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di callstackincubator/rozenite
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 54/100
callstackincubator/rozenite#585 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
callstackincubator/rozenite#573 · 2 commenti ·
Tutte le issue di callstackincubator/rozenite
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
cursor/community-plugins#583 ·
I maintainer di solito rispondono entro 1 giorno
-
afk-ok importer size:S
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
enorm-labs/event-junkie#5404 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Wavvon/Wavvon-clients#493 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
answerLoops/answerLoops#679 ·
I maintainer di solito rispondono entro 1 giorno