buySubscription returns E_UNKNOWN despite successful purchase
See original GitHub issueVersion of react-native-iap
2.2.2
(because any newer version fails on iOS due to #279)
Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
No error should be thrown. Purchase was successful (live and in production)
Actual behavior
E_UNKNOWN
error is returned from Promise
Our Sentry.io error tracking reports this:
{"framesToPop":1,"code":"E_UNKNOWN","nativeStackIOS":["0 LuCoaching 0x000000010062f6fc LuCoaching + 1996540","1 LuCoaching 0x000000010060aa98 LuCoaching + 1845912","2 LuCoaching 0x00000001007cad98 __cxa_throw + 438380","3 LuCoaching 0x00000001007cc62c __cxa_throw + 444672","4 libdispatch.dylib 0x000000019d078484 <redacted> + 16","5 libdispatch.dylib 0x000000019d025610 <redacted> + 56","6 LuCoaching 0x00000001007cc46c __cxa_throw + 444224","7 libdispatch.dylib 0x000000019d0776c8 <redacted> + 24","8 libdispatch.dylib 0x000000019d078484 <redacted> + 16","9 libdispatch.dylib 0x000000019d0249ec <redacted> + 1068","10 CoreFoundation 0x000000019d5ce1bc <redacted> + 12","11 CoreFoundation 0x000000019d5c9084 <redacted> + 1964","12 CoreFoundation 0x000000019d5c85b8 CFRunLoopRunSpecific + 436","13 GraphicsServices 0x000000019f83c584 GSEventRunModal + 100","14 UIKitCore 0x00000001ca444bc8 UIApplicationMain + 212","15 LuCoaching 0x000000010044d110 LuCoaching + 20752","16 libdyld.dylib 0x000000019d088b94 <redacted> + 4"],"userInfo":{"NSLocalizedDescription":"Verbindung mit iTunes Store nicht möglich"},"domain":"SKErrorDomain","line":26,"column":1877,"sourceURL":"/var/containers/Bundle/Application/818C8439-E250-42E8-AD57-EC4FB5FE5547/LuCoaching.app/main.jsbundle"}
Tested environment (Emulator? Real Device?)
Real Device. Live customers. Very consistenlty fails
Steps to reproduce the behavior
When testing the procedure with Sandbox users the error cannot be reproduced.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:30 (14 by maintainers)
Top Results From Across the Web
Contact Us | Subscription Questions - Buysubscriptions
How to get in contact with us regarding your subscription, renewal, single issue, or have a question about subscribing on buysubscriptions.com.
Read more >PurchaseFailureReason: Unknown - Unity Forum
1. Run game. · 2. Hit "Buy subscription" button (for 3 month with 3 free day period). · 3. Entered account password. ·...
Read more >6 New Features in Thrive Suite – Late March 2021
Thrive Apprentice lets you build your course and restrict access to the course only to customers that have purchased it through WooCommerce.
Read more >Frequently Asked Questions The New Yorker
You will receive your first issue between three and six weeks after purchasing a print subscription. Each issue is published one week prior...
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
👍 We are experiencing this issue was well. It seems to be happening to about 10% of our users currently. We’re going to try adding this listener, but I don’t think that ultimately this is a great solution. @hyochan Is there any way we can get more detailed information in the cases where this throws, or is that a standard response from the StoreKit APIs? In every error case the message seems to be “Cannot connect to iTunes Store”, even when the purchase is successful.
I’m seeing this error too. And I think I know one way to reproduce it.
Version of react-native-iap
^2.4.1
Version of react-native
https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz
Platform
iOS, when testing in TestFlight on a real device.
Observations
I noticed that when any RNIap functions were called in my app, iOS would ask me to enter a password for a previous iTunes/App Store user (which I have since logged out and replaced via iOS Settings). I read somewhere online that this is an issue that dogs iPhone users from time to time: sometimes an app is bought with one iTunes account, then the phone is switched to a new iTunes account, but the app continues to ask for the password for the old iTunes account.
I tried to delete my app (and TestFlight) and reinstall with the new App Store user, to no avail. The only way I could get rid of this behavior was to wipe the device. Once I did this, I could no longer reproduce this error.
Actual Behavior
Steps to reproduce the behavior
Hope this helps someone!