react-native-iap
react-native-iap copied to clipboard
[Error: Purchased failed for sku: {productId}: Unable to Complete Request] after cancel and resubscribe
Please use the Discussion board if you want to get some help. Please use issues to report bugs.
Description
I am using react native iap for inapp subscription. I got the error below when i cancel the subscription and resubscribe the plan.
[Error: Purchased failed for sku:*Product ID Here*: Unable to Complete Request]
Currently I am using Storekit2 and react-native-iap version 12.
I've tried using Storekit1 and react-native-iap version 10, but nothing has worked well.
In Storekit1, error message converts to Unknown Error
.
Also, I have native error message.
Error Domain=ASDErrorDomain Code=825 "No transactions in response" UserInfo={server-correlation-id=JTU2S7LDTNBIDXY5S7HMT3M22Y, client-environment-type=Sandbox, AMSServerErrorCode=0, NSDebugDescription=No transactions in response, storefront-country-code=KOR}
2024-10-08 16:00:56.048730+0900 PublicInstructorApp[10723:2593898] [Default] [StoreKit] Purchase did not return a transaction: Error Domain=ASDErrorDomain Code=825 "No transactions in response" UserInfo={server-correlation-id=JTU2S7LDTNBIDXY5S7HMT3M22Y, client-environment-type=Sandbox, AMSServerErrorCode=0, NSDebugDescription=No transactions in response, storefront-country-code=KOR}
[react-native-iap] Purchase Failed
["debugMessage": "Unable to Complete Request", "message": "Unable to Complete Request", "productId": "00instructor_monthly_subscription", "responseCode": "E_PURCHASE_ERROR"]
Environment:
- react-native-iap: 12.15.2
- react-native: 0.74.3
- Platforms (iOS, Android, emulator, simulator, device): iOS (Test with Sandbox, real device)
To Reproduce Steps to reproduce the behavior:
- call requestSubscription method.
- go to setting > appstore > sandbox and cancel the subscription.
- go back to the app and call requestSubscription method again.
- inapp subscription is well done, but it throw the error like i'd mentioned above.
- The thing is that subscription is well applied in my sandbox account, and my backend server, but it throws an error on client side. (requestSubscription method throw the error.)
[Optional] Additional Context