I have tested an Expo based React Native app on my phone using the Expo app and it works fine. After building the app for Android (creating the AAB file), I deployed it to the Play Console for testing and see the following error:
Stack trace
global@1:59664
FATAL EXCEPTION: mqt_native_modules
Process: com.soulspark.testpublishapptwo, PID: 3645
com.facebook.react.common.JavascriptException: TypeError: undefined is not a function, js engine: hermes, stack:
anonymous@1:951728
loadModuleImplementation@1:60903
guardedLoadModule@1:60452
metroRequire@1:60080
anonymous@1:805090
loadModuleImplementation@1:60903
guardedLoadModule@1:60452
metroRequire@1:60080
anonymous@1:801528
loadModuleImplementation@1:60903
guardedLoadModule@1:60452
metroRequire@1:60080
anonymous@1:644682
loadModuleImplementation@1:60903
guardedLoadModule@1:60452
metroRequire@1:60080
anonymous@1:644329
loadModuleImplementation@1:60903
guardedLoadModule@1:60452
metroRequire@1:60080
anonymous@1:67303
loadModuleImplementation@1:60903
guardedLoadModule@1:60452
metroRequire@1:60080
anonymous@1:67210
loadModuleImplementation@1:60903
guardedLoadModule@1:60409
metroRequire@1:60080
global@1:59664
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:72)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
at com.facebook.jni.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loop(Looper.java:223)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
at java.lang.Thread.run(Thread.java:923)
How do I debug this error? I'm not sure where to start because I don't know which code line the error corresponds to.
I have tried to:
- Disable hermes
- Add the "debugSymbolLevel" property in order to get better errors
Do let me know if there's any other information I should add here.