Skip to content

Conversation

@buenaflor
Copy link
Contributor

@buenaflor buenaflor commented Dec 1, 2025

Note: this will mess up issue grouping because it adds some frames to the stacktrace as well properly symbolicates the stacktace now but I think it's fine since it's such a big improvement

📜 Description

Improve crash handling for iOS/macOS

💡 Motivation and Context

Closes #477

Previously iOS crashes were not synced with scope data.

In cocoa sentrycrashreport_writeStandardReport takes care of writing a crash report to disk which includes all the scope data (which was held in C memory). Executing the crashReporter handler invokes this process.

💚 How did you test it?

Only manually (comparisons below). This test case would need a proper e2e setup that can reliably report crashes e.g via maestro perhaps

We can put writing this e2e test into an issue and do it when we have time

Event links

Images

With synced scope data:
image

Without synced scope data:
image

📝 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.

🔮 Next steps

@buenaflor buenaflor changed the title Update Improve iOS crash reports by adding scope data Dec 1, 2025
// 1. Write a crash report to disk with ALL synced scope data
// 2. Include tags, user, context, breadcrumbs, etc.
// 3. The crash will be sent on next app launch
handler.invoke(throwable.asNSException())

This comment was marked as outdated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds legit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes will have a look

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup we should keep it as true

Image

Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good stuff!

Co-authored-by: Roman Zavarnitsyn <[email protected]>
@buenaflor
Copy link
Contributor Author

Will merge this once 0.22.0 is out so we can isolate this feature into its own release

@buenaflor buenaflor merged commit 6ec35e3 into main Dec 3, 2025
7 checks passed
@buenaflor buenaflor deleted the feat/improve-ios-crash-reports branch December 3, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KMP Crash report doesn't containt any meta information (os version, breadcrumbs, device info and much more)

3 participants