-
Notifications
You must be signed in to change notification settings - Fork 440
Open
Description
Summary
In an Expo repro app using @clerk/expo with Convex, cached token fetch works, but fresh token fetch fails.
Specifically:
- cached token fetch succeeds
- fresh token fetch fails with:
Clerk: Network request failed while offline. The browser appears to be disconnected.(code="clerk_offline")
This leaves the app signed in at the Clerk level, but downstream Convex auth never completes.
Repro repo
https://github.com/eliotgevers/convex-clerk-expo-token-refresh-repro
Environment
@clerk/expo:3.1.2convex:1.33.1- Expo SDK:
55 - React Native:
0.83.2 - Reproduced in Expo iOS simulator
Reproduction steps
- Clone the repro repo.
- Fill in
.envwith a valid Clerk publishable key and Convex URL. - Start the app.
- Sign in with an existing user.
- Tap
Probe cached token. - Tap
Probe fresh token.
Expected
Both cached and fresh token fetches succeed.
Actual
Cached token succeeds, but fresh token fetch fails with clerk_offline.
Example result
Clerk signed in: true
Convex loading: false
Convex authenticated: false
WebSocket connected: true
Last cached token ok: 2:51:44 PM
Last fresh token failed: 2:42:35 PM
Recent events:
- Fresh token failed: Clerk: Network request failed while offline. The browser appears to be disconnected.
(code="clerk_offline")
Notes
- The repro intentionally strips away app-specific backend bootstrapping so the failure stays focused on Clerk token fetch behavior.
- If Clerk returns
needs_client_trust, I disable Client Trust for the test app or use a trusted device. That is separate from the bug being reported here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels