ClerkProviderBase crashes with "undefined is not a function" in ParentSession/__experimental_CheckoutProvider (React Native/Expo)

Offen
#10,672 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
react-native, typescript

Rechercherichtung

Start by tracing how ClerkProviderBase mounts __experimental_CheckoutProvider and ParentSession in a production Expo build; the report names no source files or tests. Reproduce the crash with the listed Expo SDK 54, React Native 0.81, and @clerk/expo 4.15.0 setup, then isolate the undefined function. Done means the provider mounts without crashing when the app does not use billing or checkout.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

needs-triage
Preliminary Checks
Reproduction

No minimal reproduction repo yet — see "Additional notes" below for a detailed root-cause analysis. Can provide one if needed.

Publishable key

pk_live_Y2xlcmsuYW1wYXJha2lkcy5jb20k

Description

What happened

The app crashes immediately when ClerkProvider mounts, showing a generic
"Something went wrong / Please reload the app to continue" screen.
We don't use any Clerk Billing/Checkout features in our app.

Error from device console logs

TypeError: undefined is not a function

componentStack:
at ParentSession (main.jsbundle)
at __experimental_CheckoutProvider (main.jsbundle)
at InitialStateProvider (main.jsbundle)
at ClerkContextProvider (main.jsbundle)
at ClerkProviderBase (main.jsbundle)

Steps to reproduce

  1. Create an Expo SDK 54 / RN 0.81 app with @clerk/expo 4.15.0 as the only
    Clerk package (no @clerk/expo-native-components, no billing/checkout
    usage anywhere in app code).
  2. Wrap the app root in
    (standard setup per docs).
  3. Build a release/production build via EAS Build and run it on a real
    iOS device (not Expo Go, not a dev client).
  4. App crashes on launch with the error above as soon as ClerkProvider
    tries to mount.

Additional notes

  • We also hit a separate CocoaPods/SPM build issue with ClerkKit/ClerkKitUI
    on @clerk/expo 4.6.1 ("undefined method 'package_product_dependencies'
    for nil:NilClass" in react-native's spm.rb during pod install), which
    upgrading to 4.15.0 resolved. However 4.15.0 requires clerk-js >=6.42.2
    as a hard minimum, and that exact version is what crashes with the
    ParentSession/CheckoutProvider error above. We tried pinning clerk-js
    to an older version (6.30.3) via pnpm overrides to avoid this, but
    that reintroduces the original pod install crash. We could not find
    any version combination that avoids both issues.
  • This appears to be an internal, always-mounted provider
    (__experimental_CheckoutProvider) inside ClerkProviderBase that isn't
    conditional on whether the app actually uses billing/commerce features.
  • Happy to put together a minimal reproduction repo if that would help
    triage this faster.
Environment
pnpm dlx envinfo --system --browsers --binaries --npmPackages                                                                                   

  System:
    OS: macOS 27.0.1
    CPU: (8) arm64 Apple M1
    Memory: 87.44 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.23.2 - /opt/homebrew/bin/node
    npm: 10.9.8 - /opt/homebrew/bin/npm
    pnpm: 9.15.9 - /opt/homebrew/bin/pnpm
    bun: 1.4.3 - /Users/marcelofeuser/.bun/bin/bun
  Browsers:
    Chrome: 156.0.8078.80
    Safari: 27.0.1
  npmPackages:
    @babel/core: ^7.25.2 => 7.29.7 
    @clerk/expo: ^4.15.0 => 4.15.0 
    @config-plugins/react-native-webrtc: 13.0.0 => 13.0.0 
    @expo-google-fonts/inter: ^0.4.0 => 0.4.2 
    @expo/cli: 54.0.23 => 54.0.23 
    @expo/ngrok: ^4.1.0 => 4.1.3 
    @expo/vector-icons: ^15.0.3 => 15.1.1 
    @react-native-async-storage/async-storage: 2.2.0 => 2.2.0 
    @stardazed/streams-text-encoding: ^1.0.2 => 1.0.2 
    @tanstack/react-query: catalog: => 5.102.8 
    @types/react: ~19.1.10 => 19.1.17 
    @types/react-dom: ~19.1.7 => 19.1.11 
    @ungap/structured-clone: ^1.3.0 => 1.4.0 
    @workspace/api-client-react: workspace:* => 0.0.0 
    babel-plugin-react-compiler: ^19.0.0-beta-e993439-20250117 => 19.0.0-beta-ebf51a3-20250411 
    expo: ~54.0.37 => 54.0.37 
    expo-application: ~7.0.8 => 7.0.8 
    expo-audio: ~1.1.1 => 1.1.1 
    expo-auth-session: ~7.0.11 => 7.0.11 
    expo-blur: ~15.0.8 => 15.0.8 
    expo-constants: ~18.0.11 => 18.0.14 
    expo-crypto: ~15.0.9 => 15.0.9 
    expo-font: ~14.0.10 => 14.0.12 
    expo-glass-effect: ~0.1.4 => 0.1.10 
    expo-haptics: ~15.0.8 => 15.0.8 
    expo-image: ~3.0.11 => 3.0.11 
    expo-image-picker: ~17.0.9 => 17.0.11 
    expo-linear-gradient: ~15.0.8 => 15.0.8 
    expo-linking: ~8.0.10 => 8.0.12 
    expo-location: ~19.0.8 => 19.0.8 
    expo-router: ~6.0.17 => 6.0.24 
    expo-secure-store: ~15.0.8 => 15.0.8 
    expo-splash-screen: ~31.0.12 => 31.0.13 
    expo-status-bar: ~3.0.9 => 3.0.9 
    expo-symbols: ~1.0.8 => 1.0.8 
    expo-system-ui: ~6.0.9 => 6.0.9 
    expo-web-browser: ~15.0.10 => 15.0.11 
    react: 19.1.0 => 19.1.0 
    react-dom: catalog: => 19.1.0 
    react-native: 0.81.5 => 0.81.5 
    react-native-gesture-handler: ~2.28.0 => 2.28.0 
    react-native-keyboard-controller: 1.18.5 => 1.18.5 
    react-native-qrcode-svg: ^6.3.27 => 6.3.27 
    react-native-reanimated: ~4.1.1 => 4.1.7 
    react-native-safe-area-context: ~5.6.0 => 5.6.2 
    react-native-screens: ~4.16.0 => 4.16.0 
    react-native-svg: 15.12.1 => 15.12.1 
    react-native-web: ^0.21.0 => 0.21.2 
    react-native-webrtc: 124.0.6 => 124.0.6 
    react-native-worklets: 0.5.1 => 0.5.1 
    socket.io-client: 4.8.3 => 4.8.3 
    typescript: ~5.9.2 => 5.9.3 
    zod: catalog: => 3.25.76 
    zod-validation-error: ^3.4.0 => 3.5.4
Vorherrschende Sprache
TypeScript
Sterne
1.8k
Forks
492
Ø Merge
1 T. 7 Std.
Gemergte PRs (30 T.)
357

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus clerk/javascript

Alle Issues in clerk/javascript

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.