electrode-native icon indicating copy to clipboard operation
electrode-native copied to clipboard

backPressed results in app Crash

Open faisalmohd83 opened this issue 3 years ago • 4 comments

My native Android app crashes when returns from miniapp UI. Does it cause any missing dependencies?

crash trace below:

2021-03-11 16:23:00.222 12283-12283/tech.essemsys.enpocapp E/AndroidRuntime: FATAL EXCEPTION: main Process: tech.essemsys.enpocapp, PID: 12283 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:3641) at com.walmartlabs.ern.container.ElectrodeMiniAppActivity.onKeyUp(ElectrodeMiniAppActivity.java:113) at android.view.KeyEvent.dispatch(KeyEvent.java:2825) at android.app.Activity.dispatchKeyEvent(Activity.java:3958) at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:367) at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:5413) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5281) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4788)

faisalmohd83 avatar Mar 11 '21 16:03 faisalmohd83

@friederbluemle any sample app (iOS/Android) showcases Navigation between Native <> MiniApp?

faisalmohd83 avatar Mar 15 '21 15:03 faisalmohd83

@faisalmohd83 Thanks for reporting this. ElectrodeMiniAppActivity is deprecated and replaced with ElectrodeBaseActivity. Can you please update your activity to extend this ?

Meanwhile, I will keep this issue open and remove ElectrodeMiniAppActivity reference from the container.

deepueg avatar Mar 15 '21 19:03 deepueg

@deepueg Issue caused while trying Navigation between MoviesListMiniApp and MovieDetailsMiniApp. Does it mean to use any particular branches of the above-said miniapps?

faisalmohd83 avatar Mar 16 '21 11:03 faisalmohd83

@faisalmohd83 Thanks for reporting this. ElectrodeMiniAppActivity is deprecated and replaced with ElectrodeBaseActivity. Can you please update your activity to extend this ?

Meanwhile, I will keep this issue open and remove ElectrodeMiniAppActivity reference from the container.

@deepueg when to expect the replacement fix for ElectrodeMiniAppActivity?

faisalmohd83 avatar Mar 31 '21 15:03 faisalmohd83