Repository navigation
[Bug]: macOS App fails to load #17792
Description
Activity
- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.Issue needs maintainer review and initial categorization.
on Oct 10, 2026 Note
Grok responding on behalf of Julius.
Thanks for the report and the full stack trace.
What happened: on launch, the desktop app swaps its bootstrap credential for a bearer session by calling the local backend's
/oauth/tokenover loopback (apps/desktop/src/backend/DesktopLocalEnvironmentAuth.ts). If that single request fails, for example because the backend is still starting or the loopback connection is refused or reset, the error comes back asDesktopLocalEnvironmentAuthSessionBootstrapError, and the rootbeforeLoadshows it asPrimaryEnvironmentRequestError. The token isn't cached on failure, so reloading tries again, which is why reload fixed it.Status: in 0.0.45 (
6c8fed35dded, released Oct 2) that exchange runs exactly once with no retry. Since then, #10298 (merged Oct 6, commit 365aa87) added a retry onmain. Connection failures, timeouts, and 502/503/504 responses are now retried every 500 ms for up to 15 seconds. Rejected credentials and other server errors still fail immediately. This looks like the same transient failure as #12918, which was closed when that change landed.We haven't confirmed which error was underneath in your case, because the
causeisn't shown in the stack. So this should be fixed in the next release, but that isn't certain yet. If it still happens on a build newer than 0.0.45, please reopen this and attach the desktop log from around launch so we can see the underlying cause.Related: #12918 (same error, transient loopback failure), #17367 / #17568 (Windows web-mode bootstrap failure that reload doesn't fix, so a different issue), #3513 (a
beforeLoaderror that stays until reload).- addedduplicateThis issue or pull request already existsThis issue or pull request already existsvia-triageFiled through npx t3 triageFiled through npx t3 triageand removedneeds-triageIssue needs maintainer review and initial categorization.Issue needs maintainer review and initial categorization.
on Oct 10, 2026
Before submitting
Area
apps/web
Steps to reproduce
PrimaryEnvironmentRequestError
at e.fromCause (t3code://app/assets/primary-U1QeYewv.js:1:758)
at t3code://app/assets/primary-U1QeYewv.js:1:2137
at async Y (t3code://app/assets/primary-U1QeYewv.js:1:3163)
at async Q (t3code://app/assets/primary-U1QeYewv.js:1:3424)
at async Object.beforeLoad (t3code://app/assets/main-DPnH3f5B.js:35:33261)
at async Rh (t3code://app/assets/main-DPnH3f5B.js:2:29004)
at async t3code://app/assets/main-DPnH3f5B.js:2:48160
Caused by:
Error: Error invoking remote method 'desktop:get-local-environment-bearer-token': DesktopLocalEnvironmentAuthSessionBootstrapError: Failed to create the local desktop bearer session.
Expected behavior
App should work
Actual behavior
App did load
Impact
Minor bug or occasional failure
Version or commit
0.0.45 (6c8fed3)
Environment
macOS 26.6.1
Logs or stack traces
T3 Code (Alpha) 0.0.45 Path: / Time: 2026-10-10T10:39:21.970Z PrimaryEnvironmentRequestError at e.fromCause (t3code://app/assets/primary-U1QeYewv.js:1:758) at t3code://app/assets/primary-U1QeYewv.js:1:2137 at async Y (t3code://app/assets/primary-U1QeYewv.js:1:3163) at async Q (t3code://app/assets/primary-U1QeYewv.js:1:3424) at async Object.beforeLoad (t3code://app/assets/main-DPnH3f5B.js:35:33261) at async Rh (t3code://app/assets/main-DPnH3f5B.js:2:29004) at async t3code://app/assets/main-DPnH3f5B.js:2:48160 Caused by: Error: Error invoking remote method 'desktop:get-local-environment-bearer-token': DesktopLocalEnvironmentAuthSessionBootstrapError: Failed to create the local desktop bearer session.Screenshots, recordings, or supporting files
No response
Workaround
reload