Flutterwave / AndroidSDK

Rave's Android Drop In UI
7 stars 8 forks source link

Crash after momo payment #256

Closed MohammedBashiru closed 3 years ago

MohammedBashiru commented 3 years ago

Describe the Bug

The app crashes after successful Momo payment. @jeremiahAI Please can you confirm this?

Thanks

error message

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.flutterwave.rave_android, PID: 29835 java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=70876, result=111, data=Intent { }} to activity {com.flutterwave.rave_android/com.flutterwave.raveandroid.RavePayActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.flutterwave.raveandroid.rave_remote.responses.MobileMoneyChargeResponse$Data.getProvider()' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:4845) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4886) at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.flutterwave.raveandroid.rave_remote.responses.MobileMoneyChargeResponse$Data.getProvider()' on a null object reference at com.flutterwave.raveandroid.rave_presentation.ghmobilemoney.GhMobileMoneyHandler.requeryTx(GhMobileMoneyHandler.java:138) at com.flutterwave.raveandroid.rave_presentation.ghmobilemoney.GhMobileMoneyHandler.requeryTx(GhMobileMoneyHandler.java:127) at com.flutterwave.raveandroid.ghmobilemoney.GhMobileMoneyFragment.onActivityResult(GhMobileMoneyFragment.java:245) at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:170) at android.app.Activity.dispatchActivityResult(Activity.java:8110) at android.app.ActivityThread.deliverResults(ActivityThread.java:4838) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4886)  at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)  at android.os.Handler.dispatchMessage(Handler.java:107)  at android.os.Looper.loop(Looper.java:214)  at android.app.ActivityThread.main(ActivityThread.java:7356)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 

System Information

jeremiahAI commented 3 years ago

Thanks for sharing this @MohammedBashiru . This is being looked into

jeremiahAI commented 3 years ago

Hey @MohammedBashiru , we've fixed this now. Please checkout the latest version: implementation('com.github.flutterwave.rave-android:rave_android:2.1.26')

MohammedBashiru commented 3 years ago

@jeremiahAI

This is still not fixed as of version. 2.1.16

I think it would have been fair to hear my feedback before closing this issue.

Please re-open this issue as its not fixed yet.

Error Message

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.flutterwave.rave_android, PID: 23747 java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=70876, result=111, data=Intent { }} to activity {com.flutterwave.rave_android/com.flutterwave.raveandroid.RavePayActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.flutterwave.raveandroid.rave_remote.responses.MobileMoneyChargeResponse$Data.getProvider()' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:4845) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4886) at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.flutterwave.raveandroid.rave_remote.responses.MobileMoneyChargeResponse$Data.getProvider()' on a null object reference at com.flutterwave.raveandroid.rave_presentation.ghmobilemoney.GhMobileMoneyHandler.requeryTx(GhMobileMoneyHandler.java:138) at com.flutterwave.raveandroid.rave_presentation.ghmobilemoney.GhMobileMoneyHandler.requeryTx(GhMobileMoneyHandler.java:127) at com.flutterwave.raveandroid.ghmobilemoney.GhMobileMoneyFragment.onActivityResult(GhMobileMoneyFragment.java:245) at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:170) at android.app.Activity.dispatchActivityResult(Activity.java:8110) at android.app.ActivityThread.deliverResults(ActivityThread.java:4838) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4886)  at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)  at android.os.Handler.dispatchMessage(Handler.java:107)  at android.os.Looper.loop(Looper.java:214)  at android.app.ActivityThread.main(ActivityThread.java:7356)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 

jeremiahAI commented 3 years ago

Oops! Sorry for the oversight @MohammedBashiru. It's been added to 2.1.27 now.

MohammedBashiru commented 3 years ago

Thanks @jeremiahAI

This can now be closed as this is resolved.

I'll reopen another issue concerning Gh MTN momo instructions as that has changed.