question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sentry for .net MAUI causes app crash upon startup

See original GitHub issue

Environment

SaaS (https://sentry.io/)

Version

No response

Steps to Reproduce

  1. Added Sentry to my .net MAUI app - downloaded nuget packages and updated MauiProgram.cs
  2. Observed app crash upon startup
  3. Removed Sentry and observed that app no longer crashes

Expected Result

No crash 😃

Actual Result

Thread started: <Thread Pool> getsentry/sentry#28
[DOTNET]   Debug: De-queueing event 8901aff4b89e407ca2a6cbb898679f42
[DOTNET]   Debug: Signaling flush completed.
[DOTNET]   Debug: Worker signal triggered: flushing cached envelopes.
[DOTNET]   Debug: Successfully flushed all events up to call to FlushAsync.
[DOTNET]   Debug: Flushing caching transport with remaining flush time.
[DOTNET]   Debug: External FlushAsync invocation: flushing cached envelopes.
[DOTNET]   Debug: No cached file to process.
[DOTNET]   Debug: Reading cached envelope: /data/user/0/com.loungereview.app/cache/sentry/Sentry/EB908074D3CF5F74696DA97F950EB7840CF57699/__processing/1665977574_2595_8901aff4b89e407ca2a6cbb898679f42_-967083357.envelope
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.FormatException: Input string was not in a correct format.
[mono-rt]    at System.Text.ValueStringBuilder.ThrowFormatError()
[mono-rt]    at System.Text.ValueStringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
[mono-rt]    at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
[mono-rt]    at System.String.Format(String format, Object[] args)
[mono-rt]    at Sentry.Infrastructure.DiagnosticLogger.Log(SentryLevel logLevel, String message, Exception exception, Object[] args) in /_/src/Sentry/Infrastructure/DiagnosticLogger.cs:line 32
[mono-rt]    at Sentry.Android.JavaLogger.Log(SentryLevel level, String message, Object[] args) in /_/src/Sentry/Platforms/Android/JavaLogger.cs:line 12
[mono-rt]    at Sentry.Java.ILoggerInvoker.n_Log_Lio_sentry_SentryLevel_Ljava_lang_String_arrayLjava_lang_Object_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1, IntPtr native_p2) in /_/src/Sentry/obj/Release/net6.0-android/generated/src/Sentry.Java.ILogger.cs:line 128
[mono-rt]    at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPLLL_V(_JniMarshal_PPLLL_V callback, IntPtr jnienv, IntPtr klazz, IntPtr p0, IntPtr p1, IntPtr p2) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 341
[oungereview.ap] createVirtioGpuAddressSpaceStream: create subdevice and get resp
[goldfish-address-space] virtgpu_address_space_create_context_with_subdevice: resp bo: 1 resid 380 mapped 0x714988000000
[oungereview.ap] createVirtioGpuAddressSpaceStream: create subdevice and get resp (done)
[oungereview.ap] createVirtioGpuAddressSpaceStream: ping returned. context ring and buffer sizes 12288 1048576
[oungereview.ap] createVirtioGpuAddressSpaceStream: hostmem id: be, size: 1060864
[oungereview.ap] IOStream flush timeout

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
plequere-mscommented, Oct 19, 2022

Thank you @mattjohnsonpint, I have confirmed that removing Debug = true works. I really appreciate the quick turnaround!

0reactions
mattjohnsonpintcommented, Oct 18, 2022

Never mind on the details. I was able to reproduce the problem in the current version (3.22.0-preview.3) and identify the cause. It will be fixed in the next release.

In the meantime, you can avoid the condition that causes the error by not setting Debug = true on the Sentry options.

Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error monitoring for .NET MAUI with Sentry - YouTube
Do you know when your apps are crashing before your users do? What if the crash wasn't caused by your own code, but...
Read more >
Monitor Your Mobile App Health with Sentry and .NET MAUI
Once your app is released to the public it's hard to get any information from your users about crashes and other unforeseen behavior....
Read more >
Preventing Watchdog crash in .NET MAUI app
I thought I figured this out but my .NET MAUI app still crashes with Watchdog termination error whenever getting and handling data takes...
Read more >
Mobile Error Monitoring and Crash Reporting
Resolve Crashes Faster with Complete Context and Automated Workflows. Customize alerts to take action on crashes and errors before they become widespread.
Read more >
App crashes on startup when R8 shrinker is set in Maui
Application crashes in startup when I set the R8 shrinker in release mode and use the secure storage in application. android.runtime.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found