Search code examples
iosswiftin-app-purchase

receiving SKErrorDomain for In App Purchase in production


I have an app published in app store, with subscription feature. I am sure it works fine, as i see the payments being successfully processed in production environment. Off late i see the following error in my logs, I am not able to identify what error this is. Can anyone kindly help me in identifying this error, what is causing this and how to fix this.

Error Domain=SKErrorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x282b7cfc0 {Error Domain=ASDErrorDomain Code=907 "Unhandled exception" UserInfo={NSUnderlyingError=0x282b7cb40 {Error Domain=AMSErrorDomain Code=6 "Payment Sheet Failed" UserInfo={NSLocalizedDescription=Payment Sheet Failed, NSLocalizedFailureReason=Payment sheet cancelled}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}}}

Thanks, SP


Solution

  • Here is the SKError with Code 2 The obvious case is, your users are just initiating a purchase and later canceling it on payment prompt or don't have a payment method setup.