在某些MacOS版本上运行时,Castlabs电子应用程序中断了

时间:2019-02-27 13:10:43

标签: macos electron electron-builder

我已经在MacOS High Sierra上使用Castlabs电子叉为内容安全(https://github.com/castlabs/electron-releases)开发了DRM播放应用程序。我收到有关在某些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上不能始终如一地再现,但是它足以引起问题。我该如何解决?

1 个答案:

答案 0 :(得分:0)

作为参考,electron-releases中报告的两个问题讨论了该问题的原因和解决方案:#34#30

简而言之,当内部版本使用较旧版本的MacOSX10.12 SDK时,会出现此问题,其中可用性宏错误地指示kSecAttrKeyTypeECSECPrimeRandom符号在目标os版本上的可用性,而不在其中。这会导致将非弱链接用于符号,从而有效地使其成为必需符号,从而在缺少符号的系统(即10.12-Sierra之前的系统)上引起故障。为我们提供的解决方案是在构建发行版时使用MacOSX10.12 SDK的正确版本,例如Xcode 8.3.3随附的版本。