You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OpenCode desktop app opens but never leaves the loading screen.
The sidecar starts
successfully and logs "server ready", but the UI freezes
indefinitely. After ~42 seconds
the sidecar exits with code 0 (timeout waiting for a client).
Root Cause
Chrome 94+ enforces Private Network Access (PNA) preflight checks. In
Electron 41
(Chrome 146), when the renderer (oc:// origin) fetches localhost,
Chrome sends a
CORS OPTIONS preflight with:
Access-Control-Request-Private-Network: true
The sidecar responds with 204 but does NOT include:
Access-Control-Allow-Private-Network: true
The onHeadersReceived hook in out/main/index.js patches response
headers but only
adds Access-Control-Allow-Origin and Access-Control-Allow-Headers
— it does not add Access-Control-Allow-Private-Network. Chrome blocks the actual
request, the renderer's fetch() resolves with status 0, checkServerHealth never passes,
and the app stays
on the loading screen forever.
Verified by inspecting the Network tab in DevTools: all /global/health requests show
status 0 with blocked: 3000ms and connect: -1 (request never
sent).
Fix
In out/main/index.js, inside the onHeadersReceived handler, add:
Your issue provides a specific root cause (Chrome Private Network Access preflight missing Access-Control-Allow-Private-Network header), which is helpful context. If the above issues describe the same symptom you're experiencing, please consider adding your findings there rather than opening a new report. If your root cause is confirmed distinct, feel free to clarify and this note can be disregarded.
Activity
github-actions commentedon May 12, 2026
This issue might be a duplicate of existing issues. Please check:
Your issue provides a specific root cause (Chrome Private Network Access preflight missing
Access-Control-Allow-Private-Networkheader), which is helpful context. If the above issues describe the same symptom you're experiencing, please consider adding your findings there rather than opening a new report. If your root cause is confirmed distinct, feel free to clarify and this note can be disregarded.github-actions commentedon Jul 12, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.