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

Runtime.Current.Version null on Windows 10 2004 .NET Framework 4.8 #443

Closed
KristianWedberg opened this issue Jun 1, 2020 · 10 comments · Fixed by getsentry/sentry-dotnet-platform-abstractions#18
Labels
Bug Something isn't working

Comments

@KristianWedberg
Copy link

Runtime.Current.Version is null on .NET Framework 4.8 after upgrading to Windows 10 2004, build 19041.264.

I expected it to be "4.8".

Also, to avoid this becoming null again later, I suggest making Version the largest version where the build number is not too large. Showing e.g. 4.8 on a 4.8.1 installation is much better than getting a null.

Cheers,
Kristian

@bruno-garcia
Copy link
Member

Thanks for raising this. I'll add the new version.

Having it return null made you raise this issue so we can fix this.
If we return 4.8 it might lead to confusion where an issue is related to the upgrade (i.e only affects users on 4.8.1) but it shows up as everyone is under 4.8.

@bruno-garcia
Copy link
Member

@KristianWedberg I can't find anything about .NET Framework 4.8.1.
The current implementation is based on this documentation. Do you have some pointer for me?

What is the output of RuntimeInformation.FrameworkDescription on such machines? I don't have a Windows machine I can access right now. Thanks!

@bruno-garcia
Copy link
Member

Is it the case Sentry's receiving raw description and not handling it?

image
image

This seems to be an issue but at least can be fixed on the server.

The handling is done here:

https://github.com/getsentry/relay/blob/8a226679c5d7023df00a71da293fec798f0f248f/relay-general/src/store/normalize/contexts.rs#L21-L68

But it seems the SDK needs to send build along.

@bruno-garcia bruno-garcia transferred this issue from getsentry/sentry-dotnet-platform-abstractions Jun 5, 2020
@bruno-garcia
Copy link
Member

Transfered to this repo not to get lost on that repository as we plan to make a monorepo

@KristianWedberg
Copy link
Author

There's no "4.8.1" yet as you say, that was just an example of a future version that would again return Runtime.Current.Version as null, unless as I suggested setting any larger unknown build numbers to the last known .NET Framework version.

@bruno-garcia
Copy link
Member

bruno-garcia commented Jun 9, 2020

I believe .NET Framework will not have any more releases after 4.8.

Runtime.Current.Version is null on .NET Framework 4.8 after upgrading to Windows 10 2004, build 19041.264.

This though seem to be a bug which we need to address.

@bruno-garcia bruno-garcia added Bug Something isn't working Sentry.PlatformAbstractions labels Jun 9, 2020
@CADbloke
Copy link

CADbloke commented Jun 29, 2020

+1 - same issue here.

I found the version of 4.8 in the registry at Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\ key is "Version", mine is 4.8.04084, "Release" is 528372. Reference: https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed

Sentry said raw_description: ".NET Framework 4.8.4180.0", for my PC

You could use the old code and just check for builds > 528040 since 4.8 is the end of the line. For now. Like VBA etc.

The "Release" / build would be handy actually, I definitely have seen issues related to Windows 10 updates so it would be nice to know what actual release they are running.

@bruno-garcia
Copy link
Member

This should be processed then by Sentry on the server:

https://github.com/getsentry/relay/blob/8a226679c5d7023df00a71da293fec798f0f248f/relay-general/src/store/normalize/contexts.rs#L57-L58

Could you please confirm what's the derived runtime.name and runtime.version in the event?

@bruno-garcia
Copy link
Member

I see. The value is missing there on relay. I'll make a PR to add support.

@bruno-garcia
Copy link
Member

It was actually missing two values.

Thanks for raising this. The SDK will report the right value from the next release.
Sentry will report also 4.8 even for apps on old SDK version once we release my patch on Relay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants