-
-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Net 9][Android] Runtime crash on Sentry.SentrySdk.Init #4030
Comments
Hi @AmaruTrai, thanks for raising this! There seem to be a few things going on. Could you provide us with a small repro for us to run locally? |
we init the Android sdk via the C# sdk. I don't think we supporting adding dan to the android manifest. |
Same problem here after upgrading from "5.2.0" to "5.3.0" in release mode with Partial Trimming and AOT. Revert to "5.2.0" fix the problem. In debug everything works fine. Exception from play store
Configuration of release mode :
MauiProgram : builder.UseSentry(options =>
{
// The DSN is the only required setting.
options.Dsn = "***";
// Use debug mode if you want to see what the SDK is doing.
// Debug messages are written to stdout with Console.Writeline,
// and are viewable in your IDE's debug console or with 'adb logcat', etc.
// This option is not recommended when deploying your application.
#if DEBUG
options.Debug = true;
#endif
// Set TracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.TracesSampleRate = 1.0;
}); |
I built a .NET 8 app and upgraded this from 5.2.0 to 5.3.0 without any issue. I also tried applying the properties you suggsted @maximebono: <PropertyGroup>
<RunAOTCompilation>True</RunAOTCompilation>
<PublishTrimmed>True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<AndroidEnableSGenConcurrent>True</AndroidEnableSGenConcurrent>
</PropertyGroup> I don't think there's an issue with the SDK then. I suspect there's something else going on. If you set |
Hi @jamescrosswell Release - with project settings default by MAUI template Workloads:
Sentry setup:
Started happening after trying to upgrade from 5.1.0 - which is the current stable version for me right now Running DEBUG mode there is no issue, only in release, deployed to a physical device /haven't tried to an emulator) Today I tried to upgreade to your latest 5.4.0 but the issue remains Here is the log ( I cannot share my project, but I would imagine a simple .net maui app with the same basic configs will behave the same?)
|
Hi @bcaceiro
If you're able to reproduce this in a simple .NET MAUI app that would be a great help. I wasn't able to reproduce this myself though. |
any updates? how safe to use Sentry > 5.1.0 on Android? |
@FoggyFinder We aren't able to reproduce this. We really need a full reproducible sample to see what may be going on. |
@jamescrosswell I've reproduce the crash by adding CommunityToolkit packages :
Hope this help |
@maximebono I have apps being released to production with Sentry 5.4.0 and both communitytoolkits without this issue. I tried your theory that you noted, but that does not crash with the issue. To anyone that is in this thread, please post a reproducible & complete sample on github. We can't guess as to what the issue is. If you are providing additional and new information, please also include the following:
|
Package
Sentry
.NET Flavor
.NET
.NET Version
9.0.0
OS
Android
SDK Version
5.3.0
Self-Hosted Sentry Version
No response
Steps to Reproduce
After update sentry sdk from version "5.2.0" to "5.3.0" app start crash with runtime error.
Exception log from logcat:
If setup DSN in Android.xml or setup enable/init options, crash log change to:
Project setting for release version:
Sentry init:
Expected Result
No runtime crash
Actual Result
Crash on runtime.
The text was updated successfully, but these errors were encountered: