Skip to content

Support native Android crashes #95

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

Closed
bruno-garcia opened this issue Mar 29, 2021 · 4 comments · Fixed by #307
Closed

Support native Android crashes #95

bruno-garcia opened this issue Mar 29, 2021 · 4 comments · Fixed by #307
Labels
Feature New feature or request

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Mar 29, 2021

A player built for Android can fail with Java/Kotlin or with native (NDK). Sentry's Android SDK supports both. And Sentry's gradle plugin can upload proguard/R8 files of minified builds.

sentry-android would also give support for release health, given crashes and errors were communicated downstream by the .NET SDK to reflect in the sessions.

In terms of adding it to this project, we could consider git submodule or gradle with their pros and cons. Perhaps more easily is to rely on gradle (if we can inject gradle dependencies through UPM) but for development it's easier to bring it in as submodule.

The gradle approach was used in the MVP demo'd on this video. It was using the gradle template approach.

The original MVP of this project included native Android support. As prepare the project to be the new official SDK we decided to start off with the .NET-only API and add Android on a following iteration.
This issue tracks adding sentry-android.

Delete until needed for Android:

https://github.com/getsentry/sentry-unity/blob/fd4a26e239d18865f1c947e3551178a1cde00120/src/Sentry.Unity.Editor/AndroidManifestConfiguration.cs

@canyousayyes
Copy link

Hello. Based on the issue, does it mean that Sentry-Unity cannot capture any native crashes at this moment?
Do you have any updates and ETA for the native Android crash support?

@bruno-garcia
Copy link
Member Author

@canyousayyes we plan to ship this in Q3. Currently you can add the sentry-android SDK directly via gradle and it will capture native crashes. We will just make the integration easier to install and from there share some extra context data between the C# and Java/NDK layers.

@canyousayyes
Copy link

canyousayyes commented Jun 9, 2021

Thanks for the info. Just noticed there's also #164 , does that mean we also need to install sentry-cocoa ourselves to capture native crashes on iOS side as well?

If we want to:

  • Capture exceptions in Unity
  • Send custom error events in Unity
  • Capture native crashes

on both Android and iOS platforms,

We need both Unity-sentry for the first 2 use cases, and (sentry-android + sentry-cocoa) for the third one. Is my understanding correct?

@bruno-garcia
Copy link
Member Author

We need both Unity-sentry for the first 2 use cases, and (sentry-android + sentry-cocoa) for the third one. Is my understanding correct?

That's right.
We'll bundle it all for you and make sure the native layer is initialized automatically too. This is coming in the next few months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants