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

Interrupt Purchases (terms & conditions acceptance) return E_UNKNOWN error

Open venux92 opened this issue 3 years ago • 7 comments

I'm getting an E_UNKNOWN error when I have my tester set to Interrupt purchase

purchaseErrorSubscription = purchaseErrorListener(
   (error: PurchaseError) => {
       console.log(error)
  },
)

Version of react-native-iap

6.0.2

Version of react-native

0.64.0

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

IOS

Expected behavior

Get the correct error. I can see from index.ts There is E_DEFERRED_PAYMENT', and E_NOT_ENDED maybe more adapted

Unless there is a better way to handle this case where the user needs to accept the agreement before pursuing his payement.

Actual behavior

I have a subscription product I'm getting {"code": "E_UNKNOWN", "debugMessage": "An unknown error occurred", "message": "An unknown error occurred", "productId": "xxxxxxxx", "responseCode": "0"}

Tested environment (Emulator? Real Device?)

Real Device

Steps to reproduce the behavior

Go to Apple Connect -> Users and Access -> Testers then select a user and image

Try a payment, once the Apple Agreement is displayed the error will be thrown

venux92 avatar Apr 25 '21 13:04 venux92

Has anyone figured out a way around this? Seems like even if the user agrees to the terms & conditions, the purchaseUpdatedListener isn't triggered even though the transaction is successful.

antoinesaliba avatar Jun 28 '21 23:06 antoinesaliba

I am facing this same issue as well.

HarshitMadhav avatar Oct 26 '21 09:10 HarshitMadhav

This issue blocks my app from passing the Apple review.

Great-hijack avatar Dec 03 '21 16:12 Great-hijack

I have the same problem too!

ahmetkuslular avatar Jan 20 '22 23:01 ahmetkuslular

Did anyone resolve this?

mikeportanova avatar Mar 02 '22 16:03 mikeportanova

Did anyone resolve this?

All tax information needs to be entered and approved by apple. Also, it cannot be tested on the simulator. There is no problem with real device.

ahmetkuslular avatar Mar 02 '22 21:03 ahmetkuslular

Hi! Does anyone have news on this issue? If not how are you saving the purchase when the user has agreed to the terms and conditions? Since the listener won't catch it. Do you just show an error and then the user needs to tap a restore button to get the purchase to the backend?

Also is it only me getting a "Cannot connect" with a non-working "Retry" button in the sandbox/testflight Terms and Conditons modal after updating to iOS 15.4? (I assume it's a bug from apple)

RuiSoares avatar Mar 20 '22 00:03 RuiSoares

Fixed here: https://github.com/dooboolab/react-native-iap/pull/1921

andresesfm avatar Sep 02 '22 17:09 andresesfm

10.0.5 has been published with the fix

andresesfm avatar Sep 02 '22 17:09 andresesfm