Mac App Store 测试收据验证(来自 receigen)"app is damaged and can't be opened."

Mac App Store testing receipt validation (from receigen) "app is damaged and can't be opened."

我正在使用 Receigen (http://receigen.etiemble.com/) 为我的一个 MacOS 应用程序进行收据验证。这几年来一直运作良好,但有些事情发生了变化。我已经有一年左右没有对此应用进行更新并提交了更改,但由于收据验证无效而被拒绝。

当我尝试在本地测试收据时,它会弹出 App Store 登录,我输入我的电子邮件+密码,然后我收到 "app is damaged" 消息。

我使用 Receigen Code Assistant 生成验证码(它生成收据验证码并尽可能随机化,因此您不能轻易破解每个使用 receigen 的应用程序)。

我使用的是 macOS 10.14.3 和 Xcode 10.2。

这是我的接收生成代码中的 header:

//    
// This code was generated by RECEIGEN 4.0.4 on 2019-04-08 15:54:01 and will use:    
//    
// Bundle Identifier            : com.inadaydevelopment.mac10biiFinancialCalculator    
// Bundle Version               : 2.1.0    
// Receipt Identifier           : com.inadaydevelopment.mac10biiFinancialCalculator    
// Receipt Version              : 2.1.0    
//    
// Language                     : ObjC    
// Platform                     : OSX    
// Code Prefix                  : ReceiptValidation    
// Success Behavior             : RunApplication    
// Failure Behavior             : ExitWith173    
//    
// Certificate Name             : Apple Root CA    
// Certificate Fingerprint      : 611E5B662C593A08FF58D14AE22452D198DF6C60    
// Signer Certificate OID       : 1.2.840.113635.100.6.11.1    
//    
// OpenSSL Version              : 1.0    
//    
// This generated code has to be linked with OpenSSL libcrypto (either statically or dynamically)    
// Refer to the website for more details and specific cases.    
//

我已验证捆绑 ID 和版本与我在 XCode 中的内容相匹配(文本字段不够长,但确实以 com.inaday... 开头):

我查看了 Receigen's diagnostic page 以查看可能的修复方法,但没有任何帮助:

1) 我 looked/searched 通过我的控制台查找任何 "storeagent" 条目,但我从未找到任何条目。也许诊断页面有旧版本 macOS 的信息?

2) 我执行了 "killall" 和 "rm -r" 命令来修复与损坏消息相关的任何缓存问题。我也重启了好几次

3) 我查看了应用程序包,但没有看到任何收据。

4) 我删除了我所知道的该应用程序的唯一副本(我从 App Store 安装的那个)并再次尝试了所有操作。同样的问题。

5) 尝试删除容器。同样的问题。

6) 我试过了 "sudo pkill -f CommerceKit"。同样的问题。

这是我在控制台中找到的:

ReceiptRefreshRequest: Error fetching receipt for /Users/kenny/Library/Developer/Xcode/DerivedData/10bii_Financial_Calculator-edfoaceclymbdsazqdpinclhsejp/Build/Products/Debug/10bii Financial Calculator.app - Error Domain=com.apple.commerce.server Code=500317 "(null)"

这是控制台的完整部分:

default 11:52:42.776265 -0700   commerce    StoreSession: StatusCode: 200; <private>; Environment: SB; URL: https://p100-sandbox.itunes.apple.com/WebObjects/MZFinance.woa/wa/createAppReceipt
debug   11:52:42.776776 -0700   commerce    looked up value <private> for key PrimaryAccount:1 in CFPrefsPlistSource<0x7fe4eb803860> (Domain: com.apple.appstore.commerce, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No)
debug   11:52:42.776811 -0700   commerce    looked up value <private> for key KnownAccounts:1 in CFPrefsPlistSource<0x7fe4ea6058a0> (Domain: com.apple.commerce, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No)
debug   11:52:42.776909 -0700   commerce    Handling response <private> for URL <private>...
debug   11:52:42.776943 -0700   commerce    No handling for HTTP status code 200 in response for URL <private>
default 11:52:42.777268 -0700   storeuid    ReceiptRefreshRequest: Error fetching receipt for /Users/kenny/Library/Developer/Xcode/DerivedData/10bii_Financial_Calculator-edfoaceclymbdsazqdpinclhsejp/Build/Products/Debug/10bii Financial Calculator.app - Error Domain=com.apple.commerce.server Code=500317 "(null)"
debug   11:52:42.777338 -0700   storeuid    Bundle: <private>, key: APP_IS_DAMAGED_TITLE, value: , table: MacAppStore, localizationName: (null), result: APP_IS_DAMAGED_TITLE
debug   11:52:42.777400 -0700   storeuid    Bundle: <private>, key: APP_IS_DAMAGED_TITLE, value: , table: Localizable, localizationName: (null), result: “%@” is damaged and can’t be opened. Delete “%@” and download it again from the App Store.
debug   11:52:42.777427 -0700   storelegacy Bundle: <private>, key: com.apple.commerce.server, value: com.apple.commerce.server, table: Error, localizationName: (null), result: com.apple.commerce.server
debug   11:52:42.777496 -0700   storeuid    Resource lookup at <private>
    Request       : appStore type: icns
    Result        : file:///System/Library/PrivateFrameworks/CommerceKit.framework/Resources/appStore.icns
debug   11:52:42.777471 -0700   storelegacy Bundle: <private>, key: The operation couldn\U2019t be completed. (%@ error %ld.), value: The operation couldn\U2019t be completed. (%@ error %ld.), table: Error, localizationName: (null), result: The operation couldn’t be completed. (%1$@ error %2$ld.)
debug   11:52:42.777544 -0700   storeuid    Bundle: <private>, key: OK, value: , table: MacAppStore, localizationName: (null), result: OK
default 11:52:42.777540 -0700   storelegacy StoreLegacy: Failed to renew receipt for application at path /Users/kenny/Library/Developer/Xcode/DerivedData/10bii_Financial_Calculator-edfoaceclymbdsazqdpinclhsejp/Build/Products/Debug/10bii Financial Calculator.app : 'The operation couldn’t be completed. (com.apple.commerce.server error 500317.)'

在此处找到答案,复制如下以防原件消失: https://forums.developer.apple.com/thread/92419

问题是我试图使用我的普通 iTunes 帐户登录。


...用户必须使用沙盒测试用户 Apple ID, 而不是 他们自己的 Apple ID,当时我还不清楚。此外,我发现用户需要使用自己的 Apple ID 注销 Mac App Store,以便能够在请求时甚至输入沙盒测试用户 Apple ID。

但是,沙盒测试用户帐户是特定于国家/地区的。因此,每个国家/地区都需要一个沙盒测试用户。现在,我有一个新国家/地区的用户的非常相似的错误消息。我可能不得不使用另一个 DTS 请求来解决这个问题。