Skip to content

[Bug]: Remote environment stuck on "still loading its T3 Connect sign-in" after launching offline, until reload #37602

Open

Description

@braydenamad77-sketch

Before submitting

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

Closest match is #29323, which was the same banner and gate for the primary environment in Chrome. The fix there (#29347) maps offline to unknown only for PrimaryConnectionTarget, so remote environments still hit it.

Area

apps/web

Steps to reproduce

I've seen this once and haven't reproduced it on demand.

  1. Desktop app on macOS with a saved remote environment (a Linux box, bearer connection, reachable over LAN, Tailscale and T3 Connect).
  2. Restart the Mac. T3 Code opened at login, while DNS on the Mac was still timing out (the local relay client logged DNS lookup timeouts at that moment).
  3. Open a thread on the remote environment.

Expected behavior

Once the network is up, the remote environment connects, or at least connects when I press Reconnect.

Actual behavior

The composer shows a banner, " is offline" / "This device is offline", with a Reconnect button. Everything else on the Mac had working internet, and the remote server answered /.well-known/t3/environment fine from the same Mac over LAN, Tailscale and its relay URL.

  • Reconnect did nothing. I pressed it about 10 times over 6 minutes.
  • Turning Wi-Fi off and on didn't help. After that, the remote server got 26 GET and 13 OPTIONS requests for /.well-known/t3/environment from the app, but no session was established and the banner stayed.
  • Quitting and relaunching the app fixed it immediately.

From reading the bundled client, hc() only returns "This device is offline" when the supervisor state has network === "offline" or phase === "offline", and EnvironmentSupervisor.make only maps offline to unknown for PrimaryConnectionTarget. So my guess is the renderer started with navigator.onLine === false at login and the remote supervisor never left the offline phase. I didn't confirm navigator.onLine from DevTools.

Same idea as #29323: treat navigator.onLine as a hint for remote targets too, or let Reconnect try a real connection even when it reads offline.

Impact

Major degradation or frequent failure

Version or commit

Desktop and remote server: 0.1.10-nightly.20261115.4749. The gate looks unchanged in 0.1.10-nightly.20261116.4774.

Environment

Desktop app on macOS 27.2 (arm64). Remote environment: T3 server on Linux x64, same nightly.

Logs or stack traces

EnvironmentRpcUnavailableError: <remote> is not connected.
    at onNone (t3code://app/assets/utils-D14CMIgn.js:35:34836)
    at EnvironmentRpc.currentSession (t3code://app/assets/utils-D14CMIgn.js:35:35762)
    at EnvironmentRegistry.run (t3code://app/assets/runtime-D7nyHUGS.js:2:158050)
# repeated every few seconds from login until relaunch

# twice during the same window, possibly unrelated:
EnvironmentAuthorizationError: This connection requires orchestration:read.
    at EnvironmentRegistry.run (t3code://app/assets/utils-D14CMIgn.js:35:41351)

Workaround

Quit the app (Cmd+Q) and open it again.

Activity

  1. juliusmarminge commented on Nov 16, 2026

    @juliusmarminge
    Member

    @braydenamad77-sketch Next time it happens, could you open Settings › Connections, use Copy diagnosis on the remote environment and paste the text here (especially its 'Error:' and 'Attempts:' lines), and also say what navigator.onLine reads in DevTools at that moment? The banner shows 'This device is offline' whenever the device reads offline, so the real connection error is only in that copied text.

  2. braydenamad77-sketch commented on Nov 16, 2026

    @braydenamad77-sketch
    Author

    Reproduced it on purpose, on 0.1.10-nightly.20261116.4774 for both the app and the host.

    1. Turn Wi-Fi off, quit T3 Code (including the background process), and reopen it while still offline.
    2. Wait about 30 seconds, then turn Wi-Fi back on.
    3. Every thread on the remote environment shows "switchboard is reconnecting · This device is still loading its T3 Connect sign-in". Retry now, pressed about 10 and 30 seconds after Wi-Fi returned, didn't change it.

    navigator.onLine was true at that point, and the host answered /.well-known/t3/environment from the same Mac over LAN and the relay. Copied diagnostics:

    T3 Code connection to switchboard: This device is still loading its T3 Connect sign-in
    
    This device: FAILED
    T3 Code on switchboard: not checked
    
    Cause: session_pending
    Attempts: 7
    Next retry: 2026-11-16T10:15:27.561Z
    Route: Direct
    App version: 0.1.10-nightly.20261116.4774
    Host version: 0.1.10-nightly.20261116.4774
    Error: Waiting for the T3 Connect sign-in to load.
    

    Cmd+R (View › Reload) fixed it right away. A full quit wasn't needed.

    The troubleshooting doc says T3 Code retries the sign-in on its own, but after launching offline it never did. It waited until a reload. That looks close to #15725 and #17917. The route was Direct, so the LAN path was usable the whole time.

    My original "This device is offline" report was probably the same trigger, since the app launched at login before the network was up. That time navigator.onLine may really have read false, but I didn't check it before relaunching.

  3. changed the title [-][Bug]: Remote environment stays "This device is offline" after a Mac reboot until the app is relaunched[/-] [+][Bug]: Remote environment stuck on "still loading its T3 Connect sign-in" after launching offline, until reload[/+] on Nov 16, 2026
  4. josephv123 commented on Nov 22, 2026

    @josephv123
    Contributor

    Still happens on 0.1.12-nightly.20261120.4994 (macOS desktop, with two Linux environments reached through T3 Connect and direct Tailscale routes).

    The Mac rebooted, and the app opened at login before the network was up. Both hosts answered the app's /.well-known/t3/environment checks over Tailscale from 24 s after launch, but no session ever opened. The banner said "This device is still loading its T3 Connect sign-in". 8 Retry presses over 2 minutes didn't help, and both hosts were still "not connected" about 20 minutes after launch. View › Reload fixed it right away.

    #37621 should cover it. It would be even better if the app retried the sign-in load by itself when the network comes back, since nothing else did here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions