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

nullpointer happening in sendUnconfirmedPurchses every now and then on android #908

Closed
nesvold opened this issue Jan 18, 2020 · 5 comments
Closed
Labels
🤖 android Related to android 🕵️‍♂️ need more investigation Need investigation on current issue 🚶🏻 stale Stale

Comments

@nesvold
Copy link

nesvold commented Jan 18, 2020

Version of react-native-iap

4.3.4

Version of react-native

0.61.2

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

Actual behavior

Ive collected this from an app crash reported in production. Ive seen it happen some times now. Sorry for not having real line numbers to report, but the error is real..

(NB- line numbers are not correct)
java.lang.NullPointerException:
at com.dooboolab.RNIap.RNIapModule$11.run (RNIapModule.java:20)
at com.dooboolab.RNIap.RNIapModule.ensureConnection (RNIapModule.java:10)
at com.dooboolab.RNIap.RNIapModule.sendUnconsumedPurchases (RNIapModule.java:5)
at com.dooboolab.RNIap.RNIapModule.startListening (RNIapModule.java)
at java.lang.reflect.Method.invoke (Method.java)
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:149)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:21)
at com.facebook.react.bridge.queue.NativeRunnable.run (NativeRunnable.java)
at android.os.Handler.handleCallback (Handler.java:790)
at android.os.Handler.dispatchMessage (Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java)
at android.os.Looper.loop (Looper.java:164)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:37)
at java.lang.Thread.run (Thread.java:764)

Tested environment (Emulator? Real Device?)

Real Device: Motorola Moto G (5) Plus (potter_n), Android 8.1

Steps to reproduce the behavior

Not identified..

@hyochan hyochan added 🤖 android Related to android 🕵️‍♂️ need more investigation Need investigation on current issue labels Jan 24, 2020
@drbarto
Copy link

drbarto commented Mar 26, 2020

Looks like a dupe of #600 and #734. Unfortunately both issues have been closed; in the 2nd one it was suggested to revert to version 3.4.15, which fixed the issue for some users (unfortunately not for me) -- maybe this can also help you.

@hyochan bringing this cluster of issues to your attention again :)

@nesvold
Copy link
Author

nesvold commented Mar 27, 2020

Thanks for pointing that out. It seems to be identical to #600 , only that I've verified that this is happening on real devices as well (it happens about once or twice a week for users with the described android version (who I estimate is using my app about twice a day). So i would say it's quite serious.

@Maddoc42
Copy link

Hey guys 👋 Seeing the same issue here, identical stack trace. Play console reports it happens on:

Android version: 8.0, 9, 10
Devices: Galaxy A7 (2018) (a7y18lte), Galaxy Note10+ (d2s), HUAWEI P smart 2019 (HWPOT-H), Redmi K20 (davinci) and others

Version of react-native-iap: 4.4.6
Version of react-native: 0.62.2

The stack trace points to this line https://github.com/dooboolab/react-native-iap/blob/master/android/src/main/java/com/dooboolab/RNIap/RNIapModule.java#L575. This means billingClient was null? Seeing as its wrapped in ensureConnection and the callback being called synchronously after checking billingClient != null, how does this happen? Any chance that there are multiple threads setting the billingClient? The only place where billingClient is being set to null is the onHostDestroyed method.

@stale
Copy link

stale bot commented Aug 24, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the 🚶🏻 stale Stale label Aug 24, 2020
@stale
Copy link

stale bot commented Sep 24, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Related to android 🕵️‍♂️ need more investigation Need investigation on current issue 🚶🏻 stale Stale
Projects
None yet
Development

No branches or pull requests

4 participants