voxeet / voxeet-uxkit-cordova

Dolby.io UXKit for Cordova
Other
1 stars 14 forks source link

[Bug][Android] App crashes on startup with version 1.5.7 #76

Closed gabides closed 1 year ago

gabides commented 1 year ago

following https://github.com/voxeet/voxeet-uxkit-cordova/issues/74

the android build is now passing but whenever i launch the app on an android device with the latest version (voxeet-uxkit-cordova 1.5.7), the app crashes with the following error:

2022-11-08 18:10:01.268 19423-19423/BUNDLE_ID E/AndroidRuntime: FATAL EXCEPTION: main
    Process: BUNDLE_ID, PID: 19423
    java.lang.RuntimeException: Unable to resume activity {BUNDLE_ID/BUNDLE_ID.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'com.voxeet.uxkit.common.permissions.IRequestPermissions com.voxeet.uxkit.common.activity.IPermissionContractHolder.getRequestPermissions()' on a null object reference
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4444)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4476)
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'com.voxeet.uxkit.common.permissions.IRequestPermissions com.voxeet.uxkit.common.activity.IPermissionContractHolder.getRequestPermissions()' on a null object reference
        at com.voxeet.uxkit.common.activity.VoxeetCommonAppCompatActivityWrapper.onResume(VoxeetCommonAppCompatActivityWrapper.java:94)
        at com.voxeet.toolkit.VoxeetCordova.onResume(VoxeetCordova.java:128)
        at org.apache.cordova.PluginManager.onResume(PluginManager.java:287)
        at com.getcapacitor.cordova.MockCordovaWebViewImpl.handleResume(MockCordovaWebViewImpl.java:155)
        at com.getcapacitor.Bridge.onResume(Bridge.java:1197)
        at com.getcapacitor.BridgeActivity.onResume(BridgeActivity.java:86)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456)
        at android.app.Activity.performResume(Activity.java:8135)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4434)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4476) 
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) 
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:223) 
        at android.app.ActivityThread.main(ActivityThread.java:7656) 
codlab commented 1 year ago

looking at this one right away.

edit : Indeed local dev machine & machine for delivery is out of sync, missing the actual onCreate call from the uxkit's wrapper in the VoxeetCordova class. The fix is on its way via fix/activity_stability_using_uxkit

the testapp works using it, I'll push the 1.5.8. Github actions were on the pipe for some other projects but I'll add also Cordova for this as well

codlab commented 1 year ago

v1.5.8 is available

In parallel, pushing also the update for the test app so that the readme will bring some more info for people who'd want to bring pre-publication tests as well before I push forward actual integration verification and stability via CI