question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

after sign the app,app crash

See original GitHub issue

I 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 `



Uploading image.png…

2017-03-29 10 50

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
sethlucommented, Mar 29, 2017

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

electron-osx-sign <path-to-app> --platform=mas --type=development --entitlements="parent.plist" --provisioning-profile="development.provisioningprofile"

However, if you are sure about the effect after App Sandbox, the following template should work:

electron-osx-sign <path-to-app> --platform=mas --type=distribution --entitlements="parent.plist" [--provisioning-profile="distribution.provisioningprofile"]

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/

1reaction
sangeeth96commented, Apr 2, 2020

@sethlu I’ll move this to a new issue since it changed a bit from OP’s original error after changing the entitlements.

Read more comments on GitHub >

github_iconTop Results From Across the Web

after sign the app,app crash · Issue #130 · electron/osx-sign
Q: When I run my Mac app, it crashes immediately, and the crash log says Exception Type: EXC_CRASH (Code Signature Invalid). What is...
Read more >
How to Fix Crashing Apps on an iPhone or Android?
10 Solutions to fix App Crashes and Keep Apps Running: For Apple iPhone, Samsung Galaxy, LG, Lenovo and Sony Xperia smartphones. If you've...
Read more >
Why do my apps keep crashing on Android, How to fix it
The easiest way to fix an app that keeps crashing on your Android smartphone is to simply force stop it and open it...
Read more >
What to Do If Apps Keep Crashing on an Android Device
Apps crashing on an Android device is not uncommon, but there are several ways to troubleshoot the problem.
Read more >
Android app crashes after Signing - Stack Overflow
when i signing my app app through a key with "minify true" in gradle it crashes after finishes. but when i set "minify...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found