Skip to content
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

Sentry.Maui package causes Unhandled Exception in .NET MAUI WinUI application #3706

Open
luminixinc opened this issue Oct 23, 2024 · 4 comments

Comments

@luminixinc
Copy link

Package

Sentry.Maui

.NET Flavor

.NET

.NET Version

8.0

OS

Windows

SDK Version

4.12.1

Self-Hosted Sentry Version

No response

Steps to Reproduce

We have created a reduced test case that demonstrates the problem. See https://github.com/luminixinc/NetMauiWinUI_SentryMaui

Expected Result

I expected to be able to run the simple application and see the MainPage with waving dotnet bot and the extra button that calls SentrySdk.CaptureMessage

Actual Result

Unhandled exception {"Could not load file or assembly 'WinRT.Runtime, Version=2.1.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709'. The system cannot find the file specified.":"WinRT.Runtime, Version=2.1.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709"}

See reduced test case that demonstrates the issue at https://github.com/luminixinc/NetMauiWinUI_SentryMaui

@bricefriha
Copy link
Collaborator

@luminixinc thanks for reporting this.

I ran the app from the repo you provided. Unfortunately, I'm unable to reproduce the issue.
I can run the app, click the button, and see the message captured on Sentry without exception.
Image

I tried with both our DSN and yours (you should be able to see the item on the issues tab on Sentry on your hand as well).

Unhandled exception {"Could not load file or assembly 'WinRT.Runtime, Version=2.1.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709'. The system cannot find the file specified.":"WinRT.Runtime, Version=2.1.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709"}

Additionally, this message indicates that WinRT.Runtime is missing. So, it's unlikely related to the Sentry SDK.

Is there any other info that would help reproduce this issue?

@bricefriha bricefriha added the Question Further information is requested label Oct 24, 2024
@CyborgDE
Copy link

CyborgDE commented Nov 8, 2024

Hello,
I have the same issue with Versions greater 4.12.0.
4.12.0 is OK ...

@bricefriha
Copy link
Collaborator

Thanks @CyborgDE

I'm gonna investigate further, especially on 4.12.1; if it's on this version, it may be related to #3655 according to the change logs

@jamescrosswell
Copy link
Collaborator

Thanks @CyborgDE

I'm gonna investigate further, especially on 4.12.1; if it's on this version, it may be related to #3655 according to the change logs

I don't think that change is related. WinRT.Runtime doesn't have anything to do with Utf8JsonWriter.

@jamescrosswell jamescrosswell added Needs Reproduction Bug Something isn't working and removed Question Further information is requested labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: No status
Development

No branches or pull requests

4 participants