Skip to content

fix(expo): wait for native configure instead of falling back to the app token cache - #11164

Draft
wobsoriano wants to merge 1 commit into
rob/expo-clear-fallback-on-native-signoutfrom
rob/expo-wait-for-native-configure
Draft

wobsoriano wants to merge 1 commit into
rob/expo-clear-fallback-on-native-signoutfrom
rob/expo-wait-for-native-configure

Conversation

@wobsoriano

Copy link
Copy Markdown
Member

Description

Stacked on #11159.

With native components installed, the JS SDK waited at most 3 seconds for the native SDK's configure, then loaded with the app's token cache. That cache can name a different client than the native SDK's. That split caused the bugs fixed in #11138 and #11159, and the convergence added in #11138 still misses some cases. The JS SDK now waits for configure to finish before it sends any request. It uses the app's token cache only when configure fails, because then the native SDK is not running.

A slow native start now delays loading instead of starting on another client. If configure has not finished after the app has been open for 10 seconds, nativeClientSync.ts logs an error and keeps waiting. A background or prewarm launch does not count toward the 10 seconds. The slow-start convergence, the token handoff and the sign-out latch existed only for the fallback, so this removes them. A failed native token read now marks the client for the existing repair on the next foreground, which covers the one case the convergence handled that was not a slow start.

🤖 Generated with Claude under Rob's supervision.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@vercel

vercel Bot commented Dec 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Dec 6, 2026 9:11am UTC
mosaic-docs Ready Ready Preview Dec 6, 2026 9:11am UTC
swingset Ready Ready Preview Dec 6, 2026 9:11am UTC

Request Review

@changeset-bot

changeset-bot Bot commented Dec 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 111d0b3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/expo Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

This branch was successfully deployed

2 active deployments
Preview – swingset — 111d0b31 Deployed Dec 6, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 111d0b31 Deployed Dec 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant