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

React Native @clerk/clerk-expo is not working as expected #3339

Closed
4 tasks done
SherifMoShalaby opened this issue May 7, 2024 · 20 comments
Closed
4 tasks done

React Native @clerk/clerk-expo is not working as expected #3339

SherifMoShalaby opened this issue May 7, 2024 · 20 comments

Comments

@SherifMoShalaby
Copy link

SherifMoShalaby commented May 7, 2024

Preliminary Checks

Reproduction

https://github.com/Galaxies-dev/whatsapp-clone-react-native

Publishable key

pk_test_cG93ZXJmdWwtcGVnYXN1cy0yNi5jbGVyay5hY2NvdW50cy5kZXYk

Description

Steps to reproduce:

  1. Clone the provided Repo
  2. add .env file & add EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY={the one provided in the issue from the "Publishable key"}
  3. npm install
  4. npx expo run:ios

Expected behavior:

The application to work as before adding the ``````

Actual behavior:

After adding

<ClerkProvider publishableKey={process.env.clerkPublishableKey}>

The application is now giving me: "cannot find native module ExpoApplication"

328293412-75b15489-c4e0-4369-9a6e-2d2ffc55ce2d

Environment

System:
    OS: macOS 14.4.1
    CPU: (12) arm64 Apple M2 Max
    Memory: 5.13 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.2 - ~/.nvm/versions/node/v18.20.2/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v18.20.2/bin/npm
    Watchman: 2024.04.22.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 124.0.6367.119
    Safari: 17.4.1
@SherifMoShalaby SherifMoShalaby added the needs-triage A ticket that needs to be triaged by a team member label May 7, 2024
@sudowoodo200
Copy link

Just keep installing the packages. Seems like the @clerk/clerk-expo package doesn't declare all the native expo packages needed. Every time you see the error, run npx expo install expo-application (or expo-xxxx), rebuild and repeat until errors disappear

@shifenis
Copy link

shifenis commented May 8, 2024

Get the same error and to fix it I added different packages, but then I get:

Error: Not a valid base64 encoded string length

This error is located at:
    in ClerkProvider (created by RootLayoutNav)
   ...

Probably Expo 51 isn't supported yet for Clerk (?)

@statico
Copy link

statico commented May 8, 2024

Possibly related, but no idea: expo/expo#26570 (comment)

@NikoEscobar
Copy link

Get the same error and to fix it I added different packages, but then I get:

Error: Not a valid base64 encoded string length

This error is located at:
    in ClerkProvider (created by RootLayoutNav)
   ...

Probably Expo 51 isn't supported yet for Clerk (?)

Right after upgrading the Expo from 50 to 51
I'm receiving the same error Error: Not a valid base64 encoded string length

No code changes besides following Expo steps to upgrade that is, installing latest and install --fix

@statico
Copy link

statico commented May 8, 2024

If you're getting Error: Not a valid base64 encoded string length, it seems to be related to Expo v51. The Clerk team is aware of it and working on a fix. Current discussion is on Discord here: https://discord.com/channels/856971667393609759/1234973673946087534

@vflorrez1
Copy link

If you're getting Error: Not a valid base64 encoded string length, it seems to be related to Expo v51. The Clerk team is aware of it and working on a fix. Current discussion is on Discord here: https://discord.com/channels/856971667393609759/1234973673946087534

@statico I am not able to see this discussion, does it still exist?

@leo-mangold
Copy link

Any updates on this? I would really like to be able to use my app again with sdk 51

@csulit

This comment was marked as off-topic.

@statico
Copy link

statico commented May 10, 2024

@statico I am not able to see this discussion, does it still exist?

@vflorrez1 @leo-mangold You have to be a member of the Clerk Discord to see it. There doesn't appear to be a fixed invite URL (thanks, Discord) but Googling found me this: https://discord.com/invite/b5rXHjAg7A

There's a PR in progress: #3354

@2salted
Copy link

2salted commented May 10, 2024

I'm having very similar problems like this just submitted an issue aswell

@soufianeelc
Copy link

I'm facing the same problem as well

@thiskevinwang
Copy link
Contributor

thiskevinwang commented May 10, 2024

Potentially resolved by #3326, which removes expo-application as a peer dependency.

@kwojtkowiak
Copy link

I can confirm that this resolves the issue!

@thiskevinwang thiskevinwang self-assigned this May 12, 2024
@LekoArts
Copy link
Member

This should be fixed by #3326 and was published with @clerk/[email protected].

Please install the latest version of @clerk/clerk-expo in order to fix your issue:

npm install @clerk/clerk-expo@latest

@LekoArts LekoArts added confirmed and removed needs-triage A ticket that needs to be triaged by a team member labels May 13, 2024
@thiskevinwang thiskevinwang removed their assignment May 13, 2024
@ravishukla21
Copy link

This issue is not yet resolved as of today 14may2024 if any one find the solution please help here

@csulit
Copy link

csulit commented May 14, 2024

This issue is not yet resolved as of today 14may2024 if any one find the solution please help here

It was fixed on the latest version.

@ravishukla21
Copy link

This issue is not yet resolved as of today 14may2024 if any one find the solution please help here

It was fixed on the latest version.

Thanks for reply i will check and inform you

@2salted
Copy link

2salted commented May 15, 2024

run: npm install @clerk/clerk-expo@latest
its fixed now

@SherifMoShalaby
Copy link
Author

run: npm install @clerk/clerk-expo@latest its fixed now

It didn't actually :)

@SherifMoShalaby
Copy link
Author

This should be fixed by #3326 and was published with @clerk/[email protected].

Please install the latest version of @clerk/clerk-expo in order to fix your issue:

npm install @clerk/clerk-expo@latest

Still not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests