Mac App Store测试收据验证(来自收据)“应用程序已损坏,无法打开。”

时间:2019-04-09 19:42:03

标签: macos mac-app-store receipt-validation receigen

我正在使用Receigen(http://receigen.etiemble.com/)对我的MacOS应用之一进行收据验证。这已经工作了好几年,但是情况有所改变。一年多以前我都没有对此应用程序进行更新并提交了更改,但由于收据验证无效而被拒绝。

当我尝试在本地测试收据时,它会弹出App Store登录,输入我的电子邮件和密码,然后收到“应用程序已损坏”消息。

我使用了Receigen Code Assistant来生成验证码(它生成收据验证码并对其进行尽可能多的随机化,因此您不能轻易破解所有使用Receigen的应用程序)。

我正在使用macOS 10.14.3和Xcode 10.2。

这是我的回执生成代码的标头:

//    
// 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.    
//

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

enter image description here

我浏览了Receigen's diagnostic page以查看可能的解决方法,但没有帮助:

1)我在控制台中查找/搜索了任何“ storeagent”条目,但从未找到。也许“诊断”页面包含有关旧版macOS的信息?

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

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

4)我删除了我所知道的应用程序的唯一其他副本(我已经从App Store安装了该副本),然后再次尝试了所有操作。同样的问题。

5)尝试卸下容器。同样的问题。

6)我尝试了“ sudo pkill -f CommerceKit”。同样的问题。

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

  

ReceiptRefreshRequest:获取以下商品的收据时出错   /用户/肯尼/图书馆/开发人员/ Xcode / DerivedData / 10bii_Financial_Calculator-edfoaceclymbdsazqdpinclhsejp /构建/产品/调试/ 10bii   Financial Calculator.app-错误Domain = com.apple.commerce.server   代码= 500317“(空)”

这是控制台的完整部分:

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.)'

1 个答案:

答案 0 :(得分:0)

在这里找到了答案,如果原件消失了,请在下面复制: https://forums.developer.apple.com/thread/92419

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


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

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