Repository navigation
Description
What version of the Codex App are you using (From "About Codex" dialog)?
26.908.31748 (bundled codex-cli 0.154.0-alpha.6.1). Rolling back to 26.901.51231 (codex-cli 0.153.4) fixes it.
What subscription do you have?
ChatGPT subscription (signed in with ChatGPT account)
What platform is your computer?
Darwin 24.3.0 arm64 arm (macOS 15.3.1, Apple M4)
What issue are you seeing?
After updating to 26.908.31748 the app opens to a blank main window and, after a while, no window at all. The main process and renderer keep running (no crashpad dump). The desktop log shows the renderer failing at first paint and then hitting the React error boundary:
warning [electron-message-handler] Initial route prefetch failed; rendering will retry errorMessage="r is not a function" errorName=Error errorStack="Error: r is not a function" route=primary windowType=electron
error [electron-message-handler] error boundary componentStack="
at Lazy (<anonymous>)
at o (app://-/assets/app-initial-c932b6b5121b.js:8057:59005)
at q7t (app://-/assets/app-initial-c932b6b5121b.js:1797:3233)
at ob (app://-/assets/app-initial-c932b6b5121b.js:1797:8149)
at n7a (app://-/assets/app-initial-c932b6b5121b.js:8057:93512)
at W7a (app://-/assets/app-initial-c932b6b5121b.js:8057:104285)
..." errorMessage="r is not a function"
The interesting part: it only happens when the app can actually reach OpenAI. With no network (or a dead proxy) the same build renders fine. 26.901.51231 renders fine with identical flags.
What steps can reproduce the bug?
Launched via open -na /Applications/ChatGPT.app --args <flags> and read ~/Library/Logs/com.openai.codex/<date>/codex-desktop-*.log:
| Build | Flags | Network | Result |
|---|---|---|---|
| 26.908.31748 | --proxy-server=socks5://127.0.0.1:7890 (working proxy) |
reachable | blank window, r is not a function + error boundary, 3/3 launches |
| 26.908.31748 | --proxy-server=http://127.0.0.1:7890 (working proxy) |
reachable | same, 1/1 |
| 26.908.31748 | --proxy-server=socks5://127.0.0.1:1 (dead port) |
unreachable | window renders, no error |
| 26.908.31748 | no flags (system proxy off) | unreachable | window renders, no error |
| 26.901.51231 | --proxy-server=socks5://127.0.0.1:7890 |
reachable | works |
So it is not a proxy/networking bug; network reachability only changes the timing of what the renderer loads at startup.
What is the expected behavior?
The main window renders the app after login, as in 26.901.51231.
Additional information
I unpacked app.asar from both builds and compared the renderer chunks. This looks like a circular-import evaluation-order race introduced in 26.908:
- In 26.901,
authed-route-99252ed1daca.jswas a one-liner:import{Gs as e,Ws as t}from"./app-primary-…";e();export{t as AuthedRoute};and onlyapp-initialreferenced it (dynamically). - In 26.908,
authed-route-86740a2af5a2.jsgrew to 1.7 KB (it now registers asmartphone-light-16icon), imports{Dc, Oc, kc}fromapp-primary-68af4c0f2334.jsand callskc()(renamed torin the chunk) at module-evaluation time. - New in 26.908:
app-primary-68af4c0f2334.jsalso statically importsauthed-route-86740a2af5a2.js, so the two chunks form a cycle.kcresolves tovar azn = t(()=>{…})inside app-primary, i.e. it is only assigned while app-primary's body executes. - ~300 other chunks statically import app-primary. If any of them is evaluated before the
authed-routeprefetch inapp-initial(async function b8a(){await Promise.all([x8a.prefetch(),S8a.prefetch()])}), ESM evaluates app-primary first, its static depauthed-routeruns before app-primary's body finishes,ris stillundefined, and the renderer throwsr is not a function. When the entry happens to beauthed-routeitself the cycle evaluates in the safe order, which is presumably why offline launches survive.
Breaking the cycle (app-primary should not statically import the route chunk, or the route chunk should not call into app-primary at eval time) should fix it. Happy to share full logs.
Activity
github-actions commentedon Sep 11, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
hearwish commentedon Sep 11, 2026
scosmiclia commentedon Sep 11, 2026
yeah
Flock-YT commentedon Sep 11, 2026
I have same problem.
knappy214 commentedon Sep 11, 2026
Additional macOS reproduction with controlled rollback evidence for 26.908.31748.
I independently reproduced the same renderer signature:
followed by:
The local app-server remained healthy during the failure: initialization completed, auth/config/model calls succeeded, and the sidecar reached
running.Isolation performed
The failure still reproduced after each of the following:
.codex-global-state.jsongenerated by the app (Selected host: None, 17 top-level keys)The fresh global-state test is especially useful: the app opened once, then failed again on the first retry.
Controlled rollback
Affected build:
Rolled back to the previous OpenAI-signed build:
The historical arm64 package was downloaded directly from
persistent.oaistatic.com; SHA-256 matched the published historical cask record:codesign --verify --deep --strictpassed, Gatekeeper reportedaccepted/source=Notarized Developer ID, and TeamIdentifier matched the newer build (2DC432GLL2).A/B launch results
26.903.71938+ fresh global state: 10/10 successful launches26.903.71938: 3/3 successful launchesBy contrast,
26.908.31748failed intermittently within the first few relaunches and consistently produced ther is not a function/AppRoutessignature when it failed.This strongly supports a regression in the 26.908 renderer bundle, rather than user state, plugins, Remote SSH, MCP/Composio, SQLite, authentication, or the app-server.
The circular-import / module-evaluation-order analysis in #44720 is highly consistent with the intermittent behavior observed here.
I can provide sanitized logs if maintainers need a specific launch trace.
Andrewlawn commentedon Sep 11, 2026
Additional macOS reproduction of the avatarOverlay AppRoutes crash on 26.908.31748 (build 8720), matching the Pet/avatarOverlay isolation reported in #44809 and the network-timing dependence in #44743.
Environment
26.908.31748(CFBundleVersion 8720), bundled codex-cli 0.154.0Sequence observed (desktop log, 2026-09-11)
refresh_token_invalidated→ "Your session has ended. Please log in again."). Fixed bycodex login; API calls return 200 afterward.~/.codex/.codex-global-state.json→electron-avatar-overlay-open: truere-opens the crashing overlay every startup. Setting it tofalseand relaunching removes the broken window entirely; the primary window works normally (no error boundary recurrence over 30+ min, model calls healthy).Extra detail that may help triage
remote_connections.connection_state_changedright before the boundary:connection-failedfromfailed to refresh available models— at 13:14 it wastimeout waiting for child process to exit(transient); after the fix, models refresh succeeds, yet the overlay renderer still crashes deterministically when it mounts. So the crash is in the overlay AppRoutes render path itself, not downstream of the models fetch.bundled_pluginsreconcile ofopenai-primary-runtimebundleVersion 26.904.11930 (installed Sep 5) + openai-bundled marketplace; the pluginsitesinstall fails withplugin 'sites' was not found in marketplace 'openai-bundled'(separate warning, present in sessions before and after the crash).electron-avatar-overlay-open=falsethe overlay still mounts hidden and hits the same boundary exactly once at startup, then stops. No EPIPE / app-server unavailability here — local app-server stayed healthy throughout (unlike [macOS][26.908.31748] Enabling Pet causes “r is not a function” AppRoutes crash; disabling Pet fixes startup #44809's secondary errors).Happy to pull additional log lines if useful.
badandyomega commentedon Sep 11, 2026
Adding a Windows reproduction of the same primary-window startup failure, with isolated-profile/configuration observations.
Environment
OpenAI.Codex 26.908.3777.0.26.908.31457(read from the installed package).Failure
Opening the normal app shows “ChatGPT hit a snag” / “Something went wrong. Try again to continue.” Try again does not recover; Update ChatGPT reports that the installed version is current.
Across three normal launches, the logs record:
followed by the interface error boundary with the same error. The local app-server connected before the interface failed.
A separate instance with fresh browser storage also logged:
That source location is the console reporting location, not a debugger-captured originating stack.
Isolated reproduction observations
Each configuration variant used a separate temporary
CODEX_HOME, a fresh--user-data-dir, andCODEX_ELECTRON_USER_DATA_PATHset to that browser directory. These were child-process environment overrides, with the working directory also inside the temporary test directory. No original authentication file, sessions, global state, or browser data was copied.The smallest project configuration used in a failing clean-home launch was:
This is documented configuration syntax. To repeat that test, place only those two lines in a new temporary home's
config.toml, launch the installedChatGPT.exewith the isolated paths described above, and observe its Chromium console log. No sign-in credentials were copied.These are observed outcomes, not proof that project/hook settings are the root cause. Most variants were tested for one launch, and one initially clean hook test later logged the same error. Configuration changes could affect timing or module evaluation order, consistent with the race discussed here and in #44777. A no-error observation is not a verified fix or evidence that signed-in workflows succeed.
Additional checks
Ok.aaamosh commentedon Sep 11, 2026
Independent Linux reproduction, plus a narrower bundle-level root cause.
I tested the official OpenAI amd64
.debpackages and compared pristineapp.asarcontents across the last working and affected builds.Runtime A/B, using the same existing profile and environment:
26.903.61454— starts normally; authenticated route loads successfully.26.908.31748— reproducesInitial route prefetch failed/TypeError: n is not a function.26.908.40401— reproduces the same failure.I also reinstalled the affected package from the cached official
.deband launched it with a pristine, unmodifiedapp.asar, bypassing our local runtime-policy patch. The failure remained, so the local patch and profile can be excluded.The interesting new detail is the bundle dependency graph.
In
26.903.61454:authed-route-9b121b4f652e.js→ statically imports
app-primary-1253798d8a4b.jsbut
app-primaryhas no static import back toauthed-route.The route chunk is only 88 bytes:
In
26.908.40401:authed-route-95b7e7dbb938.js→ statically imports
app-primary-124c64e4a755.jsand
app-primary-124c64e4a755.js→ now also statically imports
authed-route-95b7e7dbb938.jsSo the dependency became bidirectional.
The same bidirectional edge is present in Linux
26.908.31748.I traced the new reverse edge further. In
26.908.40401,app-primaryimports:yZeis then used asleftIconAssetfor the sidebar Help items:Set up mobileSet up remoteand
bZe()is called as part ofapp-primaryinitialization.Meanwhile,
authed-routeimports route/initializer symbols fromapp-primaryand performs an evaluation-time call before exporting:So
26.908appears to have moved/generated thesmartphone-light-16icon module into the lazyauthed-routechunk, whileapp-primaryitself needs that icon for the sidebar. That creates:app-primary -> authed-route -> app-primarywith an initializer call occurring before the cycle is necessarily fully initialized.
This is consistent with the observed
n is not a function/r is not a functionfailures and with the evaluation-order hypothesis already described in this issue.A focused fix would likely be to keep the smartphone icon/initializer in a neutral shared/icon module rather than in
authed-route, or otherwise ensure thatapp-primarynever statically imports its lazy route chunk.Two regression checks also seem worthwhile:
The Linux apt repository is still currently offering
26.908.40401as the candidate version, so this remains user-impacting rather than only historical.I have not opened a PR because the repository contribution guide says external code contributions are invitation-only. If this diagnosis matches the team's intended direction and the relevant Desktop frontend source can be made available to an invited contributor, I'd be happy to prepare a focused fix and regression coverage.
Ethan2424352 commentedon Sep 12, 2026
Additional Ubuntu reproduction and a rollback compatibility caveat, observed September 11–12, 2026.
Environment: Ubuntu 26.04.1 LTS, Linux 7.0.0-31-generic, x86_64, GNOME Wayland/Xwayland, AMD Navi 10 with Mesa 26.2.2. Official OpenAI Debian packages.
Verified results using the existing signed-in profile:
TypeError: n is not a function.On 26.908.40401, debugger inspection captured:
At the failing module-evaluation call,
typeof nwasundefined. The same startup failure reproduced with a separate temporary XDG cache and--disable-gpu.dpkg -V chatgptfound no package-file discrepancies. No installed application code was patched.Rollback is not a complete workaround for this account/model: 26.901.20858 bundles
codex-cli 0.153.0-alpha.5. Opening/using a GPT-6 Astra conversation displays:The separately installed CLI reports 0.154.0, but that does not update the older desktop's bundled CLI. A rendered home screen therefore did not establish usable model access; our initial local verification missed this and was corrected by the user's follow-up screenshot.
I have seen the maintainer's “Fixed” update on #44785 and the subsequent report naming 26.908.40834. That build has not yet been tested on this machine at the time of this comment. Posting these results to document the affected Linux builds and the model-compatibility limitation of rolling back too far, rather than opening another duplicate startup-crash issue.
This report was prepared with an assistant from local diagnostics. Only selected technical details are included; no raw logs, screenshots, credentials, account identifiers, or conversation contents are attached.
Update: verified on 26.908.40834
After refreshing only the official OpenAI APT repository metadata, 26.908.40834 became available and was installed. The existing profile and authentication were retained.
dpkg -V chatgptreports no discrepancies.codex-cli 0.154.0-alpha.6.2. A minimal, ephemeral GPT-6 Astra request through that exact bundled executable returnedOK, without the newer-client requirement error. This was a runtime/model connectivity test, not an automated GUI send test.This confirms the new release resolves the observed startup failure and the older rollback's model-version blocker in this environment. No long-duration or suspend/resume stability claim is made.
yuzhu-oai commentedon Sep 14, 2026
This has been fixed. Please update to the latest version.