TypeError: can't access property "hasValidAuth0Instance", nativeModule is undefined

I’m trying to setup Authentication going through this tutorial: Auth0 Expo SDK Quickstarts: Login

The Login is working when running expo run:android

The Android App runs, and redirects properly to the Login Page, afterwards I log in using my auth0 account and it redirects me back properly to Android, I can see the Token and read the information in it (Email, etc). All good on this side

However the Web version runs (expo start --web) but is stuck on Loading…, in the Console in my browser I find this:

Uncaught (in promise) TypeError: can't access property "hasValidAuth0Instance", nativeModule is undefined
    _ensureNativeModuleIsInitialized2 nativeHelper.js:5
    Babel 4
        asyncGeneratorStep
        _next
        _asyncToGenerator
        _asyncToGenerator
nativeHelper.js:5:10
    Babel 6
        asyncGeneratorStep
        _throw
        (Async: promise callback)
    asyncGeneratorStep
        _next
        _asyncToGenerator
        _asyncToGenerator
    Auth0Provider auth0-provider.js:78
    React 11
    (Async: EventHandlerNonNull)
    <anonymous> AppEntry.bundle:11666
    <anonymous> React
    loadModuleImplementation require.js:283
    guardedLoadModule require.js:182
    metroRequire require.js:91
    <anonymous> React
    loadModuleImplementation require.js:283
    guardedLoadModule require.js:182
    metroRequire require.js:91
    React 2
    loadModuleImplementation require.js:283
    guardedLoadModule require.js:182
    metroRequire require.js:91
    <anonymous> React
    loadModuleImplementation require.js:283
    guardedLoadModule require.js:182
    metroRequire require.js:91
    <anonymous> index.js:2
    loadModuleImplementation require.js:283
    guardedLoadModule require.js:182
    metroRequire require.js:91
    <anonymous> index.js:14
    loadModuleImplementation require.js:283
    guardedLoadModule require.js:182
    metroRequire require.js:91
    <anonymous> registerRootComponent.js:3
    loadModuleImplementation require.js:283
    guardedLoadModule require.js:182
    metroRequire require.js:91
    <anonymous> AppEntry.js:5
    loadModuleImplementation require.js:283
    guardedLoadModule require.js:182
    metroRequire require.js:91
    <anonymous> AppEntry.bundle:67210

Thanks in advance for any help!

1 Like

Did you find a solution to this? I am facing the same thing @serafdev

same here, anybody able to fix this?

Any updates on this? I’m getting it with Expo, react-native-web, and expo-router

The docs don’t really account for expo router so I was wondering if that is part of the issue

What did you end up doing?

I had to change the ios target deployment version to 13.0 in my podfile, then auth0 worked