Electron App EXC_BREAKPOINT (SIGTRAP) Namespace SIGNAL Thread 0 Crashed FatalProcessOutOfMemory
Hello, I have an Electron app that took a while to get deployed to Testflight.
I ended up having to:
manually remove "print" and "sandbox" related entitlements, recreate certificate signing requests and certificates, and get the appropriate provisioning profiles
run electron-osx-sign out/Thea-mas-x64/Thea.app --identity='3rd Party Mac Developer Application' --entitlements=entitlements.plist --provisioning-profile=Thea11072024.provisionprofile --platform=mas --no-pre-auto-entitlements
after manually adjusting entitlements.plist to what we need
run productbuild --sign "3rd Party Mac Developer Installer: Govinda Dasu" --component out/Thea-mas-x64/Thea.app/ /Applications "Thea.pkg"
upload Thea.pkg to the Transporter app
Finally after 30-40 hours of investigation, given missing documentation on electron's website, I managed a successful to Testflight.
However, when I try to open the app I get the following error
Translated Report (Full Report Below)
-------------------------------------
Process: Thea [29595]
Path: /Applications/Thea.app/Contents/MacOS/Thea
Identifier: com.ldtalentwork.thea
Version: 1.0.15 (1.0.15)
App Item ID: 1623683489
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2023-11-14 09:23:27.0219 +0545
OS Version: macOS 13.5 (22G74)
Report Version: 12
Bridge OS Version: 7.6 (20P6072)
Anonymous UUID:
Sleep/Wake UUID: 14139C75-C5B8-4ACD-AEE5-64B8651D5115
Time Awake Since Boot: 220000 seconds
Time Since Wake: 70911 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process: exc handler [29595]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 Electron Framework 0x11bbe51b3 node::AsyncResource::get_async_id() const + 28112899
1 Electron Framework 0x118b1d365 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) + 1013
2 Electron Framework 0x118b1d1d4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) + 612
3 Electron Framework 0x118ce4bd7 v8::internal::Heap::StartIncrementalMarking(int, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) + 983
4 Electron Framework 0x118d69eb0 v8::internal::MemoryAllocator::Unmapper::EnsureUnmappingCompleted() + 1200
5 Electron Framework 0x118d6a090 v8::internal::MemoryAllocator::Unmapper::EnsureUnmappingCompleted() + 1680
6 Electron Framework 0x118d6a516 v8::internal::MemoryAllocator::AllocatePage(v8::internal::MemoryAllocator::AllocationMode, v8::internal::Space*, v8::internal::Executability) + 86
7 Electron Framework 0x118d7a82e v8::internal::PagedSpaceBase::Expand() + 46
8 Electron Framework 0x118d7bda0 v8::internal::PagedSpaceBase::RawRefillLabMain(int, v8::internal::AllocationOrigin) + 1152
9 Electron Framework 0x118d7b911 v8::internal::PagedSpaceBase::RefillLabMain(int, v8::internal::AllocationOrigin) + 33
10 Electron Framework 0x118cd8091 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) + 769
11 Electron Framework 0x1191b4a74 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) + 996
12 Electron Framework 0x1191b7b71 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) + 4657
13 Electron Framework 0x1191b6896 v8::internal::Deserializer<v8::internal::Isolate>::VisitRootPointers(v8::internal::Root, char const*, v8::internal::FullObjectSlot, v8::internal::FullObjectSlot) + 54
14 Electron Framework 0x118cee9d8 v8::internal::Heap::InSpaceSlow(unsigned long, v8::internal::AllocationSpace) const + 568
15 Electron Framework 0x1191cb2b8 v8::internal::WarmUpSnapshotDataBlobInternal(v8::StartupData, char const*) + 504
16 Electron Framework 0x118c6fecc v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) + 2972
...
I even stripped down the app to just a hello-world app and I still get this error:
Translated Report (Full Report Below)
-------------------------------------
Process: Thea [16362]
Path: /Applications/Thea.app/Contents/MacOS/Thea
Identifier: com.ldtalentwork.thea
Version: 1.0.17 (1.0.17)
App Item ID: 1623683489
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2023-12-11 16:17:55.2204 -0600
OS Version: macOS 13.5 (22G74)
Report Version: 12
Bridge OS Version: 7.6 (20P6072)
Anonymous UUID:
Sleep/Wake UUID: 7346D434-BDEE-483B-B37F-EBE27703730F
Time Awake Since Boot: 1200000 seconds
Time Since Wake: 33514 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
...
I have looked into the following resources briefly but none look like promising approaches and I am not sure what to try.
https://electronjs.org/docs/latest/api/crash-reporter
https://stackoverflow.com/questions/11096319/thread-0-crashed-with-x86-thread-state-32-bit-in-cocoa-application
https://developer.apple.com/forums/thread/734414 (symbolication suggested by eskimo)
https://github.com/electron/electron/issues/34253#issuecomment-1200373890 (package.json product name)
https://github.com/electron/electron/issues/15725#issuecomment-545848856 (from 2019 so perhaps irrelevant)
https://stackoverflow.com/questions/71344200/node-addon-crashes-in-electron-but-works-fine-in-vanilla-node (seems to be about a different error though)
https://github.com/electron/electron/issues/39938 (also seems to be a different error)
Can eskimo or someone at Apple please help? Thank you.