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

Android app crashes on navigating back from MiniApps #1789

Open
faisalmohd83 opened this issue Mar 31, 2021 · 1 comment
Open

Android app crashes on navigating back from MiniApps #1789

faisalmohd83 opened this issue Mar 31, 2021 · 1 comment

Comments

@faisalmohd83
Copy link

Hi,

The generated container includes all miniapps and attached to the Android native app as a library (submodule). The MiniApps are accessible and navigating to the same using startActivity(). the forward navigation works partially but on Back button/action from miniapp crashes with below exception:

E/MessageQueue-JNI: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.facebook.react.ReactDelegate.onBackPressed()' on a null object reference
        at com.facebook.react.ReactActivityDelegate.onBackPressed(ReactActivityDelegate.java:140)
        at com.walmartlabs.ern.container.ElectrodeMiniAppActivity.onBackPressed(ElectrodeMiniAppActivity.java:96)
        at android.app.Activity.onKeyUp(Activity.java:3644)
        at com.walmartlabs.ern.container.ElectrodeMiniAppActivity.onKeyUp(ElectrodeMiniAppActivity.java:113)
       

Also, noticed the below issue while navigating to miniapps from native.

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.facebook.react.ReactDelegate.onHostPause()' on a null object reference
        at com.facebook.react.ReactActivityDelegate.onPause(ReactActivityDelegate.java:95)
        at com.walmartlabs.ern.container.ElectrodeReactActivityDelegate.onPause(ElectrodeReactActivityDelegate.java:230)
        at com.walmartlabs.ern.container.ElectrodeMiniAppActivity.onPause(ElectrodeMiniAppActivity.java:70)
        at android.app.Activity.performPause(Activity.java:7985)
@faisalmohd83
Copy link
Author

@deepueg @friederbluemle

Following android-showcase tutorial, the ReactActivityDelegate is unable to access from ElectrodeReactActivityDelegate.BackKeyHandler in ElectrodeCoreActivity.

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

1 participant