Issues with StoreKit API

Hello, Apple Developer Forum team. My team wishes you happy New Year and late Merry Christmas! We wish you a pay raise and a lot of days off! :)

Right now, my company works on a new program called MyQuickMac for macOS, which we plan to submit to App Store. Currently, my developer team is working on adding the in-app purchases to our product. While working on it, they encountered several issues, and this is exactly why I'm writing to you. Below, my team describes exactly which error did they encounter, and what did they try to resolve it. Please help us resolve these problems, it's very important for us.

Our current product is built using Electron and Python as a server (Flask). We use the "InAppPurchases" module from Electron to add the in-app purchases (https://www.electronjs.org/docs/latest/tutorial/in-app-purchases). Currently, we use the Sandbox to test our system, and we encountered the following problem when we try to purchase any product:

  Purchasing mqm_1y2m...
  {
    transactionIdentifier: '',
    transactionDate: '',
    originalTransactionIdentifier: '',
    transactionState: 'failed',
    errorCode: 0,
    errorMessage: 'MZFinance.NoAccount_message',
    payment: { productIdentifier: 'mqm_1y2m', quantity: 1 }
  }
  { productIdentifier: 'mqm_1y2m', quantity: 1 }
  Failed to purchase mqm_1y2m.

This error occurs when we click on the "Buy" button, after our program submits the payment to the payments queue. The payment is successfully added to the payment queue, but after we log in with our testing account, this error occurs. We have read the documentation (https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox?language=objc), and it says that to test the in-app purchases, we need to try to buy the product, log in with the testing account, and after this testing account will be added to the App Store automatically, but it doesn't happen. What do we do wrong? We tried creating several testing accounts, but none of them worked.

Also, we can't sign out of the testing account after logging in. Currently, to do this we have to clear the App Store cache, remove all testing account-related items from the Keychain and reboot our device, which is a long process. We have read that to log out of the testing account, you need to select "Sign out" from the App Store, but because of the problem specified above, the App store doesn't have this option. Is this the correct way to sign out of the testing account? We hope that there should be some easy way to do it.

We tried to find some information about the error "MZFinance.NoAccount_message", but there were only 5 results, and none of them were helpful. We tried the following to resolve this error: created different testing accounts (we tried 3 accounts, none worked) changed the country of the testing accounts cleared the payment queue reset the password of the testing account tried different products tried to log in to the App Store and iCloud with the testing account restarted our device numerous times cleared the App Store cache deleted the entries left after trying some testing accounts in the Keychain signed the Electron ".app" with our certificate

None of these helped us, we get the same error every time.

Here's the link to the code we use to initialize the payments and observe the queue. Initialize payments: https://pastebin.com/S9KvsNGK Observe queue: https://pastebin.com/v1Gmqqz5

Also, we attach 2 log files that were recorded with the "Console" application, while trying to purchase a product. Log #1 (all messages): https://pastebin.com/jpuJaMqv Log #2 (only messages from "commerce" process): https://pastebin.com/w27qkyEB

So, our questions are:

  1. Why testing account isn't added to the App Store?
  2. Why does "MZFinance.NoAccount_message" error occur?
  3. How do we log out from the testing account?

We hope that the Apple Developer Forum team will help us resolve these issues.

Some information: Device: Mac Mini 2011 with macOS 10.12.6 Electron: 16.0.4 Python: 3.8.8

If you need any other information, please let us know, and we will send it to you as soon as possible. I hope that together, we will resolve these problems, and our new program will be successfully submitted to the App Store.

Thank you and have a nice day! Oleksii and team. Owner of American Best Technologies Company, LLC.

It's been a few weeks so hopefully you've figured this out. But note that you must first attempt to purchase the IAP from your app that was installed via Xcode and its then you should be promoted to sign-in with a Sandbox Apple ID. The steps you have noted about the inability to sign-out, clearing cache and keychain, etc. - all should not be necessary. Please see this article for more info: https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox

If you continue to have issues please file a Feedback Assistant ticket with as much detail as you can provide (screenshots, logs, app ID/bundle ID, sandbox Apple ID, product ID's, sysdiagnose, etc.). http://feedbackassistant.apple.com

Hello. Sadly, I still didn't resolve my issue. I continued my investigation, and found very interesting detail: I tried to buy some IAP in Evernote (built with Electron) and I couldn't do it. I opened Evernote and recorded the log in Console app, and we saw the following message in the log: default 19:09:24.479326 +0200 storeuid Error checking server purchase queue: Error Domain=com.apple.commerce.server Code=1001 "MZFinance.NoAccount_message" UserInfo={NSLocalizedDescription=MZFinance.NoAccount_message} It's MZFinance.NoAccount_message again, exactly the same error as I have!

We opened UpNote (built with Electron) and the same error occurred. We also did the same thing with "Nimbus Note" (also built with Electron), and got the same error.

This is very strange, but as you can see, my program's code is not the issue here. I attach 3 logs recorded with Console app, each log made while opening Evernote, UpNote, and Nimbus app.

I doubt that such popular and big app as Evernote has problems with IAP, probably it's related to the environment. Please let me know your thoughts about these strange errors :)

I get the same error

Issues with StoreKit API
 
 
Q