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

RNIap.getSubscriptions(SUBSCRIPTIONS) throws "E_IAP_NOT_AVAILABLE" error #757

Closed
s-aleinik opened this issue Oct 5, 2019 · 7 comments · Fixed by #759
Closed

RNIap.getSubscriptions(SUBSCRIPTIONS) throws "E_IAP_NOT_AVAILABLE" error #757

s-aleinik opened this issue Oct 5, 2019 · 7 comments · Fixed by #759
Labels
🤖 android Related to android 🙏 help wanted Extra attention is needed

Comments

@s-aleinik
Copy link

s-aleinik commented Oct 5, 2019

Version of react-native-iap
3.5.8

Version of react-native
0.60.5

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

Expected behavior
RNIap.getSubscriptions(SUBSCRIPTIONS) will return the list of subscriptions.

Actual behavior
throws an error: "TypeError: Cannot read property 'getItemsByType' of undefined", after that there is one more error as Unhandled Promise Rejection with text: "E_IAP_NOT_AVAILABLE"

Tested environment (Emulator? Real Device?)
Real device. Android version 6.0.1

Steps to reproduce the behavior
Try to use RNIap.getSubscriptions(SUBSCRIPTIONS) method.

@hyochan hyochan added 🤖 android Related to android 🙏 help wanted Extra attention is needed labels Oct 6, 2019
@hyochan
Copy link
Owner

hyochan commented Oct 6, 2019

Did you call initConnection before getSubscriptions? Also that will be deprecated so it'd be better to use requestSubscriptions.

@bang9
Copy link
Contributor

bang9 commented Oct 6, 2019

Did you call initConnection before getSubscriptions? Also that will be deprecated so it'd be better to use requestSubscriptions.

@hyochan not included android/src folder on 3.5.8

3.5.7

image

3.5.8

image

@hyochan
Copy link
Owner

hyochan commented Oct 6, 2019

@bang9 Wow thanks for this. I'll fix this now. In your given PR #759 .

hyochan added a commit to bang9/react-native-iap that referenced this issue Oct 6, 2019
Do not ignore src dir which will ignore src in android
hyochan pushed a commit that referenced this issue Oct 6, 2019
* fix `validateReceiptAndroid`
  - Make template literals properly
* Resolve #757 
   - Do not ignore src dir which will ignore src in android
* Release 3.5.9
@hyochan
Copy link
Owner

hyochan commented Oct 6, 2019

@s-aleinik Fixed in 3.5.9.

@s-aleinik
Copy link
Author

@hyochan @bang9 thank you for the fast response :)

@s-aleinik
Copy link
Author

s-aleinik commented Oct 6, 2019

@hyochan here is new error: [TypeError: null is not an object (evaluating 'RNIapModule.getItemsByType')]

@s-aleinik
Copy link
Author

latest working version is 3.5.6 for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Related to android 🙏 help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants