Hi guys,
New to publishing apps on Apple Store. I encounter some notarization error before and resolved it in this post.
By solving the previous issue, I updated the Trust setting from "Always Trust" to "Use System Defaults" for Apple certificates. The codesign and notarization no longer give me any problem. But now, I encountered another issue. When I ran the .app on my local Macbook, it now gives me "zsh: trace trap" error. Dive a little further and check the crash report, I found the some details as following.
Process: my_app [30652]
Path: /Users/USER/my_app_path
Identifier: my_app
Version: 0.0.0 (???)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2025-07-15 14:57:58.9874 -0400
OS Version: macOS 15.5 (24F74)
Report Version: 12
Anonymous UUID: 2335F0B6-A26E-6446-6074-0FCE620C4B6A
Time Awake Since Boot: 6000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
Exception Codes: UNKNOWN_0x32 at 0x00000001064b4000
Exception Codes: 0x0000000000000032, 0x00000001064b4000
Termination Reason: Namespace CODESIGNING, Code 2 Invalid Page
VM Region Info: 0x1064b4000 is in 0x1064b4000-0x1064b8000; bytes after start: 0 bytes before end: 16383
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
mapped file 1064ac000-1064b4000 [ 32K] r-x/rwx SM=COW Object_id=d2a02fbf
---> VM_ALLOCATE 1064b4000-1064b8000 [ 16K] r-x/rwx SM=PRV
__TEXT 1064b8000-1068a4000 [ 4016K] r-x/rwx SM=COW my_app.app/Contents/Frameworks/Python.framework/Versions/3.12/Python
I can tell it's about codesign and signature invalid. I have tried to rebuild, re-codesign and re-notarize. But the error still persists. Could someone help me? Thanks!
Thanks for the crash report.
This clearly indicates that your app was up and running when it crashed. The backtrace of the crashing thread looks like this:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_platform.dylib … sys_icache_invalidate + 40
1 libllvmlite.dylib … llvm::sys::Memory::protectMappedMemory(llvm::sys::MemoryBlock const&, unsigned int) + 356
2 libllvmlite.dylib … LLVMPY_TryAllocateExecutableMemory + 92
3 libffi.dylib … ffi_call_SYSV + 80
4 libffi.dylib … ffi_call_int + 1220
5 _ctypes.cpython-312-darwin.so … _ctypes_callproc + 1384
6 _ctypes.cpython-312-darwin.so … PyCFuncPtr_call + 212
7 Python … _PyObject_Call + 164
That suggests you’re hitting a hardened runtime incompatibility. See Resolving Hardened Runtime Incompatibilities.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"