Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Error with Clerk Authentication in Expo Preview Build #5201

Open
4 tasks done
dixitpriyanshu opened this issue Feb 19, 2025 · 3 comments
Open
4 tasks done

Network Error with Clerk Authentication in Expo Preview Build #5201

dixitpriyanshu opened this issue Feb 19, 2025 · 3 comments
Labels
needs-reproduction Awaiting a minimal reproduction

Comments

@dixitpriyanshu
Copy link

dixitpriyanshu commented Feb 19, 2025

Preliminary Checks

Reproduction

https://github.com/dixitpriyanshu/client

Publishable key

pk_test_dG91Y2hlZC1wdW1hLTY5LmNsZXJrLmFjY291bnRzLmRldiQ

Description

Steps to reproduce:

  1. Set up Clerk authentication in an Expo app.
  2. Build a preview build (expo build:ios or expo build:android) or using EAS.
  3. Attempt to use Clerk authentication in the preview build.

Expected behavior:

Clerk authentication should work as expected without errors, similar to the Expo Go or development build.

Actual behavior:

When running the preview build, a network error occurs every time while attempting to authenticate with Clerk. This issue does not occur in Expo Go or the development build.

Logcat error log from Android Studio:

2025-02-19 20:54:41.745 15720-15776 ReactNativeJS           app.pyrella.lazyshopper              I  {
                                                                                                      "code": "network_error",
                                                                                                      "clerkRuntimeError": true,
                                                                                                      "name": "ClerkRuntimeError"
                                                                                                    }
2025-02-19 20:54:41.745 15720-15776 ReactNativeJS           app.pyrella.lazyshopper              E  Network error occurred!
2025-02-19 20:54:41.746 15720-15776 ReactNativeJS           app.pyrella.lazyshopper              E  {
                                                                                                      "code": "network_error",
                                                                                                      "clerkRuntimeError": true,
                                                                                                      "name": "ClerkRuntimeError"
                                                                                                    }
2025-02-19 20:54:41.751 15720-15777 unknown:ReactNative     app.pyrella.lazyshopper              E  console.error: Network error occurred!, stack:
                                                                                                    _construct@1:92041
                                                                                                    Wrapper@1:91695
                                                                                                    _callSuper@1:89696
                                                                                                    SyntheticError@1:91182
                                                                                                    reactConsoleErrorHandler@1:90843
                                                                                                    ?anon_0_@1:1568346
                                                                                                    asyncGeneratorStep@1:471527
                                                                                                    _throw@1:471832
2025-02-19 20:54:41.752 15720-15777 unknown:ReactNative     app.pyrella.lazyshopper              E  console.error: {
                                                                                                      "code": "network_error",
                                                                                                      "clerkRuntimeError": true,
                                                                                                      "name": "ClerkRuntimeError"
                                                                                                    }, stack:
                                                                                                    _construct@1:92041
                                                                                                    Wrapper@1:91695
                                                                                                    _callSuper@1:89696
                                                                                                    SyntheticError@1:91182
                                                                                                    reactConsoleErrorHandler@1:90843
                                                                                                    ?anon_0_@1:1568419
                                                                                                    asyncGeneratorStep@1:471527
                                                                                                    _throw@1:471832
Image

Environment

System:
    OS: macOS 15.3.1
    CPU: (8) arm64 Apple M1
    Memory: 119.13 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.3.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.8.1 - /usr/local/bin/npm
    pnpm: 10.4.1 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 133.0.6943.99
    Safari: 18.3
  npmPackages:
    @babel/core: ^7.25.2 => 7.26.9 
    @clerk/clerk-expo: ^2.7.7 => 2.7.7 
    @clerk/types: ^4.46.0 => 4.46.0 
    @expo/vector-icons: ^14.0.2 => 14.0.4 
    @react-navigation/bottom-tabs: ^7.2.0 => 7.2.0 
    @react-navigation/native: ^7.0.14 => 7.0.14 
    @types/jest: ^29.5.12 => 29.5.14 
    @types/react: ~18.3.12 => 18.3.18 
    @types/react-test-renderer: ^18.3.0 => 18.3.1 
    expo: ~52.0.35 => 52.0.35 
    expo-auth-session: ~6.0.3 => 6.0.3 
    expo-blur: ~14.0.3 => 14.0.3 
    expo-camera: ~16.0.16 => 16.0.16 
    expo-constants: ~17.0.6 => 17.0.6 
    expo-crypto: ~14.0.2 => 14.0.2 
    expo-dev-client: ~5.0.12 => 5.0.12 
    expo-font: ~13.0.3 => 13.0.3 
    expo-haptics: ~14.0.1 => 14.0.1 
    expo-linking: ~7.0.5 => 7.0.5 
    expo-network: ~7.0.5 => 7.0.5 
    expo-router: ~4.0.17 => 4.0.17 
    expo-secure-store: ~14.0.1 => 14.0.1 
    expo-splash-screen: ~0.29.22 => 0.29.22 
    expo-sqlite: ~15.1.2 => 15.1.2 
    expo-status-bar: ~2.0.1 => 2.0.1 
    expo-symbols: ~0.2.2 => 0.2.2 
    expo-system-ui: ~4.0.8 => 4.0.8 
    expo-updates: ~0.26.18 => 0.26.18 
    expo-web-browser: ~14.0.2 => 14.0.2 
    jest: ^29.2.1 => 29.7.0 
    jest-expo: ~52.0.4 => 52.0.4 
    react: 18.3.1 => 18.3.1 
    react-dom: 18.3.1 => 18.3.1 
    react-native: 0.76.7 => 0.76.7 
    react-native-gesture-handler: ~2.20.2 => 2.20.2 
    react-native-qrcode-svg: ^6.3.14 => 6.3.14 
    react-native-reanimated: ~3.16.1 => 3.16.7 
    react-native-safe-area-context: 4.12.0 => 4.12.0 
    react-native-screens: ~4.4.0 => 4.4.0 
    react-native-svg: 15.8.0 => 15.8.0 
    react-native-web: ~0.19.13 => 0.19.13 
    react-native-webview: 13.12.5 => 13.12.5 
    react-test-renderer: 18.3.1 => 18.3.1 
    reconnecting-websocket: ^4.4.0 => 4.4.0 
    tinybase: ^5.4.8 => 5.4.8 
    typescript: ^5.3.3 => 5.7.3
@dixitpriyanshu dixitpriyanshu added the needs-triage A ticket that needs to be triaged by a team member label Feb 19, 2025
@LekoArts LekoArts added needs-reproduction Awaiting a minimal reproduction and removed needs-triage A ticket that needs to be triaged by a team member labels Feb 24, 2025
@LekoArts
Copy link
Member

Hi!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.

Thanks for using Clerk!

@dixitpriyanshu
Copy link
Author

Hii,
I have already added the repository for the reproduction of the issues, I am adding the link of the repo in comment too.
https://github.com/dixitpriyanshu/client

@LekoArts
Copy link
Member

Please read the requirements in the linked doc: https://clerk.com/docs/troubleshooting/create-a-minimal-reproduction

  • Is based off one of the templates above and contains a minimal reproduction or has been stripped down to the bare minimum code needed to reproduce the issue
  • Is not a link of a full featured app or branch within an app were an error is occurring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-reproduction Awaiting a minimal reproduction
Projects
None yet
Development

No branches or pull requests

2 participants