Apple Store product subscribe error with An unknown error occurred

Viewed 160

I add an SKU as an auto-renewable subscription on App Store Connect. I have codes below in the main class.

public static final String SKU_TW_1_YEAR="com.visionx.tw.subscribe.1year.2"; 


Purchas iap = Purchase.getInAppPurchase();
// Define a receipt loader
iap.setReceiptStore(createReceiptStore());
iap.subscribe(SKU_TW_1_YEAR);

@Override
public void itemPurchaseError(String sku, String errorMessage) {
    ToastBar.showErrorMessage("!subscribe_failure:"+errorMessage);
}

The callback procedure itemPurchaseError is called with an error message:

An unknown error occurred

Are there any procedures I can follow to check the settings of App Store connect or debug for solving this problem?

I have a screenshot of the SKU setting on App store connect for checking. enter image description here

I run my App on my iPhone 7 through Xcode for subscribing my pdoduct. The console on Xcode shows messages below.

2022-07-17 13:33:41.976707+0800 VisionClass[8023:356071] Reachability Flag Status: -R t------ networkStatusForFlags 2022-07-17 13:34:55.142646+0800 VisionClass[8023:355757] SKPaymentTransactionStatePurchasing 2022-07-17 13:34:56.593077+0800 VisionClass[8023:356563] <SKPaymentQueue: 0x281cecd00>: Payment completed with error: Error Domain=ASDServerErrorDomain Code=3502 "This item is not available." UserInfo={NSLocalizedDescription=This item is not available.} 2022-07-17 13:34:56.597138+0800 VisionClass[8023:355757] Transaction error Error Domain=SKErrorDomain Code=0 "An unknown error occurred" UserInfo={NSLocalizedDescription=An unknown error occurred, NSUnderlyingError=0x288dc2c10 {Error Domain=ASDServerErrorDomain Code=3502 "This item is not available." UserInfo={NSLocalizedDescription=This item is not available.}}}

1 Answers

According to the error messages on the console, I add the bank account and tax information. I can subscribe to my product now. Thank you.

Related