getsentry / sentry-unity

Development of Sentry SDK for Unity
https://docs.sentry.io/platforms/unity/
MIT License
204 stars 51 forks source link

Whether to support timely reporting of Native crashes? #1667

Open WeiLingQiang opened 3 months ago

WeiLingQiang commented 3 months ago

Environment

How do you use Sentry? Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?)

Which version of the SDK? v2.0.6

How did you install the package? (Git-URL, Assetstore) Git-URL

Which version of Unity? 2021.3.33f1

Is this happening in Unity (editor) or on a player like Android, iOS, Windows? ALL

Steps to Reproduce

  1. Trigger Native crash reporting to Sentry platform
  2. After Native crashes, it cannot be reported in time. It will not be reported until the second time the application is opened.

Expected Result

Report Native immediately after it crashes instead of waiting until the second time you open the app.

Actual Result

Any logs or screenshots

bitsandfoxes commented 3 months ago

The native crash reporting relies on the respective native SDK. This means sentry-cocoa for macOS and iOS, sentry-jave for Android, and sentry-native for Windows and Linux. Those SDKs handle crash reporting slightly differently.

It's not a random decision by the Unity SDK when to send those events but rather the Unity SDK relying on the native SDKs to work with their platform's requirements and restrictions.