getAvailablePurchases never resolves if initConnection has not been run
See original GitHub issueVersion of react-native-iap
4.4.8
Version of react-native
0.61.4
Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
getAvailablePurchases()
to reject with error when something is wrong.
Actual behavior
getAvailablePurchases()
never ever returns the promise
Tested environment (Emulator? Real Device?)
Real device
Steps to reproduce the behavior
Call getAvailablePurchases
without having called initConnection
beforehand.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
react-native-iap just hangs on ios trying to get subscriptions ...
The request doesn't succeed, doesn't fail, doesn't crash. The JS promise is seemingly never resolved or rejected. Has anyone experienced this?
Read more >dooboolab/react-native-iap (Raised $40.00)
iOS: This in-app purchase has already been bought for some sku's ... getAvailablePurchases never resolves if initConnection has not been run.
Read more >How to use the react-native-iap.getAvailablePurchases ...
To help you get started, we've selected a few react-native-iap examples, based on popular ways it is used in public projects. Secure your...
Read more >react-native-iap - npm
The react-native-iap module hasn't been maintained well recently. We are thinking of participating again and make the module healthier.
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
Also, if
initConnection
is a required step to run before doing anything else, wouldn’t it be better if react-native-iap kept track of that internally?Hey @hyochan, I believe, you should update README examples to include
.initConnection()
call. As of now, it is absolutely not clear from README it should be called. And to make it more confusive, everything seems to work without it on Android, thus the problem appears out of nowhere during a transition from Android to iOS.