after sign the app,app crash
See original GitHub issueI used electron-packager to build the app electron-packager . “test” --platform=mas --arch=x64 --overwrite --asar --app-bundle-id=“xx.xxxxxx.xx” --app-version=“1.4.0” --build-version=“201730801”
and use osx-sign to sign it,
electron-osx-sign /Users/test-mas-x64/test.app --entitlements=‘/Users/test/parent.plist’ --entitlements-inherit=‘/Users/test/child.plist’ --platform=mas
and app signed successful,
but when I open it,it crash .
`Process: test [76424] Path: /Users/USER/Downloads/*/test.app/Contents/MacOS/test Identifier: xx.xxxxx.xx Version: ??? Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: test [76424] User ID: 502
Date/Time: 2017-03-29 10:35:12.166 +0800 OS Version: Mac OS X 10.12.1 (16B2657) Report Version: 12 Anonymous UUID: 92100232-AE6E-6007-A348-F50E82901732
Sleep/Wake UUID: 9E03B3CD-0D25-4753-8E38-6166BB507767
Time Awake Since Boot: 510000 seconds Time Since Wake: 1800 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_CRASH (Code Signature Invalid) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x1
kernel messages:
VM Regions Near 0 (cr2): –> mapped file 000000010e01e000-000000010e01f000 [ 4K] r-x/rwx SM=COW p<m
Thread 0 Crashed: 0 dyld 0x0000000116e5f000 _dyld_start + 0 1 ??? 0x000000010e01e000 0 + 4529971200
Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x00007fff51be1c58 r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000 r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000 rip: 0x0000000116e5f000 rfl: 0x0000000000000200 cr2: 0x0000000000000000
Logical CPU: 0 Error Code: 0x00000000 Trap Number: 0
Binary Images: 0x116e5e000 - 0x116e9b287 dyld (421.2) <F5F79617-5669-3424-A2CF-18B23BB0C0C7> /usr/lib/dyld
External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 15862703 thread_create: 0 thread_set_state: 0
VM Region Summary: ReadOnly portion of Libraries: Total=336K resident=0K(0%) swapped_out_or_unallocated=336K(100%) Writable regions: Total=8404K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8404K(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= STACK GUARD 56.0M 2 Stack 8192K 2 VM_ALLOCATE 4K 2 __DATA 220K 3 __LINKEDIT 88K 2 __TEXT 248K 2 mapped file 20K 4 shared memory 8K 3 =========== ======= ======= TOTAL 64.6M 12
Model: MacBookAir6,2, BootROM MBA61.0099.B22, 2 processors, Intel Core i5, 1.4 GHz, 4 GB, SMC 2.13f15 Graphics: Intel HD Graphics 5000, Intel HD Graphics 5000, Built-In Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80CE, 0x4B3445384533303445452D45474345000000 Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80CE, 0x4B3445384533303445452D45474345000000 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.21.171.47.1a8) Bluetooth: Version 5.0.1f7, 3 services, 27 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 Serial ATA Device: APPLE SSD SM0128F, 121.33 GB USB Device: USB 3.0 Bus USB Device: BRCM20702 Hub USB Device: Bluetooth USB Host Controller USB Device: Rapoo 2.4G Wireless Device Thunderbolt Bus: MacBook Air, Apple Inc., 23.6 `
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (9 by maintainers)
Top GitHub Comments
@tw234tw The app is expected to crash after signed for distribution on the Mac App Store. Due to this issue, to test the app before submitting it to iTC, I would suggest using the following template for signing: (A provisioning profile is used so that the local machine can run the app locally.)
However, if you are sure about the effect after App Sandbox, the following template should work:
I am unsure if the provisioning profile is totally optional for this case but I would recommend having one just in case. It will be removed by Apple when the app is ready for publishing.
Q: When I run my Mac app, it crashes immediately, and the crash log says Exception Type: EXC_CRASH (Code Signature Invalid). What is going on here? https://developer.apple.com/library/content/qa/qa1884/_index.html
Ref: https://mintkit.net/electron-userland/electron-osx-sign/guide/
@sethlu I’ll move this to a new issue since it changed a bit from OP’s original error after changing the entitlements.