Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash reports not generated on visionOS #4217

Closed
miki-shapr opened this issue Aug 1, 2024 · 5 comments
Closed

Crash reports not generated on visionOS #4217

miki-shapr opened this issue Aug 1, 2024 · 5 comments

Comments

@miki-shapr
Copy link
Contributor

miki-shapr commented Aug 1, 2024

Platform

visionOS

Environment

Production

Installed

CocoaPods

Version

8.32.0

Xcode Version

15.4

Did it work on previous versions?

No

Steps to Reproduce

  1. make the app crash
  2. on next launch print SentrySDK.crashedLastRun

Expected Result

The value printed should be true.

Actual Result

false is printed.

I've found that the root cause of the issue is that even though visionOS supports signals, the SENTRY_HAS_SIGNAL is set to 0 and thus no signal handlers are installed. The resolution should be to set the value of the flag to 1 on visionOS as well.

Are you willing to submit a PR?

Yes

@brustolin
Copy link
Contributor

Thanks @miki-shapr for reaching out.
I could reproduce this. We will investigate.

@philipphofmann
Copy link
Member

@miki-shapr, does only crashedLastRun return the wrong value, or do no crash events appear in Sentry, or both? Also, how exactly do you make the app crash?

@miki-shapr
Copy link
Contributor Author

miki-shapr commented Aug 1, 2024

@philipphofmann There are no crashes appearing in Sentry either. I made the app crash with SentrySDK.crash().

As I've mentioned, the issue is that the SENTRY_HAS_SIGNAL and friends are defined to be 0 on visionOS even though they are in fact supported.

So essentially in SentryInternalCDefines.h there's a few || SENTRY_HOST_VISION missing from the conditions that define the Sentry internal flags.

I've patched this file locally and afterwards I could see the crashes appearing in Sentry.

@philipphofmann
Copy link
Member

@miki-shapr, would you be open to opening a PR to fix this?

@miki-shapr
Copy link
Contributor Author

@philipphofmann Yeah sure, I'll open a PR soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

No branches or pull requests

3 participants