React Native Quick Start Not Working

I created a new React Native project using expo init as instructed on their website:

I chose the most minimal setup. The only changes I have made to the initial project was to install a couple of packages and create a .eslintrc.json file.

I then followed the instructions outlined in the auth0 react native quick start guide:

I read through this document a dozen times and have started the process from scratch three full times.

I have tried running npx react-native link from the root folder.

Separately, I have tried running pod install from the ios folder. This adds 5000+ files to my project, is that right? Should these be checked in or added to the .getignore?

I start my project by running expo start and I am able to run the project in both ios and android emulators. However, when I click the link to login with auth0 I get the following error message in the VS Code console for both ios and android:

Missing NativeModule. React Native versions 0.60 and up perform auto-linking. Please see https://github.com/react-native-community/cli/blob/master/docs/autolinking.md.
- node_modules/react-native-auth0/src/webauth/agent.js:37:10 in newTransaction
- node_modules/react-native-auth0/src/webauth/index.js:60:11 in authorize
* App.js:19:17 in <unknown>
- node_modules/react-native/Libraries/Components/Touchable/TouchableOpacity.js:235:45 in touchableHandlePress
* [native code]:null in touchableHandlePress
- node_modules/react-native/Libraries/Components/Touchable/Touchable.js:878:34 in _performSideEffectsForTransition
* [native code]:null in _performSideEffectsForTransition
- node_modules/react-native/Libraries/Components/Touchable/Touchable.js:777:44 in _receiveSignal
* [native code]:null in _receiveSignal
- node_modules/react-native/Libraries/Components/Touchable/Touchable.js:488:24 in touchableHandleResponderRelease
* [native code]:null in touchableHandleResponderRelease
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:93:15 in invokeGuardedCallbackImpl
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:318:36 in invokeGuardedCallback
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:342:30 in invokeGuardedCallbackAndCatchFirstError
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:715:42 in executeDispatch
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:737:20 in executeDispatchesInOrder
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:894:29 in executeDispatchesAndRelease
* [native code]:null in forEach
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:874:16 in forEachAccumulated
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:1050:21 in runEventsInBatch
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:1072:19 in runExtractedEventsInBatch
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:2708:6 in <unknown>
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:18527:14 in batchedUpdates$1
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:2611:31 in batchedUpdates
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:2706:17 in _receiveRootNodeIDEvent
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:2782:28 in receiveTouches
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:366:47 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:106:26 in <unknown>
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:314:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:105:17 in callFunctionReturnFlushedQueue
* [native code]:null in callFunctionReturnFlushedQueue

Please help, I have no idea what else to try. Thanks!

The current Expo SDK uses React 0.59 and auto linking isn’t supported until 0.60. So if you want to use Auth0 in a new React Native project you will need to follow the React Native CLI Quickstart instructions and cannot use Expo. It would be great if you could add this to your guide.

Hey there @jtodd!

Thanks a lot for reporting that. Can I ask you to raise it as an issue in the React Native Quickstart repo so that the repo maintainers can look at that? This would be the most effective way to handle that. Make sure to provide the context you provided here with the logs data you attached. Once you open it please make sure to copy paste the link to the issue here so I can ping the repo maintainers, thank you!

Hey there!

Have you had a chance to raise the issue on GitHub in the meantime?

I’m sorry, what repo are you referring to? This one?

Yes. That’s the repo from the quickstart.

Have you had a chance to open an issue there? If so can you share the link here? Thank you!

https://github.com/auth0-samples/auth0-react-native-sample/issues/30

1 Like

Thanks I will ping repo maintainers!

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