Getting Invalid Status Code on iOS14

I am using Unity IAP 2.0.0 with iOS 14, and am seeing strange things with this update (I think it’s related to iOS 14 and not IAP).

For some purchases I will get:
<SKPaymentQueue: 0x2820d2dd0>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 “Unhandled exception” UserInfo={NSUnderlyingError=0x282ddef40 {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}

while trying again immediately will work.

Then I receive this:
UnityIAP: Received 3 products
productID: 4.99_usd_package
transactionID: 1000000720889775
originalTransactionIdentifier: 1000000720889775
purchaseDate: 9/21/2020 11:46:19 AM
originalPurchaseDate: 9/21/2020 11:46:19 AM
subscriptionExpirationDate: 1/1/0001 12:00:00 AM
productID: 24.99_usd_package
transactionID: 1000000509877558
originalTransactionIdentifier: 1000000509877558
purchaseDate: 3/13/2019 7:35:32 AM
originalPurchaseDate: 3/13/2019 7:35:32 AM
subscriptionExpirationDate: 1/1/0001 12:00:00 AM
Already recorded transaction 1000000720889775
UnityIAP: Transaction 1000000720889775 not pending, nothing to finish here
UnityIAP: Add transaction observer
UnityIAP UnityEarlyTransactionObserver: Request to initiate queued payments

Like it has old transactions it cannot remove.

Basically a lot of things seems broken after updating to iOS14, with code that worked before for a long time.

Any idea what might happen here?

Can you provide steps to reproduce?

Hi Jeff
A bit hard to provide steps, I was just running the IStoreListener implementation we are using for a long time now.
I suspect it has something to do with some Apple server side update related to iOS 14.

After posting, I checked with an iOS 13.7 device, and have seen the same problem. Later, around 14:00 GMT, it stopped and worked normally.

I will check again tomorrow and post here if the issue still happens.

Seems like it was an internal Apple problem and is not related to iOS 14.

1 Like