Welcome to the Kinde community.

P
K
A
A
A

Expo kindle error metro error uuidv4 not a function

Using Kinde in Expo/React-Native and I'm getting the following error in the Web side of things. Anyone have this issue and know what to do?

Metro error: (0 , _expoModulesCore.uuidv4) is not a function

  2 | import { ExecutionEnvironment, } from './Constants.types';
  3 | const ID_KEY = 'EXPO_CONSTANTS_INSTALLATION_ID';
> 4 | const _sessionId = uuidv4();
    |                          ^
  5 | function getBrowserName() {
  6 |     if (Platform.isDOMAvailable) {
  7 |         const agent = navigator.userAgent.toLowerCase();

Call Stack
  factory (node_modules/@kinde-oss/react-native-sdk-0-7x/node_modules/expo-constants/build/ExponentConstants.web.js:4:26)
  loadModuleImplementation (node_modules/metro-runtime/src/polyfills/require.js:277:5)
  guardedLoadModule (node_modules/metro-runtime/src/polyfills/require.js:184:12)
  require (node_modules/metro-runtime/src/polyfills/require.js:92:7)
  factory (node_modules/@kinde-oss/react-native-sdk-0-7x/node_modules/expo-constants/build/Constants.js:4)
  loadModuleImplementation (node_modules/metro-runtime/src/polyfills/require.js:277:5)
  guardedLoadModule (node_modules/metro-runtime/src/polyfills/require.js:184:12)
  require (node_modules/metro-runtime/src/polyfills/require.js:92:7)
  factory (node_modules/@kinde-oss/react-native-sdk-0-7x/dist/SDK/Utils.js:1:856)
  loadModuleImplementation (node_modules/metro-runtime/src/polyfills/require.js:277:5)
λ Bundled 6ms node_modules/expo-router/node/render.js (1 module)

P
L
10 comments

Hi Lee,

Apologies for getting the error. I will have to get a team member to review this. Have you tried our Expo SDK? https://github.com/kinde-oss/expo

Ah, I didn't realise that. In your docs it only mentioned the one I have installed https://docs.kinde.com/developer-tools/sdks/native/expo-react-native/

Hi Andre, I've implemented this one rather than the react-native now. I have a VERY basic app that I'm just playing around with. I've done a preview build and deployed from Expo, however when tapping the Log in or Sign up button, and when I'm expecting the popup that says XXX Wants to use XXX.com to sign in, the app crashes. I'm fairly new to all things expo and react native so unsure how to fully debug this, but any ideas?

This is the popup I'm meaning. When using Expo Go on the device, or in the simulator, things work as expected

Attachment
Screenshot 2024-10-12 at 3.22.14 PM.png

HI Team. I've stripped this right back to just a button that fires the login and it crashes the app everytime, Are we use that the Expo SDK is working?

Ok. So I can confirm that including the Expo SDK in react native crashes the app as soon as you load any view with it in. I've removed it completely and started using the react-native-sdk-0-7x package, and it works as expected now

Thanks for the update . The Expo SDK was released as working, so we will need to dig into why you are seeing this issue.

So now that you have moved back to the RN SDK, do you see your original issue?

Hi Andre, No. Now that I've moved back to the RN SDK, everything is working as expected.

It seems that even importing the package into a file (even if you aren't using anything from it) crashes the app as well

Great to hear. Thanks for the extra details. We will look into it, and if you have time, feel free to make an issue on the Github repo.

Add a reply
Sign up and join the conversation on Slack
Join