SKReceiptRefreshRequest may damage a mac app

Originator:hannes.oud.dev
Number:rdar://37534672 Date Originated:14-Feb-2018 04:14 PM
Status:Closed Resolved:macOS Mojave
Product:macOS + SDK Product Version:macOS 10.13.3
Classification:Serious Bug Reproducible:Always
 
Summary:
Running a SKReceiptRefreshRequest in our Released App recently caused the Mac App Store to claim that the app is damaged and needs to be re-downloaded.

Steps to Reproduce:
1. Install a Mac App from Mac App Store
2. Restore Purchases

Expected Results:
The receipt file should be updated without issues.

Actual Results:
There is an Alert that the App is damaged and needs to be redownloaded.
The receipt file is not updated.
The SKReceiptRefreshRequest completes an Error: Domain=ISErrorDomain Code=500328 "500328" UserInfo={NSLocalizedFailureReason=500328}

Version:
macOS 10.13.3

Notes:
What we found out didn’t help: 
- exit(173) the application (still claims broken)
- redownload, then try again (same issue)

What did help:
- sign out of Mac App Store
- sign back in to Mac App Store
- redownload the App and try again, this time the SKReceiptRefreshRequest works without issues.

Same observations were made on macOS 10.13.2.

The SKReceiptRefreshRequest is called from a framework target (not the main bundle), not sure this is a factor.

Comments

Developer Relations

We believe this issue has been resolved in the latest macOS 10.14 beta.

Please test with the latest beta. If you still have issues, please update your bug report with any relevant logs or information that could help us investigate.

macOS beta https://developer.apple.com/download/

By hannes.oud.dev at July 11, 2018, 5:05 p.m. (reply...)

May also happen on 10.13.4

By hannes.oud.dev at May 2, 2018, 9:15 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!