sentry-native
sentry-native copied to clipboard
Can't get sentry-native to upload crash dumps on macOS (using Rosetta translation)
Hello friends,
I am about to give up, but before I do, let me ask my question here - I cannot get the sentry-native (0.4.12) with a native C++ macOS app upload (or even create one on disk) a crashdump. Sending events works, and the code I have works with crashpad on Windows and with breakpad on Linux, but on the mac, on crash I always get the Apple ProblemReport dialog and not the sentry crash dump. I am not event sure if the Apple reporter is expected on a Sentry-enabled build or not.
I guess my expectations must be wrong somehow on how macOS handles crashes - our app is sandboxed and signed with Developer ID for distribution on DMG, but no matter if I use crashpad or breakpad, or if I even try locally before signing/packaging, I cannot get a single crashdump to be created by the Mac.
Is Apple's OS interfering here? My developer machine is M1/12.0.1, but also other machines downloading our built and signed version don't produce crashdumps. Some are able to send an event. BTW does it matter if it is a native M1 compile or being executed via Rosetta?
Thanks for your help!
similar issues here. The only combination I have gotten to work is when both the application and the crashpad_handler are running m1 native (not in Rosetta)
If the application is running in rosetta, the crashpad_handler does not get notified correctly when there is a crash (regardless of whether the handler is running native or in rosetta). I've traced it down to here in crashpad_util/Source Files/mach_message.cc
:

message->msh_id
is 70
and should be 2407
Same code works as expected on intel and as I stated earlier, on M1, works as expected if both the application and the crashpad_handler are not running in rosetta.
Capturing crashes currently only works when the executable (and crash handler) are running natively, and not when run through rosetta.
Capturing crashes currently only works when the executable (and crash handler) are running natively, and not when run through rosetta.
that would explain it! Any plans for Rosetta support? Thanks for chiming in.
Capturing crashes currently only works when the executable (and crash handler) are running natively, and not when run through rosetta.
Thank you! I suspected that much. Would a universal binary work?
Yes universal binaries should work well.
We don’t have plans to support Rosetta. As times moves on, demand will be lower and lower considering that people move to universal/native binaries instead. Also, although we maintain a couple of patches on top of crashpad, we are not the original authors of it, and maintaining support for Rosetta seems like an unreasonably huge effort for diminishing usefulness.
Hi ,I meet the same issue local crash dump file not upload to sentry? But Sending events works How do i do?
As mentioned before, we currently have no plans to make crash reporting on Rosetta emulation work.
My X86 or arm64 both has this issue,on macos ,which path the crash_handler location? app/Cotents/MacOS/?