How do I resolve "The verify credentials call failed" when attempting to restore an in-app purchase on iOS 15?

I am using StoreKit for in-app purchases. I'm testing the restoration of a purchase, to no avail.

I keep getting this error message after typing in the username & password for a sandbox tester:

Error Domain=SKErrorDomain Code=0 "UNKNOWN_ERROR" UserInfo={NSLocalizedDescription=UNKNOWN_ERROR, NSUnderlyingError=0x7b0c000652b0 {Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x7b0c00079ef0 {Error Domain=AMSErrorDomain Code=100 "Authentication Failed" UserInfo={NSLocalizedFailureReason=The verify credentials call failed., NSLocalizedDescription=Authentication Failed, NSUnderlyingError=0x7b0c0007fbc0 {Error Domain=AMSErrorDomain Code=15 "An unknown error occurred. Please try again." UserInfo=0x7b0800027540 (not displayed)}}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}}}

What do I need to do to resolve this error?

Post not yet marked as solved Up vote post of moonman239 Down vote post of moonman239
463 views

Answers

I too am seeing a new behavior with iOS 15.

Prior to iOS 15, I would use Sandbox testers with TestFlight builds for IAP renewable subscriptions. When making the IAP purchase, I would be challenged (in a modal dialog) to enter the Sandbox testers credentials (both username and password). Sometimes, I would be challenged to re-enter the password to complete the subscription. This has not changed between iOS 14 and iOS 15 devices.

However, if I then delete the app, reinstall from TestFlight and attempt to restore a purchase, on iOS 15, I am getting the error "An unknown error occurred".

I was able to inspect the console logs and found these entries

default	12:16:37.428196+0100	SubscriptionApp	-[EBAuthenticationService paymentQueue:restoreCompletedTransactionsFailedWithError:] [Line 599] ERROR:Restore transaction failed: An unknown error occurred
{
    NSLocalizedDescription = "An unknown error occurred";
    NSUnderlyingError = "Error Domain=ASDServerErrorDomain Code=1001 \"MZFinance.NoAccount_message\" UserInfo={NSLocalizedDescription=MZFinance.NoAccount_message}";
}

It seems appstored looks for a different account that what we have setup on the device settings.

default	12:16:12.627633+0100	appstored	AMSAuthenticateTask: [53574A61] Looking for an existing account. altDSID = (null) | DSID = (null) | username = (null)
default	12:16:12.630357+0100	appstored	AMSAuthenticateTask: [53574A61] Failed to find an existing account. We'll create a new one instead.
default	12:16:12.643095+0100	appstored	AMSAuthenticateTask: [53574A61] The device doesn't have an active account for com.apple.AppleMediaServices.accountmediatype.appstore.beta. We'll make the account active if we successfully authenticate it.
error	12:16:12.643619+0100	appstored	"Error returned from daemon: Error Domain=com.apple.accounts Code=6"
default	12:16:12.643923+0100	appstored	AMSAuthenticateTask: [53574A61] Generating a password.
default	12:16:12.644018+0100	appstored	AMSAuthKitUpdateTask: [53574A61] === Starting ===

And after signing in with the sandbox account:

default	12:16:35.308770+0100	appstored	AMSAuthKitUpdateResult: [53574A61] AuthKit gave us updated identifiers. We'll attempt to find an existing account that matches the new identifiers.
default	12:16:35.309871+0100	appstored	AMSAuthKitUpdateResult: [53574A61] The new identifiers are for a different existing account. existingAccount = <ACAccount: 0x10870a900 type = iTunesStore.sandbox | backingID = 1B413FC4-01CC-4DF0-B7B5-8331500E02A3 | username = qa-eb01@cliqconsulting.com | altDSID = 000722-10-7e386279-e9bd-4bad-98c6-6493494087cc | DSID = 20457517352 | active = true | storefront = 143441-1,30 ab:aF574PC1>
default	12:16:35.312802+0100	appstored	AMSAuthKitUpdateTask: [53574A61] The AuthKit authentication succeeded. result = <AMSAuthKitUpdateResult: 0x108d5fbd0>
default	12:16:35.312855+0100	appstored	AMSAuthKitUpdateTask: [53574A61] === Finished ===
default	12:16:35.313213+0100	appstored	AMSAuthenticateTask: [53574A61] Successfully generated a password. Performing the authentication.

It appears that iOS 15 no longer allows the use of Sandbox Testers for IAP with TestFlight

In the Settings app, under App Store, there is a new message showing on iOS 15

SANDBOX ACCOUNT This account will only be used for testing your in-app purchases while developing locally. Your existing App Store account will be used for TestFlight apps.

Are TestFlight builds now required to use production Apple ID accounts (and not Sandbox testers)?

I am having the similar problem.
Restore purchase with sandbox account fails in TestFlight beta app on iOS 15.1.1

On ios14.8 it's fine.
On ios15.1.1, when I use a sandbox account for in-app purchase on a beta app installed from TestFlight, the purchase succeeds, but restore fails.
When I try to restore it, every time I get a dialog to enter apple id and password, I enter the sandbox account I purchased, but it fails with 'unknown error'.
I checked the device logs and found the same situation as written by gmarcus.

Is this a specification of IOS15 or a bug?
Have you found a solution to this problem?
Any information or suggestions?
Thank you.