Search code examples
iosswiftxcodestorekit

Store Kit 2 Error - Error Domain=ASDErrorDomain Code=509 "No active account"


I'm trying to implement the StoreKit2 API to implement IAPs, but keep getting the error Error Domain=ASDErrorDomain Code=509 "No active account".

I've researched online but can't find ANY information about different ASDErrorDomain error codes. Does anyone know what this error means?

If you're curious, my full error log is below.

2022-05-31 02:33:35.491370-0500 (app name deleted for privacy) [Default] Error enumerating unfinished transactions for first transaction listener: Error Domain=ASDErrorDomain Code=509 "No active account" UserInfo={NSLocalizedDescription=No active account}
2022-05-31 02:33:35.884686-0500 (app name deleted for privacy) [Default] [StoreKit] Failed to get products through appstored in simulator, will try using appstoreagent on host mac:
Error Domain=ASDErrorDomain Code=507 "Error decoding response" UserInfo={NSLocalizedDescription=Error decoding response, NSLocalizedFailureReason=Could not decode media products response}
2022-05-31 02:33:36.296678-0500 (app name deleted for privacy) [Default] Error enumerating monthlySubscription current transactions: Error Domain=ASDErrorDomain Code=509 "No active account" UserInfo={NSLocalizedDescription=No active account}
objc[16313]: Class _PathPoint is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x126673338) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x137570fe8). One of the two will be used. Which one is undefined.
objc[16313]: Class _PointQueue is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x126673310) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x137571010). One of the two will be used. Which one is undefined.

Solution

  • I did some googling myself and could not find much but ran into this link https://developer.apple.com/forums/thread/660287 which tells me your device is not connected to the Apple Store therefore unable to proceed to the usage of StoreKit. Go to the settings and tap on the first section of it where the profile picture is and sign in with a valid appleid. I hope this helps!