AndroidRuntime: FATAL EXCEPTION with android.test.canceled
See original GitHub issueVersion of react-native-iap
1.0.6
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
no crash, instead fail gracefully
Actual behavior
crash in android native module
Tested environment (Emulator? Real Device?)
Device: Motoralo Moto G4
Steps to reproduce the behavior
Testing my app with test iap id android.test.canceled
I get the following crash after android tells me the purchase was successful.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.myapp.debug, PID: 15033
java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.util.List.get(int)' on a null object reference
at com.dooboolab.RNIap.RNIapModule$7.onPurchasesUpdated(RNIapModule.java:379)
at com.android.billingclient.api.BillingClientImpl$1.onReceive(BillingClientImpl.java:136)
at com.android.billingclient.api.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:303)
at com.android.billingclient.api.LocalBroadcastManager.access$000(LocalBroadcastManager.java:44)
at com.android.billingclient.api.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:114)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6123)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
Eventhough there might be actually sth. going wrong I would expect com.dooboolab.RNIap.RNIapModule
to fail gracefully instead of crashing.
Thx
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
android - In app billing v3 NullPointerException - Stack Overflow
To test out in app billing v3 for Android I implemented a dialog ... 12-16 01:06:06.706: E/AndroidRuntime(20846): FATAL EXCEPTION: main ...
Read more >DeadSystemException - Android Developers
Check out Android Developers on YouTube. LinkedIn. Connect with the Android Developers community on LinkedIn. More Android. Android · Android for Enterprise ...
Read more >Known issues with Android Studio and Android Gradle Plugin
Issue in Android Runtime throws error. If you're using a device that runs Android 8.0 or 8.1, you might encounter "VERIFICATION_ERROR" messages when...
Read more >Android Test Station | Android Open Source Project
Canceling a test run If the test run hasn't completed, you can cancel it by clicking Cancel and then clicking Yes in the...
Read more >Crashes - Android Developers
beginning of crash AndroidRuntime: FATAL EXCEPTION: main Process: com.android.developer.crashsample, PID: 3686 java.lang.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @dooboolab , Thanks a lot for this wonderful package. Initially I used 2 different packages for Android and IOS but now I use only yours. Saved so much of my time.
Even I am facing the same issue with android.test.canceled. I was checking the logs and I saw something
06-07 11:42:15.720 4394 4394 W BillingHelper: Couldn't find purchase lists, trying to find single data. 06-07 11:42:15.721 4394 4394 W BillingHelper: Received a bad purchase data.
According to what I understand, I think the buy method is trying to load all already purchased products of the current account which leads to the crash? Correct me if I am totally wrong as I am not much into android native code, but the log messages gave me this first impression 😃
experiencing the same problem now on version
2.3.23