Testing Mac App Store application receipt validation is frustrating

Because the receipt file doesn't exist at the following path, my application exits with error code 173.

/Applications/Notched Up.app/Contents/_MASReceipt/receipt

However unlike in the past where it then re-launches and works, I'm now getting the error message that this application is damaged and must be re-downloaded from the App Store.

In the console I see the following messages.

error	12:35:02.553477+0800	Notched Up (com.apple.libsqlite3)	cannot open file at line 45340 of [d24547a13b]
error	12:35:02.553498+0800	Notched Up (com.apple.libsqlite3)	os_unix.c:45340: (2) open(/var/db/DetachedSignatures) - No such file or directory
default	12:35:04.481080+0800	storeuid (com.apple.commerce)	Fetching missing receipt for sandbox app /Applications/Notched Up.app
default	12:35:04.707374+0800	storelegacy (com.apple.commerce)	StoreLegacy: Failed to perform in-line receipt renewal for application at path /Applications/Notched Up.app : 'Error Domain=com.apple.commerce.client Code=500 "(null)"'

My gut is telling me that something internal related to the App Store isn't working correctly as this code was functional a couple of weeks ago and while the first two lines show sql, this app doesn't use sqlite.

  • App is signed with "Apple Distribution".
  • Have tested app with "Apple Development".
  • Have removed entitlements that need a profile and the provisioning profile.
  • The App Store application shows the correct "Sandbox" tester account (in the preferences).
  • I've logged the test account out and back in.
  • I've verified that tester account is the same store locale as my main account.
  • I've rebooted this i9 16" MBP running macOS 12.0.1, even thought it rebooted itself last night, because ????

Any advice, can you spot something I've done wrong?

Answered by rowlands in 698585022

I have been able to get SKReceiptRefreshRequest working, but it's a PITA because it is asynchronous, so it can pop-in while the user is working in the app, which means you can't just terminate any more and must think of how to handle the app's flow for the App Store DRM.

It's not working for many developers.

Same here, I am going nuts. A whole day seeing the error, resetting everything and nothing new. Thank for this post, at least I am not alone.

Mac Sandbox environment has always been terrible with invalid receipts or insanely long merged ones, but this time the deserve a trophy.

Hope they fix it soon, I can't update my app for Mac due to it.

Accepted Answer

I have been able to get SKReceiptRefreshRequest working, but it's a PITA because it is asynchronous, so it can pop-in while the user is working in the app, which means you can't just terminate any more and must think of how to handle the app's flow for the App Store DRM.

no answer to the bug reports, no comments on the forum.

To be clear, neither of these are actually support channels (the former is a community-focused best effort and the latter is for feedback). If you want official support, I recommend that you open a DTS tech support incident.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Has anyone solved the problem? I haven't been able to test my app for almost a month now.

It seems that receipt refresh in the sandbox environment has been fixed by Apple since the release of macOS 12.2. It also works on macOS 10.15.

Same issue here. Just want to test a MAS sandboxed app. This is Xcode 13.4.1 and macOS 12.4. I'd hoped the potential fix in macOS 12.2 solved it but apparently not. I really don't need StoreKit, so calling SKReceiptRefreshRequest isn't attractive unless no other workarounds appear. What is everyone doing?

Same problem

I don't see a solution posted for this. I am unable to run a Unity-based app that works on Android and iOS, as a Mac version. I just wish to run it only local MAC It builds just fine but each time I go to run it, it reports Failed to validate Mac Appstore receipt. But this is not an app in the App Store.

Testing Mac App Store application receipt validation is frustrating
 
 
Q