getsentry / sentry-dotnet

Sentry SDK for .NET
https://docs.sentry.io/platforms/dotnet
MIT License
584 stars 206 forks source link

UWP: No line numbers but local StackTrace shows line numbers #666

Closed lucas-zimerman closed 2 years ago

lucas-zimerman commented 3 years ago

Please mark the type framework used:

Please mark the type of the runtime used:

Please mark the NuGet packages used:

UWP Events are lacking Line numbers when those are available on the StackTrace.

.NET Core Stacktrace

   at System.Number.StringToNumber(ReadOnlySpan`1 str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(ReadOnlySpan`1 s, NumberStyles style, NumberFormatInfo info)
   at System.Int32.Parse(String s)
   at Sample.Xamarin.Core.Services.AuthService.ValidatePassword(String user, String password) in C:\Users\lucas\source\repos\SentrySdk\Contrib\Forms\Samples\Sample.Xamarin.Core\Services\AuthService.cs:line 20
   at Sample.Xamarin.Core.Services.AuthService.DoLogin(String login, String password) in C:\Users\lucas\source\repos\SentrySdk\Contrib\Forms\Samples\Sample.Xamarin.Core\Services\AuthService.cs:line 13
   at Sample.Xamarin.Core.ViewModels.MainPageViewModel.<>c.<get_DoLogin>b__28_0() in C:\Users\lucas\source\repos\SentrySdk\Contrib\Forms\Samples\Sample.Xamarin.Core\ViewModels\MainPageViewModel.cs:line 66

https://sentry.io/organizations/sentry-sdks/issues/2098658920/?project=5560112&query=is%3Aunresolved&statsPeriod=1h

.NET Native Stacktrace

   at System.Number.ThrowOverflowOrFormatException(Boolean overflow, String overflowResourceKey) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\shared\System\Number.Parsing.cs:line 1777
   at System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\shared\System\Number.Parsing.cs:line 209
   at System.Int32.Parse(String s) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\shared\System\Int32.cs:line 107
   at Sample.Xamarin.Core.ViewModels.MainPageViewModel.<>c.<get_DoLogin>b__28_0() in C:\Users\lucas\source\repos\SentrySdk\Contrib\Forms\Samples\Sample.Xamarin.Core\ViewModels\MainPageViewModel.cs:line 66

https://sentry.io/organizations/sentry-sdks/issues/2098737629/?project=5560112&query=is%3Aunresolved&statsPeriod=1h

lucas-zimerman commented 3 years ago

Correction: There are no line numbers, Visual Studio tricked me by showing the symbolicated Stack Trace.

Original Stacktrace

at System.Number.ThrowOverflowOrFormatException(Boolean, String) + 0x63    
at System.Number.ParseInt32(ReadOnlySpan`1, NumberStyles, NumberFormatInfo) + 0x11f    
at System.Int32.Parse(String) + 0x46    
at Sample.Xamarin.Core.ViewModels.MainPageViewModel.<>c.<get_DoLogin>b__28_0() + 0x6d

Stacktrace generated by Sentry:

  ?
  ?
  Module "System.Int32", in Parse
  Module "Sample.Xamarin.Core.ViewModels.MainPageViewModel+<>c", in get_DoLogin { <lambda> }
Tyrrrz commented 3 years ago

@lucas-zimerman is this still relevant on latest versions?

lucas-zimerman commented 3 years ago

@Tyrrrz I'll check it again today.

bruno-garcia commented 3 years ago

For a release build of UWP I'm not surprised there are not line numbers. It would require uploading symbols and doing it on the server side

bruno-garcia commented 2 years ago

Closing based on the last comment