Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Works in debug mode but not in release mode #353

Closed
beingshashi opened this issue Sep 13, 2019 · 10 comments
Closed

Works in debug mode but not in release mode #353

beingshashi opened this issue Sep 13, 2019 · 10 comments

Comments

@beingshashi
Copy link

This is working great in debug mode, but the app crashes while making release mode.
I am getting the following error -

2019-09-13 18:45:30.571 7602-7652/? A/example: thread.cc:2165] No pending exception expected: java.lang.ClassNotFoundException: Didn't find class "com.opentok.android.v3.Session$SessionException" on path: DexPathList[[zip file "/data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/lib/arm64, /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/base.apk!/lib/arm64-v8a, /system/lib64]]
2019-09-13 18:45:30.855 7602-7652/? A/example: runtime.cc:562] native: #10 pc 00000000000da6d4 /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/lib/arm64/libopentok.so (JNI_OnLoad+312)
2019-09-13 18:45:31.374 7792-7792/? A/DEBUG: pid: 7602, tid: 7652, name: mqt_native_modu >>> com.example <<<
2019-09-13 18:45:31.374 7792-7792/? A/DEBUG: Abort message: 'thread.cc:2165] No pending exception expected: java.lang.ClassNotFoundException: Didn't find class "com.opentok.android.v3.Session$SessionException" on path: DexPathList[[zip file "/data/app/com.kinektapp.client--S17ODKUbR4oFH5vNXMxWw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/lib/arm64, /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/base.apk!/lib/arm64-v8a, /system/lib64]]'
2019-09-13 18:45:31.487 7792-7792/? A/DEBUG: #6 pc 00000000000da6d4 /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/lib/arm64/libopentok.so (JNI_OnLoad+312)
2019-09-13 18:45:31.487 7792-7792/? A/DEBUG: #18 pc 00000000003255ee /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/oat/arm64/base.vdex (com.opentok.android.v3.g.a.a+42)
2019-09-13 18:45:31.487 7792-7792/? A/DEBUG: #28 pc 0000000000325038 /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/oat/arm64/base.vdex (com.opentok.android.v3.debug.Log.)
2019-09-13 18:45:31.487 7792-7792/? A/DEBUG: #40 pc 0000000000324dd6 /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/oat/arm64/base.vdex (com.opentok.android.v3.debug.d.+30)
2019-09-13 18:45:31.488 7792-7792/? A/DEBUG: #46 pc 0000000000325588 /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/oat/arm64/base.vdex (com.opentok.android.v3.debug.i.a+16)
2019-09-13 18:45:31.488 7792-7792/? A/DEBUG: #56 pc 000000000032293c /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/oat/arm64/base.vdex (com.opentok.android.v3.Session.+4)
2019-09-13 18:45:31.488 7792-7792/? A/DEBUG: #66 pc 0000000000321eec /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/oat/arm64/base.vdex (com.opentok.android.v3.Session$Builder.a+4)
2019-09-13 18:45:31.488 7792-7792/? A/DEBUG: #72 pc 0000000000313638 /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/oat/arm64/base.vdex (com.opentok.android.k.+464)
2019-09-13 18:45:31.488 7792-7792/? A/DEBUG: #78 pc 000000000031315e /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/oat/arm64/base.vdex (com.opentok.android.k$j.a+50)
2019-09-13 18:45:31.488 7792-7792/? A/DEBUG: #84 pc 0000000000326a48 /data/app/com.example--S17ODKUbR4oFH5vNXMxWw==/oat/arm64/base.vdex (com.opentokreactnative.OTSessionManager.initSession+144)

@th317erd
Copy link

Do you have ProGuard stripping something it shouldn't from the final build?

@parasdaryanani
Copy link

This might be a bug in your react-native version, specifically if it's < 0.60.5, as ClassNotFoundException was fixed in this release.

See release notes of RN 0.60.5.

@drewandre
Copy link

drewandre commented Dec 10, 2019

I'm running RN 0.60.5 and seeing this issue. I've had to disable proguard in release mode for now. I tried adding the proguard config as described in this comment, but it threw some crazy R8 errors due to the -dontwarn line. We removed that, but the app still crashes when starting a video. So no more proguard until this is resolved or until someone could point us in the right direction regarding proguard config.

@mayuresh14
Copy link

any update? am facing same issue

@vncmaciel
Copy link

facing the same issue here with 2.17.0

@palmas
Copy link

palmas commented May 22, 2020

Facing the same.
OpenTok team, please, give us correct proguard rules!

@xxsnakerxx
Copy link
Contributor

for 2.17.x

-keep class com.opentok.android.** { *; }
-keep class com.opentok.otc.** { *; }
-keep class org.otwebrtc.** { *; }

-dontwarn com.opentok.android.**
-dontwarn com.opentok.otc.**

for 2.16.x

-keep class com.opentok.android.** { *; }
-keep class org.webrtc.** { *; }

-dontwarn com.opentok.android.**

@KiranRadish
Copy link

Can you please explain where we need to add these lines in react-native project?

@xxsnakerxx
Copy link
Contributor

Can you please explain where we need to add these lines in react-native project?

android/app/proguard-rules.pro

@dp85
Copy link

dp85 commented Jul 9, 2022

In 2.22.1 I also needed to add:

-keep class com.vonage.** { *; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests