dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.88k stars 676 forks source link

Razor Server crashes in WSL2 Windows 11 `Cannot get required symbol EVP_MD_size from libssl` #5510

Open edouardberthe opened 1 year ago

edouardberthe commented 1 year ago

Environment data

Runtime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: ubuntu.22.04-x64 Base Path: /usr/share/dotnet/sdk/7.0.101/

Host: Version: 7.0.1 Architecture: x64 Commit: 97203d38ba

.NET SDKs installed: 7.0.101 [/usr/share/dotnet/sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 7.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 7.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found: None

Environment variables: Not set

global.json file: Not found


- VS Code version: `1.74.2`

- C# Extension version: `v1.25.2`

- Linux version inside WSL: output of `uname -a`:
  `Linux Edouard-PC 5.15.79.1-microsoft-standard-WSL2 #1 SMP Wed Nov 23 01:01:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux`

- Extensions installed:
![image](https://user-images.githubusercontent.com/6100501/209881090-3749a60e-bfc5-442b-b1fc-652fe397ad3c.png)

## Razor Log

Razor.VSCode version 6.0.0-preview.5.21358.6

Razor's trace level is currently set to 'Off'

Cannot get required symbol EVP_MD_size from libssl [Info - 11:28:50 PM] Connection to server got closed. Server will restart. [Error - 11:28:50 PM] Request textDocument/codeAction failed. Error: Connection got disposed. at Object.dispose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1174265) at Object.dispose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1230914) at E.handleConnectionClosed (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1231089) at E.handleConnectionClosed (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1250254) at t (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1229288) at n.invoke (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159116) at r.fire (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159846) at V (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1166325) at n.invoke (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159116) at r.fire (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159846) at l.fireClose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1177200) at Socket. (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1177962) at Socket.emit (node:events:538:35) at Pipe. (node:net:687:12) Cannot get required symbol EVP_MD_size from libssl [Info - 11:28:51 PM] Connection to server got closed. Server will restart. [Error - 11:28:51 PM] Request textDocument/codeAction failed. Error: Connection got disposed. at Object.dispose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1174265) at Object.dispose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1230914) at E.handleConnectionClosed (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1231089) at E.handleConnectionClosed (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1250254) at t (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1229288) at n.invoke (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159116) at r.fire (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159846) at V (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1166325) at n.invoke (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159116) at r.fire (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159846) at l.fireClose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1177200) at Socket. (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1177962) at Socket.emit (node:events:538:35) at Pipe. (node:net:687:12) Cannot get required symbol EVP_MD_size from libssl [Info - 11:28:53 PM] Connection to server got closed. Server will restart. [Error - 11:28:53 PM] Request textDocument/codeAction failed. Error: Connection got disposed. at Object.dispose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1174265) at Object.dispose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1230914) at E.handleConnectionClosed (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1231089) at E.handleConnectionClosed (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1250254) at t (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1229288) at n.invoke (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159116) at r.fire (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159846) at V (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1166325) at n.invoke (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159116) at r.fire (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159846) at l.fireClose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1177200) at Socket. (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1177962) at Socket.emit (node:events:538:35) at Pipe. (node:net:687:12) Cannot get required symbol EVP_MD_size from libssl [Info - 11:28:54 PM] Connection to server got closed. Server will restart. [Error - 11:28:54 PM] Request textDocument/codeAction failed. Error: Connection got disposed. at Object.dispose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1174265) at Object.dispose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1230914) at E.handleConnectionClosed (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1231089) at E.handleConnectionClosed (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1250254) at t (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1229288) at n.invoke (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159116) at r.fire (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159846) at V (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1166325) at n.invoke (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159116) at r.fire (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159846) at l.fireClose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1177200) at Socket. (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1177962) at Socket.emit (node:events:538:35) at Pipe. (node:net:687:12) Cannot get required symbol EVP_MD_size from libssl [Error - 11:28:56 PM] Connection to server got closed. Server will not be restarted. [Error - 11:28:56 PM] Request textDocument/codeAction failed. Error: Connection got disposed. at Object.dispose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1174265) at Object.dispose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1230914) at E.handleConnectionClosed (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1231089) at E.handleConnectionClosed (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1250254) at t (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1229288) at n.invoke (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159116) at r.fire (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159846) at V (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1166325) at n.invoke (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159116) at r.fire (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1159846) at l.fireClose (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1177200) at Socket. (/home/edouard/.vscode-server/extensions/ms-dotnettools.csharp-1.25.2-linux-x64/dist/extension.js:2:1177962) at Socket.emit (node:events:538:35) at Pipe. (node:net:687:12)


## Steps to reproduce

Steps to Reproduce:
1. 
```zsh
dotnet new razor -o RazorTest
cd RazorTest
code .
  1. Open any .cshtml file or .razor file

Expected behavior

Razor server should not crash

Actual behavior

Razor server crashed

Additional context

This is the exact same thing as what happened in #5321, but the proposed solution (setting CLR_OPENSSL_VERSION_OVERRIDE to 1.1 does not work, either from settings.json nor from cmd prompt, nor from wsl.

Tried things

Nothing worked.

Many thanks

vcsjones commented 1 year ago

This is the exact same thing as what happened in #5321, but the proposed solution (setting CLR_OPENSSL_VERSION_OVERRIDE to 1.1 does not work, either from settings.json nor from cmd prompt, nor from wsl.

That's a work around, not necessarily a solution. Anyway, if that is not working for you, then it is likely your WSL distro does not include OpenSSL 1.1, so there is no old version to fall back to. Installing an old version is going to vary from distro to distro. You could try using a different WSL distro, like Debian, which still uses OpenSSL 1.1 the last time I checked, until the OpenSSL 3.0 issue is addressed.

abdollahkahne commented 1 year ago

I have same issue with Ubuntu 22.04.