SKAdImpression unknown 500 error

In iOS 15.3 method SKAdNetwork.startImpression() returns an error in completionHandler:

MyTestApp(StoreKit)[560] : SKAdNetwork: Error in remote proxy while starting view-through impression: Error Domain=ASDErrorDomain Code=500 "SKAdNetwork: Unknown error" UserInfo={NSDebugDescription=SKAdNetwork: Unknown error}

Such behaviour is unexpected, unclear and annoying (cause of we log all errors from SKAdNetwork)

  • in iOS 15.4 beta 2 it's became Error Domain=SKANErrorDomain Code=7 "(null)"

  • iOS 15.4 beta 3

    Feb 16 11:29:39 TestApp(StoreKit)[461] : SKAdNetwork: Error in remote proxy while starting view-through impression: Error Domain=SKANErrorDomain Code=10 "(null)"

    Feb 16 11:29:44 TestApp(StoreKit)[461] : SKAdNetwork: Error in remote proxy while ending view-through impression: Error Domain=SKANErrorDomain Code=10 "(null)"

    Feb 16 11:29:44 TestApp(StoreKit)[461] : SKAdNetwork: Error in remote proxy while ending view-through impression: Error Domain=SKANErrorDomain Code=4 "(null)"

  • iOS 15.4 beta 5

    Mar 2 12:54:05 TestApp(StoreKit)[752] : SKAdNetwork: Error in remote proxy while starting view-through impression: Error Domain=SKANErrorDomain Code=10 "(null)" Mar 2 12:54:07 TestApp(StoreKit)[752] : SKAdNetwork: Error in remote proxy while ending view-through impression: Error Domain=SKANErrorDomain Code=10 "(null)" Mar 2 12:54:24 TestApp(StoreKit)[752] : SKAdNetwork: Error in remote proxy while ending view-through impression: Error Domain=SKANErrorDomain Code=4 "(null)"

Replies

Got an answer from Apple:

There has been an issue identified starting iOS 15.3, where the view through APIs may return an "unknown error", in cases when no error has actually occurred. In 15.3 that error is ASDErrorDomain:500. In 15.4 that error is now defined in the public SDK as SKANErrorDomain:SKANErrorUnknown (value 10). However, in those cases no functional error has actually occurred. The impression was recorded by the system.

We recommend that you ignore all errors of type ASDErrorDomain:500 / SKANErrorDomain:SKANErrorUnknown (value 10), as they are not real errors. The impression is recorded on the device regardless of those errors.

Reccomend to also check this topic: https://github.com/bizz84/SwiftyStoreKit/issues/592

One thing that can cause this error is having a subscription without a duration set in App Store Connect. Its possible to go through the flow and set the price without a duration for some reason.

and

I figured it out. I was logged into my main apple id in the sandbox environment. To fix that, generate a sandbox apple id in app store connect, then login to the sandbox apple id you just created by going to Settings->App Store->Sandbox Account.