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

App crashes on release mode #206

Closed
abbas2501 opened this issue Nov 8, 2021 · 12 comments
Closed

App crashes on release mode #206

abbas2501 opened this issue Nov 8, 2021 · 12 comments

Comments

@abbas2501
Copy link

abbas2501 commented Nov 8, 2021

Works fine on the debug modem however it crashes when running on release mode.

Proguard rules are intact and copied from the example project.

Is there anything I'm missing ?

My app/build.gradle dependencies -

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.github.100mslive:android-sdk:2.1.4'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
}

flutter doctor -

[✓] Flutter (Channel stable, 2.2.3, on macOS 11.6 20G165 darwin-arm, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.61.2)
[✓] Connected device (2 available)
@ygit
Copy link
Member

ygit commented Nov 8, 2021

@abbas2501 can you share your build.gradle file?

@ygit
Copy link
Member

ygit commented Nov 8, 2021

dependencies {
    ...
    implementation 'com.github.100mslive:android-sdk:2.1.8'
    ...
}

@abbas2501 can you try updating the android-sdk to 2.1.8

@abbas2501
Copy link
Author

abbas2501 commented Nov 8, 2021

Same result - Here are the logs --

I/flutter (20187): joining meeting in android
I/flutter (20187): failed to join - PlatformException(error, null, null, java.lang.NullPointerException
I/flutter (20187):      at h.a.a.t.i(HmssdkFlutterPlugin.kt:1)
I/flutter (20187):      at h.a.a.t.onMethodCall(HmssdkFlutterPlugin.kt:124)
I/flutter (20187):      at g.a.d.a.w.a(MethodChannel.java:2)
I/flutter (20187):      at io.flutter.embedding.engine.l.f.e(DartMessenger.java:3)
I/flutter (20187):      at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:2)
I/flutter (20187):      at android.os.MessageQueue.nativePollOnce(Native Method)
I/flutter (20187):      at android.os.MessageQueue.next(MessageQueue.java:335)
I/flutter (20187):      at android.os.Looper.loop(Looper.java:183)
I/flutter (20187):      at android.app.ActivityThread.main(ActivityThread.java:8063)
I/flutter (20187):      at java.lang.reflect.Method.invoke(Native Method)
I/flutter (20187):      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
I/flutter (20187):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
I/flutter (20187): )
E/flutter (20187): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: PlatformException(error, null, null, java.lang.NullPointerException
E/flutter (20187):      at h.a.a.t.i(HmssdkFlutterPlugin.kt:1)
E/flutter (20187):      at h.a.a.t.onMethodCall(HmssdkFlutterPlugin.kt:124)
E/flutter (20187):      at g.a.d.a.w.a(MethodChannel.java:2)
E/flutter (20187):      at io.flutter.embedding.engine.l.f.e(DartMessenger.java:3)
E/flutter (20187):      at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:2)
E/flutter (20187):      at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (20187):      at android.os.MessageQueue.next(MessageQueue.java:335)
E/flutter (20187):      at android.os.Looper.loop(Looper.java:183)
E/flutter (20187):      at android.app.ActivityThread.main(ActivityThread.java:8063)
E/flutter (20187):      at java.lang.reflect.Method.invoke(Native Method)
E/flutter (20187):      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
E/flutter (20187):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
E/flutter (20187): )
E/flutter (20187): #0      Repository100ms.join (package:videopoc/100ms/100ms_repository.dart:88)
E/flutter (20187): <asynchronous suspension>
E/flutter (20187): 
E/AndroidRuntime(20187): FATAL EXCEPTION: pool-5-thread-1
E/AndroidRuntime(20187): Process: in.zuzu.videopoc, PID: 20187
E/AndroidRuntime(20187): java.lang.IllegalAccessError: Illegal class access: 'live.hms.video.signal.init.InitService' attempting to access 'kotlinx.coroutines.v' (declaration of 'live.hms.video.signal.init.InitService' appears in /data/app/~~OST-0LR3vADKtYmgrToMuQ==/in.zuzu.videopoc-NP6cb98EBpZpY6zWuy_Xog==/base.apk)
E/AndroidRuntime(20187):        at live.hms.video.signal.init.InitService.fetchInitConfig(InitService.kt:7)
E/AndroidRuntime(20187):        at live.hms.video.signal.init.InitService.fetchInitConfig$default(InitService.kt:1)
E/AndroidRuntime(20187):        at live.hms.video.transport.HMSTransport.internalConnect(HMSTransport.kt:5)
E/AndroidRuntime(20187):        at live.hms.video.transport.HMSTransport.connect(HMSTransport.kt:5)
E/AndroidRuntime(20187):        at live.hms.video.sdk.SDKDelegate$join$2$1$1.invokeSuspend(SDKDelegate.kt:5)
E/AndroidRuntime(20187):        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
E/AndroidRuntime(20187):        at kotlinx.coroutines.P.run(DispatchedTask.kt:18)
E/AndroidRuntime(20187):        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
E/AndroidRuntime(20187):        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/AndroidRuntime(20187):        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
E/AndroidRuntime(20187):        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(20187):        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(20187):        at java.lang.Thread.run(Thread.java:923)

@chiraghashtech
Copy link

same error

@abbas2501
Copy link
Author

@ygit waiting upon your reply!

@ygit
Copy link
Member

ygit commented Nov 9, 2021

@abbas2501 we are working on this. Will update when we have a fix for this

@jashan1498
Copy link
Contributor

jashan1498 commented Nov 9, 2021

E/AndroidRuntime(20187): java.lang.IllegalAccessError:

Illegal class access:

'live.hms.video.signal.init.InitService' attempting to access 'kotlinx.coroutines.v' (declaration of 'live.hms.video.signal.init.InitService' appears in /data/app/~~OST-0LR3vADKtYmgrToMuQ==/in.zuzu.videopoc-NP6cb98EBpZpY6zWuy_Xog==/base.apk)

---- @abbas2501 , "InitService" this file seems to be getting obfuscated by proguard or is in a different jar and classloader , did you try using "-keepnames" in your example app's proguard file to prevent obfuscation of this file and try again ?

cc : @ygit

@ygit
Copy link
Member

ygit commented Nov 10, 2021

@abbas2501 were you able to resolve this issue?

@abbas2501
Copy link
Author

@abbas2501 were you able to resolve this issue?

We are testing the proof of concept app in debug mode at the moment. If all functions well, i'll try this fix.

@ygit
Copy link
Member

ygit commented Nov 11, 2021

@abbas2501 alright. Let us know if you face this issue again. Closing for now.

@ygit ygit closed this as completed Nov 11, 2021
@abbas2501
Copy link
Author

Apparently, on the latest flutter, latest hmssdk_flutter, the issue got resolved without doing anything else.

@ygit
Copy link
Member

ygit commented Dec 6, 2021

great!

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

4 participants