-
Notifications
You must be signed in to change notification settings - Fork 192
Dozens of NullPointerException Errors every day #168
Comments
Hi there, this is a much bigger issue than what you're describing here. There are dozens of people having these problems, as it's not a problem with this inapppurchase library, but with the Google IabHelper (which has been developed by Google). Just look into this Stackoverflow Question to see that there's a lot of complaining going on. Currently I'm experimenting with InAppBillingV6 maybe I'll update it here too, once I've done enough testing. Would you be interested to test it too? Regarding the asking for a programmer, it's not a problem at all, you may also openly post a bounty on BountySource so others can also look into this if you like. Cheers |
Thank you, Moritz! Best regards from Dortmund ;-) |
Hi Moritz! Best regards |
Hi Marc! Nice! It would be cool to have someone look over the code. I don't have a link of all symptoms unfortunately other than the issues posted here. There's another plugin for cordova in app purchases I'll see if they do it better than we are currently. If you find out anything I'm very happy to work together to fix these issues. Thank you very much and kind regards from Austria ;-) Moritz |
I get the same errors reported in my crash reporting tool from time to time (affects less than 1% of total users, most of are not buyers though). |
I've created a
could you two guys test it please and keep us updated here if you notice anything? |
Noticing this issue as well, anyone have any quick work arounds? |
Hey guys, |
@bshafiee If you like you can send us a PR! |
I am seeing the same error message from my Google developer account. |
I see the same error in the Google Play Console:
@Marcophono2 @moritzgloeckl @nilebma @RainerAppel @fierysolid @bshafiee @FiveHundredMiles how did you solved it? Thank you very much! |
I deleted my comment posted on Sep 5 because this did not work. Currently I still have no solution for this. I tried with a patched version of IabHelper.java but no success so far. Note: You can't just patch plugins/cordova-plugin-inapppurchase/src/android/IabHelper.java because cordova seems to replace it with the original on every build. |
Any news about this issue? We should resolve this. Since Google uses the number of errors to rank the apps, this problem might give us a bad rank position, that implies less users, and thus, less revenue. |
I think I have finallly fixed this issue. Catching all those NullPointerExceptions at least avoids the crashes. |
Guys, please add a message here, when you merge this PR. Having the same issue. |
Will these exceptions get avoided in this repo ? |
So throwing the error appears to mean that it just fixes the crash reporting, but failed purchases still occur because the source issue (objects being dumped from memory) is still happening. Am I correct in believing that throwing the exception still means purchases will fail? I have been unable to replicate the issue so cannot confirm/deny the latter question. If that is the case, how does one ensure that the objects don't get dumped and if they do they get reinitialized? |
We too get this error quite frequently and a lot of complains from the users that the app crashes. Since I can't reproduce it, has anyone tried the bugfix from ghenry22 and can confirm that the error is not just "caught" but also the purchase works?! Thank you! |
Switch to react-native and never look back haha |
@francois-n-dream, I can confirm that the pull request from @RainerAppel works, the error is "caught" and the purchase works. BUT, it is better to update to Ionic 4 as soon as possible. |
It seems that IabHelper is an old implementation and is not properly garbadge collected. I don't have time to investigate, but crashing because of this is not needed. The typical described behavior seems to be that users view the products, go elsewhere and it crashes several seconds after when it's being garbage collected or something. I plan on switching to j3k because the maintainers of this plugin are not active anymore, but this should at least reduce the crashes for now. REFs: https://stackoverflow.com/questions/15456434/billing-api-v3-iabhelper-nullpointerexception AlexDisler#129 AlexDisler#168
Hello!
My Cordova app (including Crosswalk plugin) is live in the Google Store. I changed out the IAB plugin a few weeks ago due to too many errors in the purchase process. But this plugin seems to have the same or similar problems. Every day I find in the ANRS&crashes section of my developer account dozens of crash reports every day. The same errors were reported here some times in the past but never got a response. I am really wondering how the most important plugin a Cordova app can have - finally being paid for the hard work of creating an app via the IAB plugin - can still contain so serious bugs which were completely ignored. Anyway, for me it is essential to fix this issue. Of course I'll pay for that job. Is there someone interested? I hope I do not touch any board rules here asking for a programmer..
I cannot test it out on my own device. I never catch an error.
Here are some of the catched errors from my Google developer account:
Samsung Galaxy Xcover3 (xcover3lte), 1536MB RAM, Android 5.1
java.lang.NullPointerException:
at com.alexdisler.inapppurchases.IabHelper.queryPurchases (IabHelper.java:849)
at com.alexdisler.inapppurchases.IabHelper.queryInventory (IabHelper.java:571)
at com.alexdisler.inapppurchases.IabHelper.queryInventory (IabHelper.java:535)
at com.alexdisler.inapppurchases.IabHelper$2.run (IabHelper.java:630)
at java.lang.Thread.run (Thread.java:818)
Samsung Galaxy S5 mini (kminilte), 1536MB RAM, Android 6.0
java.lang.NullPointerException:
at com.alexdisler.inapppurchases.IabHelper.queryPurchases (IabHelper.java:849)
at com.alexdisler.inapppurchases.IabHelper.queryInventory (IabHelper.java:571)
at com.alexdisler.inapppurchases.IabHelper.queryInventory (IabHelper.java:535)
at com.alexdisler.inapppurchases.IabHelper$2.run (IabHelper.java:630)
at java.lang.Thread.run (Thread.java:818)
Samsung Galaxy S7 (herolte), 4096MB RAM, Android 7.0
java.lang.NullPointerException:
at com.alexdisler.inapppurchases.IabHelper.queryPurchases (IabHelper.java:849)
at com.alexdisler.inapppurchases.IabHelper.queryInventory (IabHelper.java:571)
at com.alexdisler.inapppurchases.IabHelper.queryInventory (IabHelper.java:535)
at com.alexdisler.inapppurchases.IabHelper$2.run (IabHelper.java:630)
at java.lang.Thread.run (Thread.java:762)
[...]
Best regards
Marc
The text was updated successfully, but these errors were encountered: