Open cstavitsky opened 5 months ago
Hey, the configuration looks fine. So this is nothing that
I'm having trouble summarizing this as there seem to be a couple of issues in one. On Android:
On iOS - it never works? It doesn't work in a released build out of the app store?
Just to make sure this isn't it, we have a know limitation regarding line numbers documented here. But based on the stacktrace in the screenshots this ain't the issue here.
One thing I noticed on the stacktraces of these issues: Both of them seem to originate from plugins. Do those plugins provide debug symbols as part of their packages? Are they just .cs scripts?
Some links to those issues would be greatly appreciated.
I'm having trouble summarizing this as there seem to be a couple of issues in one. On Android:
- Line numbers work in regular builds/dev-builds when outputting an APK and running that on a device
- Line numbers do not work when uploading to the google playstore as an aab
@bitsandfoxes thanks for taking a look! Today our customer sent this additional context:
We have more context about the issue:
- We use the following command to distribute the AAB file:
gradle bundleRelease -b build.gradle
- We have tried installing the AAB file on a device and got the following results:
Line of code is shown in the case of:
- Installing using the adb tool from a MacOS machine with bundleTool and mode=universal:
java -jar ~/bundletool/bundletool.jar build-apks --bundle=/path/to/your_app.aab --output=/path/to/output.apks --mode=universal
- Uploading the AAB file to Microsoft AppCenter, then downloading and installing it. Note that in AppCenter’s documentation it is mentioned:
"When you distribute Android Application Bundle (AAB), App Center generates a universal APK, signs it with a generated signing key, and distributes it to a device."
Source: linkThe line of code is NOT shown in the case of:
- Installing from Google beta/Google Play Store
There is a difference between installing the app from Google and manually installing using Mode Universal. When installing from Google, the AAB itself will be split into smaller APKs as defined in the build.gradle, for example: base-master.apk, base-arm64_v8a.apk, base-armeabi_v7a.apk. For some reason, the symbol files uploaded to Sentry do not work fully with this method. Below is the list of symbol files uploaded with the build.
From the early days of implementing Sentry, we found that if we only use the “Upload Dev Symbols” and “Upload Sources” options in the Symbols tab of Sentry Unity Tools, the line of code is not displayed even with the APK file. Therefore, we used this command to upload the Symbols after building the app:
export SENTRY_PROPERTIES=./sentry.properties && ./sentry-cli-Darwin-universal debug-files upload --include-sources --il2cpp-mapping [project-path]
We noticed that using the above command results in a more complete upload of symbol files, and the line of code is displayed for the APK file. So, we are currently continuing to use this method of uploading.
That concludes their additional context. To address your other questions:
On iOS - it never works? It doesn't work in a released build out of the app store?
This I will need to clarify with the customer. They came asking about the problem primarily with Android (and while poking around I noticed that some line numbers are also missing). So from their perspective, the original problem is primarily the Android one, I just surfaced what I thought might be a relevant problem.
Just to make sure this isn't it, we have a know limitation regarding line numbers documented here. But based on the stacktrace in the screenshots this ain't the issue here.
I will also need to confirm this with the customer. I'll also encourage them to reply directly here to you to save time!
One thing I noticed on the stacktraces of these issues: Both of them seem to originate from plugins. Do those plugins provide debug symbols as part of their packages? Are they just .cs scripts?
I will encourage the customer to follow up about this as well.
Some links to those issues would be greatly appreciated.
Links to these issues are here in the internal customer case.
@bitsandfoxes As we can see currently, line numbers are displayed for the iOS production build, except for some cases:
We will retry these cases with StackTraceMode.Enhanced.
Currently, we are focusing on the issue of line numbers not displaying for the Android production build (installed with the aab file). And this issue simply comes from the .cs files.
Thanks for the additional feedback. We'd definitely expect those to work for async methods and coroutines. I think we even have samples for those. We'll check up on that.
Issues with UniRx seem familiar to Cysharp's UniTask which is a known limitation.
A bit of context for those: At the time of an exception, the SDK requests the instruction address from Unity's IL2CPP backend. When originating from UniRx and UniTask Unity always returns addresses as 0x0
.
Hi @bitsandfoxes, just wanted to let you know that we still need support on the Android production build with aab file downloaded from google play store that cannot show the line numbers on Sentry UI dashboard.
@hunglvgearinc, definitely!
As an update and since we're rolling this up from the Android side:
I'm testing this with Unity 2021.3.38f1
and checking for error events with their line numbers intact:
So this is working locally, which leads me to believe that something is going on on the Google Play Store side of things.
I am re-opening this issue for the time being to correctly reflect feedback for at least one customer, and we need to budget time to investigate
I've submitted and setup our own sample via the Google Play Console to be able to fully test this. I need to wait for us to pass the review to be able to download the sample via the playstore. Directly downloading the apk from the dashboard seems to be no different than a local dev-build. I'll update here once I know more.
I'm failing to reproduce the missing line numbers in builds downloaded from the Play Store.
Opening this issue on behalf of a trialing Sentry customer. Bug Report may not be quite accurate but we aren't clear as to why line numbers aren't showing for Unity exceptions captured by Sentry on Android (and some on iOS), and are looking for help troubleshooting.
Environment
How do you use Sentry? Sentry SaaS (sentry.io)
Which version of the SDK?
How did you install the package? (Git-URL, Assetstore) Git-URL
Which version of Unity?
2021.3.19f1
Is this happening in Unity (editor) or on a player like Android, iOS, Windows? Android/iOS
Steps to Reproduce
Triggered errors in Unity mobile game in iOS and Android.
Expected Result
Line numbers would be associated for exceptions triggered in both Android and iOS.
Actual Result
Line numbers are not associated.
Additional Context
after they tried that, they wrote:
Screenshots
Android Example with no line numbers
iOS Example with no line numbers
┆Issue is synchronized with this Jira Improvement by Unito