Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: macOS App fails to load #17792

Closedaashishsingla567(GitHub profile, opens in a new tab) opened this issue 1 comment

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

Image 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.

Expected behavior

App should work

Actual behavior

App did load

Impact

Minor bug or occasional failure

Version or commit

0.0.45 (6c8fed35dded)

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

  1. aashishsingla567(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. 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/token over 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 as DesktopLocalEnvironmentAuthSessionBootstrapError, and the root beforeLoad shows it as PrimaryEnvironmentRequestError. 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 365aa879) added a retry on main. 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 cause isn'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 beforeLoad error that stays until reload).

  3. juliusmarminge added labelsduplicate

  4. juliusmarminge added labelsvia-triage

  5. juliusmarminge removed labelsneeds-triage

  6. juliusmarminge closed this

Sign in to join this conversation.