Skip to content

[Bug]: t3 pair's App link opens NotFound in the mobile app #40666

Open

Description

@NorthIsUp

Before submitting

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

Area

apps/mobile

Steps to reproduce

  1. On a server, run t3 pair. It prints App link: t3code://pair?pairingUrl=https://<host>/pair#token=<code> (apps/server/src/cli/pair.ts:228, buildPairingAppLink).
  2. Open that link on a phone that has the release mobile app installed, for example by tapping it in Safari or Chrome.

Expected behavior

The mobile app handles the link the way the desktop app does: it asks "Add the backend at ?" and pairs on confirm (apps/web/src/components/desktop/DesktopWebLinkCoordinator.tsx).

Actual behavior

The app opens on the NotFound screen.

  • t3code:// is a linking prefix (apps/mobile/src/App.tsx:140-151), and shouldHandleAppLink lets t3code://pair through.
  • The Stack.tsx linking config has no pair route, so the link falls to * → NotFound (Stack.tsx:848-861).
  • The only mobile prefill and auto-connect for pairingUrl run only under __DEV__ (ConnectionsNewRouteScreen.tsx:52-53, devAutoConnect.ts:87-111), so a release build drops the link.

The link that t3 pair advertises therefore works on desktop and dead-ends on mobile.

Impact

Minor bug or occasional failure

Version or commit

main @ c7a9fba (the same code is in v0.1.8: same __DEV__ gate, no pair route).

Environment

Server: t3 v0.1.8, headless, reached over Tailscale. Client: iOS release app.

Workaround

Copy the pairing URL and paste it into Add environment → Host; the app splits it into host and code. Scanning the QR with the in-app scanner also works.

Fix

There's a candidate fix on a fork: NorthIsUp#1. It rewrites the pair link to the existing Add environment form, filled in, and the user taps Connect: the same trust as the in-app QR scanner. Dev auto-connect stays dev-only. It has unit tests but hasn't been run on a device yet. Happy to open it here if you want it.

Activity

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