razor
razor copied to clipboard
Razor Language Server for VS Code is built with a preview of .NET 6
Preface: apologies if this is not the right place to file an issue.
Over on the dotnet/runtime repository, we got an issue filed that the Razor Language Server was not loading OpenSSL 3 correctly on Fedora 36.
The Razor Language Server appears to be a self-contained application.
Using:
strings ~/.vscode/extensions/ms-dotnettools.csharp-1.24.1-darwin-x64/.razor/libSystem.Security.Cryptography.Native.OpenSsl.dylib
Gives the output:
@(#)Version 6.0.21.35102 @Commit: cf2938f44fc1494ae984c52a1568a03d51e513ca
Which maps to a preview build of .NET 6.
This preview build has incomplete support for OpenSSL 3, which explains why it is not loading correctly on Fedora 36.
Are there plans to publish a new Razor Language Server for VS Code that is built with a later version so that it gets a later build which contains the OpenSSL 3 fixes?
Another instance: https://github.com/dotnet/razor-tooling/issues/6233
This also impacts the recently released Ubuntu 22.04 as well, as it ships with OpenSSL 3.
we got an https://github.com/dotnet/runtime/issues/67375 that the Razor Language Server was not loading OpenSSL 3 correctly on Fedora 25.
This preview build has incomplete support for OpenSSL 3, which explains why it is not loading correctly on Fedora 25.
Small correction: it's affecting Fedora 36, not 25. 36 is currently in preview and is scheduled for public release on May 10.
I'm on the preview and currently working around this by launching VS Code using export CLR_OPENSSL_VERSION_OVERRIDE=1.1; code
.
Small correction: it's affecting Fedora 36, not 25. 36
🤔 not sure where I got 25 from. I can confirm though that I did my testing on Fedora Rawhide (at time time of writing, of which is 36)
I updated my original issue. Thanks!
Any update on this? This breaks RZLS on Ubuntu 22 as well and the suggested workaround doesn't work for me. Surely recompiling a new release can't be that difficult?
RZLS not working neither with suggested workaround.
Error msg in Razor Log: Cannot get required symbol EVP_MD_size from libssl [Error - 9:27:40 AM] Connection to server got closed. Server will not be restarted.
dotnet --info output:
`.NET SDK (reflecting any global.json): Version: 6.0.300 Commit: 8473146e7d
Runtime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: ubuntu.22.04-x64 Base Path: /usr/share/dotnet/sdk/6.0.300/
Host (useful for support): Version: 6.0.5 Commit: 70ae3df4a6
.NET SDKs installed: 6.0.300 [/usr/share/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download `
The work around previously identified only appears to work on Fedora. Ubuntu 22.04 only includes OpenSSL 3 - so there is no version 1.1 to fall back down to.
@allisonchou moving this issue to this sprint. Poke me offline when you get to this issue and I can give you a greater lay-of-the land for what this entails
The work around previously identified only appears to work on Fedora. Ubuntu 22.04 only includes OpenSSL 3 - so there is no version 1.1 to fall back down to.
This is not my experience. I've been using this workaround since the issue first appeared, when (I believe) I was using Ubuntu 21.10, and it's still working on 22.04.
I do, generally, use:
CLR_OPENSSL_VERSION_OVERRIDE=1.1 code .
but that should be functionally the same as
export CLR_OPENSSL_VERSION_OVERRIDE=1.1; code .
@vcsjones and @derek-mba: To get the work-around to work with Ubuntu 22.04, you first need to install openssl 1.1.
-
First find a one at http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/?C=M;O=D. The one that worked for me was "libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb". Download it.
-
At the command line, change directories to where ever you downloaded it, and install like so:
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
That, I got from this answer at stackoverflow.com.
@rdalkire That would be why it works for me. libssl1.1
is a dependency of dotnet-runtime-deps-3.1
and dotnet-runtime-deps-6.0
. So if you use VS Code for dotnet development you likely have it. If you don't, you'll need to install libssl1.1 yourself.
I'm on RHEL 9, I do dotnet development and have this same issue. I'm reluctant to try to install openssl 1.1 alongside 3.0
It's a long, long, time since I used RHEL or CentOS, but iirc these libraries are handled much the same way. libssl1.1 should live alongside libssl3* without any problem. It would be a nightmare if every application always had to depend on the same library versions, as you would have to upgrade them all at the same time, and always be waiting for the application with the slowest development cycle
For RHEL 9, you can install compat-openssl11
to get OpenSSL 1.1 libraries. It won't impact existing OpenSSL 3.0 libraries or applications using OpenSSL 3.0. You might also have to export OPENSSL_CONF=/etc/pki/openss11.cnf
(needs to be done per shell, so probably scope it to just dotnet): https://omairmajid.com/posts/2021-08-25-using-.net-in-centos-stream-9/
Now I have the same problem working in WSL on Windows 10. I have absolutely no idea how I can work around that, as code is opened from Windows, not Linux
This also affects the vscode flatpak which has no way of installing another openssl version
Kubuntu 22.10 is also affected. Please fix this issue as it makes it really annoying to work with razor files on Linux!
Yeah, it's not great that .NET 7 is now out and this bug from before the .NET 6 release is still around. Not getting the sense that Linux support is being taken seriously.
This also affects the vscode flatpak which has no way of installing another openssl version
If anyone is interested this workaround has worked for me
- Unpack arch linux's openssl1.1 in your ~/.local I used bin and lib but lib is probably enough
- Run vscode like this
env FLATPAK_ENABLE_SDK_EXT=node18,dotnet6 flatpak --env=CLR_OPENSSL_VERSION_OVERRIDE=1.1 --env=LD_LIBRARY_PATH=$HOME/.local/lib run com.visualstudio.code
Would be great to have that fixed properly.
Or even at all... This is getting really frustrating. I've been 8 months without a proper Razor server, and all because someone did something that should NEVER have been allowed into production. Using "preview" builds??? And now, we're way beyond the preview 6, doing previews of .NET 8! and nobody can be bothered to build against the public release.
this issue sucks, @OmniSharp needs to resolve this as quick as possible but they are taking forever
This is strait up ridiculous. I have been waiting so long for a seemingly simple fix to an incredibly disruptive bug.
I was able to build git version of razor language server with dotnet 7 and make vscode use it a while ago but it's not working, just outputs "undefined undefined undefined" in the terminal instead of current ssl error. So i guess that's not everything that has to be done and vscode razor extension also has to be updated but the project is dead or something.
upd: maybe it's possible to rebuild an older version with dotnet 6 that will actually work with current extension but i don't currenty know how to get the specific one. It should be accessible from razor github though i think
getting around this bug is trivial though i'm assuming this version is never fixed and the problem will eventually be solved by some major extension update
Getting around this bug is NOT trivial.
I develop on two systems. It's no problem on my Ubuntu system, but nobody has been able to give me a solution for my Ubuntu-in-WSL system on Windows.
I have no doubt there are other configurations where it's equally problematic.
From: Oleg Mishunin @.> Sent: 13 December 2022 20:58 To: dotnet/razor @.> Cc: Derek Broughton @.>; Mention @.> Subject: Re: [dotnet/razor] Razor Language Server for VS Code is built with a preview of .NET 6 (Issue #6241)
CAUTION: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.
getting around this bug is trivial though i'm assuming this version is never fixed and the problem will eventually be solved by some major extension update
— Reply to this email directly, view it on GitHubhttps://github.com/dotnet/razor/issues/6241#issuecomment-1349679976, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATCYIM4TQNBMKVWHHGBJSUDWNDPO7ANCNFSM5SGFM25Q. You are receiving this because you were mentioned.Message ID: @.***>
[https://gallery.mba.ac.uk/filestore/5/5/6/6_46d6e92daced9d9/5566pre_7cb27b62442c5f3.jpg?v=1657195251] THE LABORATORY, CITADEL HILL, PLYMOUTH, DEVON, PL1 2PB, UK MBA.AC.UKhttps://www.MBA.AC.UK JOIN THE MARINE BIOLOGICAL ASSOCIATIONhttps://www.mba.ac.uk/our-membership [https://gallery.mba.ac.uk/filestore/5/5/7/7_dc8d86d456d5c85/5577pre_658b55a9917df1a.jpg?v=1657196117]https://mobile.twitter.com/thembauk [https://gallery.mba.ac.uk/filestore/5/5/7/5_aa29b1fd53d60ee/5575pre_aea889fdb4b8bb1.jpg?v=1657196117] https://www.instagram.com/thembauk/ [https://gallery.mba.ac.uk/filestore/5/5/7/4_6ddf00232b2bc7e/5574pre_803a138bf972780.jpg?v=1657196117] https://www.facebook.com/thembauk/ [https://gallery.mba.ac.uk/filestore/5/5/7/6_a8bd24a36a15d4a/5576pre_c7c3369e408b619.jpg?v=1657196117] https://www.linkedin.com/company/marine-biological-association
AND it shouldn't require a major version update. It's a bug that should never have been introduced. Why would anyone release a product linking to a "preview" version? All it should need is recompiling against the release version
From: Derek Broughton @.> Sent: 13 December 2022 21:57 To: dotnet/razor @.> Subject: Re: [dotnet/razor] Razor Language Server for VS Code is built with a preview of .NET 6 (Issue #6241)
Getting around this bug is NOT trivial.
I develop on two systems. It's no problem on my Ubuntu system, but nobody has been able to give me a solution for my Ubuntu-in-WSL system on Windows.
I have no doubt there are other configurations where it's equally problematic.
From: Oleg Mishunin @.> Sent: 13 December 2022 20:58 To: dotnet/razor @.> Cc: Derek Broughton @.>; Mention @.> Subject: Re: [dotnet/razor] Razor Language Server for VS Code is built with a preview of .NET 6 (Issue #6241)
CAUTION: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.
getting around this bug is trivial though i'm assuming this version is never fixed and the problem will eventually be solved by some major extension update
— Reply to this email directly, view it on GitHubhttps://github.com/dotnet/razor/issues/6241#issuecomment-1349679976, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATCYIM4TQNBMKVWHHGBJSUDWNDPO7ANCNFSM5SGFM25Q. You are receiving this because you were mentioned.Message ID: @.***>
[https://gallery.mba.ac.uk/filestore/5/5/6/6_46d6e92daced9d9/5566pre_7cb27b62442c5f3.jpg?v=1657195251] THE LABORATORY, CITADEL HILL, PLYMOUTH, DEVON, PL1 2PB, UK MBA.AC.UKhttps://www.MBA.AC.UK JOIN THE MARINE BIOLOGICAL ASSOCIATIONhttps://www.mba.ac.uk/our-membership [https://gallery.mba.ac.uk/filestore/5/5/7/7_dc8d86d456d5c85/5577pre_658b55a9917df1a.jpg?v=1657196117]https://mobile.twitter.com/thembauk [https://gallery.mba.ac.uk/filestore/5/5/7/5_aa29b1fd53d60ee/5575pre_aea889fdb4b8bb1.jpg?v=1657196117] https://www.instagram.com/thembauk/ [https://gallery.mba.ac.uk/filestore/5/5/7/4_6ddf00232b2bc7e/5574pre_803a138bf972780.jpg?v=1657196117] https://www.facebook.com/thembauk/ [https://gallery.mba.ac.uk/filestore/5/5/7/6_a8bd24a36a15d4a/5576pre_c7c3369e408b619.jpg?v=1657196117] https://www.linkedin.com/company/marine-biological-association
If WSL is possible to fix at all (because i've had things broken with remote vscode before but it was over ssh) it would probably be enough to install openssl1.1 inside of wsl and make it have CLR_OPENSSL_VERSION_OVERRIDE=1.1 set globally. Maybe even set CLR_OPENSSL_VERSION_OVERRIDE=1.1 on windows host. Don't have windows installed to try myself.
Tried both of those. As i said, it's not trivial
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Oleg Mishunin @.> Sent: Wednesday, December 14, 2022 9:07:26 AM To: dotnet/razor @.> Cc: Derek Broughton @.>; Mention @.> Subject: Re: [dotnet/razor] Razor Language Server for VS Code is built with a preview of .NET 6 (Issue #6241)
CAUTION: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.
If WSL is possible to fix at all (because i've had things broken with remote vscode before but it was over ssh) it would probably be enough to install openssl1.1 inside of wsl and make it have CLR_OPENSSL_VERSION_OVERRIDE=1.1 set globally. Maybe even set CLR_OPENSSL_VERSION_OVERRIDE=1.1 on windows host. Don't have windows installed to try myself.
— Reply to this email directly, view it on GitHubhttps://github.com/dotnet/razor/issues/6241#issuecomment-1350681647, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATCYIMZ2WD4JTVGGBMDLHSDWNGE45ANCNFSM5SGFM25Q. You are receiving this because you were mentioned.Message ID: @.***>
[https://gallery.mba.ac.uk/filestore/5/5/6/6_46d6e92daced9d9/5566pre_7cb27b62442c5f3.jpg?v=1657195251] THE LABORATORY, CITADEL HILL, PLYMOUTH, DEVON, PL1 2PB, UK MBA.AC.UKhttps://www.MBA.AC.UK JOIN THE MARINE BIOLOGICAL ASSOCIATIONhttps://www.mba.ac.uk/our-membership [https://gallery.mba.ac.uk/filestore/5/5/7/7_dc8d86d456d5c85/5577pre_658b55a9917df1a.jpg?v=1657196117]https://mobile.twitter.com/thembauk [https://gallery.mba.ac.uk/filestore/5/5/7/5_aa29b1fd53d60ee/5575pre_aea889fdb4b8bb1.jpg?v=1657196117] https://www.instagram.com/thembauk/ [https://gallery.mba.ac.uk/filestore/5/5/7/4_6ddf00232b2bc7e/5574pre_803a138bf972780.jpg?v=1657196117] https://www.facebook.com/thembauk/ [https://gallery.mba.ac.uk/filestore/5/5/7/6_a8bd24a36a15d4a/5576pre_c7c3369e408b619.jpg?v=1657196117] https://www.linkedin.com/company/marine-biological-association
Thanks for the comments everyone, we hear your frustration, and I just wanted to reassure you that we are actively working on this. Unfortunately because the gap in updates was so long, due to internal reasons, there has turned out to be a lot more to update (breaking changes from VS Code, OmniSharp, Razor Tooling etc.) than just which version of the SDK we use. We are very close to having an update ready to put out (there is one issue left with ARM builds as far as I know) and hopefully will be able to close this issue soon.