AgoraIO-Extensions / react-native-agora

React Native around the Agora RTC SDKs for Android and iOS agora
https://www.agora.io
MIT License
625 stars 227 forks source link

App crash on initialization: version 4.2.0 #660

Closed Lakshya-Katarmal closed 1 year ago

Lakshya-Katarmal commented 1 year ago

app crashes when using : const engine = createAgoraRtcEngine(); engine.initialize({appId: 'APP_ID'});

LichKing-2234 commented 1 year ago

any crash dump?

Lakshya-Katarmal commented 1 year ago

No, just upgraded the library to the latest version.

LichKing-2234 commented 1 year ago

pls provide the crash log

github-id01 commented 1 year ago

Facing the same issue, the call to initialize returns undefnied in debug mode but doesn't crashes on emulator but on android APK crashes on to call to initialize without giving any error.

github-id01 commented 1 year ago

@Lakshya-Katarmal what was the issue in your case ? Could you please give an explanation.

lFelipePinheiro commented 1 year ago

same problem here,

06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at io.agora.iris.IrisApiEngine.<clinit>(SourceFile:-1) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at io.agora.iris.IrisApiEngine.d(SourceFile:-1) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at io.agora.rtc.ng.react.AgoraRtcNgModule.newIrisApiEngine(SourceFile:-1) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at com.facebook.jni.NativeRunnable.run(Native method) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at android.os.Handler.handleCallback(Handler.java:938) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at android.os.Handler.dispatchMessage(Handler.java:99) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(SourceFile:-1) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at android.os.Looper.loop(Looper.java:255) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(SourceFile:-1) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at java.lang.Thread.run(Thread.java:923) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] Pending exception java.lang.ClassNotFoundException: io.agora.rtc2.internal.RtcEngineImpl 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) (Runtime.java:-2) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:1131) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void java.lang.Runtime.loadLibrary0(java.lang.ClassLoader, java.lang.Class, java.lang.String) (Runtime.java:1085) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void java.lang.Runtime.loadLibrary0(java.lang.Class, java.lang.String) (Runtime.java:1008) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void java.lang.System.loadLibrary(java.lang.String) (System.java:1664) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void io.agora.iris.IrisApiEngine.<clinit>() (SourceFile:-1) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void io.agora.iris.IrisApiEngine.d(boolean) (SourceFile:-1) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at boolean io.agora.rtc.ng.react.AgoraRtcNgModule.newIrisApiEngine() (SourceFile:-1) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void com.facebook.jni.NativeRunnable.run() (SourceFile:-2) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:938) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(android.os.Message) (SourceFile:-1) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void android.os.Looper.loop() (Looper.java:255) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run() (SourceFile:-1) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] at void java.lang.Thread.run() (Thread.java:923) 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:655] 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:663] JNI DETECTED ERROR IN APPLICATION: java_class == null 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:663] in call to GetStaticMethodID 06-20 16:43:20.784 23863 23943 F overstress.com: runtime.cc:663] from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) 06-20 16:43:20.784 23863 23943 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 23943 (mqt_js), pid 23863 (overstress.com)

LichKing-2234 commented 1 year ago

seem like it is a proguard issue. pls refer to https://developer.android.com/build/shrink-code#keep-code, and keep our class