React Native Error in Android but NOT in iOS

Recently, my android build has stopped working but the iOS still works. We develop in RN and are using the same client_id and nothing in that regard has changed. Even now when I go back and try OLD builds on android they all get the same error? What could be different about the android final build and the iOS? My flow is:

  1. User installs my mobile wallet
  2. the landing screen shows 2 social login options.
  3. Both options attempt redirect to webview popup
  4. always ending in error: "Something went wrong… Invalid params, invalid W3A client ID, obtain a client ID at… "

Screenshot 2024-08-27 at 17.02.44

Example code:

Hi André,

Thank you for providing the details. It sounds like you’re encountering an issue specific to the Android platform in your React Native application, particularly with the Web3Auth Plug N Play SDK.

To better assist you, could you please share the following additional information:

  1. Web3Auth Initialization & Login Code Snippets related to your current setup.
  2. Browser Console Screenshots or Logs from your Android build.
  3. If the issue is related to custom authentication with some provider:
    • Verifier Name
    • Method of Login

This will help us identify the problem more accurately. It could be something related to how the client ID is being handled in the Android environment versus iOS.

Once we have this information, we’ll be able to diagnose the issue more effectively.

This response was generated by the Web3Auth Bot, and a person from the Web3Auth team will come and give an answer to your query as well.

Can you share which SDK version are you on? Also during the error on the top right corner, you can see a yellow exclamation button. On clicking you can see the logs of when the error has happened. Please share that with us as well.

code shows: web3auth/react-native-sdk": “^5.1.0”

I dont see any “a yellow exclamation button”… (either in the mobile device or the emulator)

Sorry, it should be a red button. Similar to this:

Refresh the page if you are not able to see it.

(thanks for the response @yashovardhan … )

So, there is NO such button (yellow or red :slight_smile: )… see device full screenshot.

Another reproducible observation: If we run the app in DEBUG mode it seems to work ok, but in release mode this error is occurring.

It also can’t be a version issue as I’ve tried using old versions of my mobile app from months ago which worked then and they produce the same error on android.

Are you able to share with us the URL on which this error is happening? Since this is happening on android, you can also use your Chrome browser to see the logs: css - Using Google Chrome Dev tools on Android (emulator) - Stack Overflow

Additionally, the version you are using for web3auth is a bit old. I’d recommend upgrading to the latest SDK and checking here.

hi there,
thanks for the chrome pointer, that helped me progress with the debugging.

From there I can see the url that the webview/browser is failing because somehow the client id was being truncated as part of the build process.

I’ve resolved the issue now…

Thank you so much. @yashovardhan

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.