-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Unable to get exception line numbers to show #3983
Comments
Older (perhaps related) similar issue: |
Hey @nk-alex, It looks like you've uploaded some symbols and sources to Sentry so if you're still not seeing source context for exceptions, it seems likely Sentry isn't able to resolve to correct symbols/source. One thing to ensure is that the version of the code that is running when exceptions are captured and sent to Sentry is exactly the same version that was built when you uploaded the symbols/source to Sentry. Otherwise you might end up with a different debug_id in the PE file for the application versus the debug_id that is included in the symbols/source being uploaded. See here for more details. If you're doing this on a local development machine then basically you'd:
|
Hi @jamescrosswell, the process I've been following is pretty much what you have described:
I can get more information from the error by checking Breadcrumbs, but not much more than this. I don't know where (line) it's happening: |
@nk-alex it would be great to get a copy of the JSON file for that event, to compare the debug_id in the event with the debug_id on the PDB that you uploaded to Sentry. If these match then that's the first pre-requisite to getting this all working. |
@jamescrosswell My json for the event doesn't contain information for debug_id:
|
Hm... I see all of the frames in the event have:
Are you able to capture a log of the envelope that the .NET SDK is sending to Sentry (rather than downloading the JSON file from Sentry once the event has been captured)? You should be able to get this from the debug window or the console in your IDE when running the application in a debugger. A lot of stuff will get logged - we're interested specifically in the envelope representing this exception event though. |
@jamescrosswell I haven't been able to reproduce this on my side. I tried both debug & release mode but this exception never happens. It must be related to some client device configuration. That's why I considered adding sentry to my solution. |
@nk-alex the lack of symbolication probably isn't specific to the exception that your clients are seeing. So you should be able to simulate one of these (it's just a null reference exception). You could do something like:
At that point you should be able to see the Envelope that gets sent to Sentry when capturing the above exception (in the Debug window or console of your IDE)... and we should be able to see the frames that are being sent to Sentry. If the resulting event that you see in Sentry.io is not symbolicated correctly (which I don't think it will be) then we've managed to reproduce the problem. |
@jamescrosswell sorry for the confusion. I thought you were asking specifically for the output/debug window form that exception. I put your code on my application and that's what I get:
This is what my sentry dashboard shows me about this error: So here I can clearly see the line where it happened. But on other exceptions I don't have that information. (Both of the exceptions are from the same release version. The only difference is one being from debug mode and the second one being from release mode) |
@bruno-garcia Since is a company application I can share the link only via mail |
np, mine is my first name at sentry io |
@bruno-garcia I sent you some links |
Thank you. First problem looks like Android exceptions, captured through sentry-dotnet/src/Sentry/Platforms/Android/SentrySdk.cs Lines 193 to 208 in e25f0f7
We're adding I also saw the iOS crashes don't have line numbers. And are also missing Second one is a native crash SIGSEGV, Segfault. Captured through |
@nk-alex what's the project configuration regarding trimming, AOT, etc? |
It looks like we're not able to find the debug image for the frame:
Which comes from here: sentry-dotnet/src/Sentry/Internal/DebugStackTrace.cs Lines 603 to 606 in a421af5
|
The pdb file uploaded to sentry was via sentry-cli (directly downloaded form https://github.com/getsentry/sentry-cli). This pdb file is related to Android app version 1.2.0.7 and iOS app version 83. By the way, this application release (Android 1.2.0.7 and iOS 83) doesn't use SentrySdk.Flush(). |
Aha... I suspect this is related to: And here is a hint as to what's changed: |
Just an update, I've identified the issue here. All that's left to do now is implement the solution. For details, see the parent issue: |
Thank you all for the support and dedication. I'll keep an eye on this issue, tell me if I can provide any helpful logs |
Package
Sentry.Maui
.NET Flavor
.NET
.NET Version
9.0
OS
Android
SDK Version
14.0
Self-Hosted Sentry Version
No response
Steps to Reproduce
I initialize sentry in my MauiProgram.cs like this:
Then I try to capture exceptions like this:
I thought with CaptureException would have been enough. But since no line numers are showing, I also tried with CaptureMessage. No luck:
Then I thought I could get line numbers information by uploading Debug Information Files. Which I did, but exceptions are still not showing exception line number information.
Is sentry able to give me this information?
Am I missing anything?
I'm unable to find the problem without the line number information.
Expected Result
I would expect to find the line number where the exception is produced. I'm unable to find the problem without that information.
Actual Result
Posted above
The text was updated successfully, but these errors were encountered: