Skip to content

Troubleshooting

If you're running into issues with setting up and using the Expo SDK in your application, check out some common errors below, and how to resolve them.

Failed to base64url decode the payload

If you are able to successfully create embedded wallets for your users and receive the following error:

[JWTInvalid: Failed to base64url decode the payload]
  • First double-check that you are have followed the steps in the SDK setup docs.
  • If you continue to run into this error, ensure that the react-native package in your application is up-to-date.
  • Finally, you can override the atob method necessary for JWT decoding with the following polyfill:
tsx
// Add this to your polyfills file or entrypoint.js
const _atob = atob;
atob = (val) => {
  try {
    _atob(val);
  } catch {
    _atob(val + '=');
  }
};