Xcode 12 iOS 14 error purchase

When try buy product:

<SKPaymentQueue: 0x280569730>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x2809cb300 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, NSLocalizedFailureReason=The response has an invalid status code}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}

Post not yet marked as solved Up vote post of Lestad90 Down vote post of Lestad90
27k views

Replies

Also happening to us as well.

Apple just rejected our app because IAP is broken in sandbox mode :/
Same issue as well

Code Block
<SKPaymentQueue: 0x280b991e0>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x285eae1c0 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, NSLocalizedFailureReason=The response has an invalid status code}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}

same issue here


<SKPaymentQueue: 0x28134cb90>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x281fde550 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, NSLocalizedFailureReason=The response has an invalid status code}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}
Still happening intermittently

Code Block
Error Domain=SKErrorDomain Code=0 "An unknown error occurred" UserInfo={NSLocalizedDescription=An unknown error occurred, NSUnderlyingError=0x28228b870 {Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x282288660 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, NSLocalizedFailureReason=The response has an invalid status code}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}}}


Same here with Xcode 12.2 and iOS 14.2

2020-12-03 12:25:08.885572+0530 Application[1496:171076] <SKPaymentQueue: 0x282ef5c40>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x282248150 {Error Domain=AMSErrorDomain Code=100 "Authentication Failed" UserInfo={NSLocalizedFailureReason=The verify credentials call failed., NSLocalizedDescription=Authentication Failed, NSUnderlyingError=0x282248330 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, NSLocalizedFailureReason=The response has an invalid status code}}}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}

2020-12-03 12:25:08.890414+0530 Sleep Solutions[1496:169933] (

    "<SKPaymentTransaction: 0x282edc890>"

)
Bad Apple
same issue!!
I ran into this problem as well and my app was rejected by the Apple last night.
It may be due to intermittent issues with Apple's Sandbox environment that you have no control over. See here for cross references to similar reported issues:
https://stackoverflow.com/questions/64368539/in-app-purchase-sandbox-env-is-not-working#comment117856099_64368539

I am facing the same problem. Has anyone found solution for this?
My app was also rejected because of SKError.Code.unknown during the app review. The deepest internal error had code 500305 with message "Unhandled exception". With the help of Code-Level Support I was able to rewrite IAP-related code, to make it successfully pass the app review. In my case the unknown error occurred, because the app tried to refresh receipt when it was missing and review team always canceled authentication dialog that appeared after SKReceiptRefreshRequest. The correct way to handle a missing appStoreReceipt is to ask whether the user wants to refresh it. Eventually, I just made app to ignore receipt if it is missing. If user purchased something on another device then there is always a "Restore" button available in my app. Moreover, in production the appStoreReceipt is almost always available.
Same issue , did anyone found a solution ?

remove payment.applicationUsername = @"";

We have the same problem (iOS 14.6, using TestFlight accounts). What is the solution?

  • This is the error we're getting: 2021-08-03 16:45:26.365582-0400 EarGear[512:27753] <SKPaymentQueue: 0x282f7c4f0>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x28231f180 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, NSLocalizedFailureReason=The response has an invalid status code}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}

    transaction.transactionState is 'failed'

Add a Comment

Xcode 13, tvOS simulator same. Both on sandbox account and not.

<SKPaymentQueue: 0x60000171af30>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x600001bbaca0 {Error Domain=AMSErrorDomain Code=100 "Authentication Failed" UserInfo={NSLocalizedFailureReason=The verify credentials call failed., NSLocalizedDescription=Authentication Failed, NSUnderlyingError=0x600001b89b60 {Error Domain=AMSErrorDomain Code=15 "An unknown error occurred. Please try again." UserInfo={NSLocalizedDescription=An unknown error occurred. Please try again.}}}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}

  • Just happend to me too. Reject and no way to fix an issue.

    SKPaymentQueue: 0x6000026942e0>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x600002a09f50 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, NSLocalizedFailureReason=The response has an invalid status code}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}

Add a Comment