Hello Okta Support,
I’m encountering a runtime error while integrating Okta into my React Native (Typescript) Android application. The error occurs during the initialization phase and prevents the app from proceeding with authentication.
Error Message:
Code
TypeError: Cannot read property 'createConfig' of null
at createConfigWithCallbacks (index.bundle:194216:60)
at createConfig (index.bundle:194246:25)
at initOkta (index.bundle:193874:28)
...
Environment Details:
-
Platform: Android
-
Framework: React Native - Typescript
-
package used: @okta/okta-react-native
Steps Taken:
-
Followed Okta React Native SDK setup instructions
-
Verified native module linking
-
Confirmed that
createConfigis being called with valid parameters
Suspected Cause: It appears that the native module may not be properly initialized or is returning null, causing createConfig to fail. This might be related to auto-linking or incorrect setup in MainApplication.java.
Request: Could you please help identify the root cause or suggest steps to resolve this issue? Any guidance on debugging native module initialization for Okta in React Native would be appreciated.
Note : we also tried react-native-app-auth package, it is also giving authorize is undefined.
Thank you!