-
-
Notifications
You must be signed in to change notification settings - Fork 655
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
Attempt to invoke interface method 'IInAppBillingService.getPurchases()' on a null object reference #310
Comments
Can you show us in which line of code in Also, try below too.
|
I tried a couple of times, adding if statement seems like fixed it. I didn't understand why though it always returns the same thing. Anyway, thanks. |
I spoke too soon it still causing a crash. I think there is a time gap between To fix it in If we can find a solution to resolve |
@eminsr Could you give a |
Just merged your |
@eminsr could we modify |
@LinusU yea that should fix the issue. |
Maybe we can add a while loop to
|
I will close this since this is related #315 |
Version of react-native-iap
"react-native-iap": "^2.3.17"
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
it should check if
mService
is null before callinggetPurchases()
Actual behavior
It doesn't check if
mService
is null and throws this errorAttempt to invoke interface method 'android.os.Bundle com.android.vending.billing.IInAppBillingService.getPurchases(int, java.lang.String, java.lang.String, java.lang.String)' on a null object reference
Tested environment (Emulator? Real Device?)
Real Device Android 6.0
Steps to reproduce the behavior
Just call RNIap.getAvailablePurchases() after initConnection(),
I temporarily fix it by setting a timeout for
getAvailablePurchases()
The text was updated successfully, but these errors were encountered: