我已经开发了一个数字版权管理播放应用程序,使用的内容安全(https://github.com/castlabs/electron-releases)的Castlabs电子叉在MacOS高塞拉。我收到应用程序无法在某些MacOS版本上启动的报告,并显示以下错误消息:
Process: indee [52975]
Path: /Applications/indee.app/Contents/MacOS/indee
Identifier: com.electron.indee
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: indee [52975]
User ID: 503
Date/Time: 2019-02-25 20:25:09.463 +0530
OS Version: Mac OS X 10.11.6 (15G31)
Report Version: 11
Anonymous UUID: 4BF915F3-40DA-0ABC-3930-F21B00CF3FD7
Sleep/Wake UUID: 69FABBB3-0032-4519-81B0-0CB25B679ACC
Time Awake Since Boot: 650000 seconds
Time Since Wake: 240 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
dyld: launch, loading dependent libraries
Dyld Error Message:
Symbol not found: _kSecAttrKeyTypeECSECPrimeRandom
Referenced from: /Applications/indee.app/Contents/MacOS/../Frameworks/Electron Framework.framework/Electron Framework
Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security
in /Applications/indee.app/Contents/MacOS/../Frameworks/Electron Framework.framework/Electron Framework据我所知,这个问题并不能在运行相同macOS版本的不同Mac上一致重现,但它很常见,以至于造成了问题。我该如何解决这个问题?
发布于 2019-02-28 22:09:18
作为参考,electron-releases中报告的几个问题讨论了此问题的原因和解决方案:#34和#30。
简而言之,当构建使用的是macosx10.12sdk的旧版本时,如果可用性宏不能正确地指示kSecAttrKeyTypeECSECPrimeRandom符号在目标操作系统版本上的可用性,就会出现这个问题。这会导致对符号使用非弱链接,有效地使其成为必需的,从而在缺少符号的系统(即10.12 -Sierra之前的系统)上导致失败。我们的解决方案是在构建版本时使用MacOSX10.12SDK的校正版本,例如Xcode 8.3.3提供的版本。
https://stackoverflow.com/questions/54906293
复制相似问题