daily-co / react-native-daily-js

https://docs.daily.co/reference/rn-daily-js
BSD 2-Clause "Simplified" License
36 stars 13 forks source link

iOS and Android app crashing as soon as it launches #53

Closed ArturV93 closed 7 months ago

ArturV93 commented 7 months ago

Describe the bug (unexpected behavior)

After updating the above packages from:
"@daily-co/react-native-daily-js": "^0.50.0", "@daily-co/react-native-webrtc": "^111.0.0-daily.2" to: "@daily-co/react-native-daily-js": "^0.60.0", "@daily-co/react-native-webrtc": "^118.0.3-daily.1",

I updated the AndroidManifest.xml and Info.plist according to the documentation for the latest package. The app runs smoothly when built on my local machine, but on Bitrise, although the app builds successfully, it crashes immediately upon launch. Downgrading to versions 0.50.0 and 111.0.0 resolves the issue, and the app behaves as expected. However, when it crashes, Sentry fails to capture any logs. I suspect there might be undocumented differences between these two packages. The code I've implemented closely resembles that of react-native-daily-js-playground. Any advice on resolving this issue would be greatly appreciated.

System information

"react-native": "^0.73.4", "react-native-background-timer": "^2.4.1", "@react-native-async-storage/async-storage": "^1.19.3",

Android: buildToolsVersion = "34.0.0" minSdkVersion = 24 compileSdkVersion = 34 targetSdkVersion = 34

iOS: platform: ios, 13.4

Additional context

FATAL EXCEPTION: mqt_native_modules

Unknown

FATAL EXCEPTION: mqt_native_modules Process: *, PID: 32053 com.facebook.react.common.JavascriptException: Error: Native module not found, js engine: hermes, stack: getRandomBase64@1:7466513 getRandomValues@1:7466865 getRandomByte@1:7542420 anonymous@1:7542445 uuid4@1:7542341 generatePropagationContext@1:7578859 Scope@1:7579978 _callSuper@1:7896982 ReactNativeScope@1:7897432 init@1:7893550 anonymous@1:1079692 loadModuleImplementation@1:173769 guardedLoadModule@1:173311 metroRequire@1:172933 anonymous@1:179975 loadModuleImplementation@1:173769 guardedLoadModule@1:173268 metroRequire@1:172933 global@1:172485

at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:65)
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:149)
at com.facebook.jni.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
at java.lang.Thread.run(Thread.java:1012)
filipi87 commented 7 months ago

Hi @ArturV93 ,

This error below suggests that you are missing the dependency of react-native-get-random-values@:

com.facebook.react.common.JavascriptException: Error: Native module not found, js engine: hermes, stack:
getRandomBase64@1:7466513

This requirement has been introduced in react-native-daily-js 0.53.0:

It would also be nice make to update to the latest version of react-native-webrtc:

  "@daily-co/react-native-webrtc": "^118.0.3-daily.2",
ArturV93 commented 7 months ago

Thank you @filipi87, it works now. You can close this issue.