react-native-iap icon indicating copy to clipboard operation
react-native-iap copied to clipboard

[Error: Purchased failed for sku: {productId}: Unable to Complete Request] after cancel and resubscribe

Open Jeyoung-Park opened this issue 4 months ago • 3 comments

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:

  1. call requestSubscription method.
  2. go to setting > appstore > sandbox and cancel the subscription.
  3. go back to the app and call requestSubscription method again.
  4. inapp subscription is well done, but it throw the error like i'd mentioned above.
  5. 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

Jeyoung-Park avatar Oct 08 '24 08:10 Jeyoung-Park