vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Omnisharp fails to install on a flaky network

Open gxtaillon opened this issue 3 years ago • 3 comments

Issue Description

When on a flaky network the download procedure seems to silently ignore download failures and blindly proceeds to run the installation, which fails and Omnisharp complains about missing files.

Steps to Reproduce

  1. Be on a flaky network
  2. Install the extension

Expected Behavior

Installation succeeds and extension starts up.

Actual Behavior

Installation fails

Logs

Curl samples

gtaillon@m1:~/.vscode-server/extensions$ curl -LO https://roslynomnisharp.blob.core.windows.net/releases/1.37.3/omnisharp-linux-x64-1.37.3.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 72 46.2M 72 33.2M 0 0 1581k 0 0:00:29 0:00:21 0:00:08 0 curl: (18) transfer closed with 13533251 bytes remaining to read gtaillon@m1:~/.vscode-server/extensions$ curl -LO https://roslynomnisharp.blob.core.windows.net/releases/1.37.3/omnisharp-linux-x64-1.37.3.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 29 46.2M 29 13.5M 0 0 2121k 0 0:00:22 0:00:06 0:00:16 3170k curl: (56) OpenSSL SSL_read: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac, errno 0 gtaillon@m1:~/.vscode-server/extensions$ curl -LO https://roslynomnisharp.blob.core.windows.net/releases/1.37.3/omnisharp-linux-x64-1.37.3.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 41 46.2M 41 19.2M 0 0 1077k 0 0:00:43 0:00:18 0:00:25 0 curl: (18) transfer closed with 28246083 bytes remaining to read gtaillon@m1:~/.vscode-server/extensions$ curl --retry 100 -LO https://roslynomnisharp.blob.core.windows.net/releases/1.37.3/omnisharp-linux-x64-1.37.3.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 46.2M 100 46.2M 0 0 3218k 0 0:00:14 0:00:14 --:--:-- 3578k

OmniSharp log

Starting OmniSharp server at 11/1/2020, 2:15:18 PM Target: /home/gtaillon/AribaIntegrations/Cae.Digital.AribaIntegration.sln

[ERROR] Error: spawn /home/gtaillon/.vscode-server/extensions/ms-dotnettools.csharp-1.23.4/.omnisharp/1.37.3/run ENOENT

C# log

Installing C# dependencies... Platform: linux, x86_64, name=debian, version=10

Downloading package 'OmniSharp for Linux (x64)' (47313 KB)......... Retrying from 'https://roslynomnisharp.blob.core.windows.net/releases/1.37.3/omnisharp-linux-x64-1.37.3.zip' (47313 KB)

Environment information

VSCode version: 1.50.1 C# Extension: 1.23.4

Mono Information OmniSharp using built-in mono
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.1.403 Commit: 9e895200cd

Runtime Environment: OS Name: debian OS Version: 10 OS Platform: Linux RID: debian.10-x64 Base Path: /usr/share/dotnet/sdk/3.1.403/

Host (useful for support): Version: 3.1.9 Commit: 774fc3d6a9

.NET Core SDKs installed: 2.2.402 [/usr/share/dotnet/sdk] 3.1.403 [/usr/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
azure-account ms-vscode 0.9.3
azurecli ms-vscode 0.5.0
azurerm-vscode-tools msazurermtools 0.13.0
csharp ms-dotnettools 1.23.4
powershell ms-vscode 2020.6.0
vscode-azurefunctions ms-azuretools 1.0.0
vscode-dotnet-runtime ms-dotnettools 0.1.2

gxtaillon avatar Nov 01 '20 19:11 gxtaillon

Similar with https://github.com/OmniSharp/omnisharp-vscode/issues/1085. Now the downloading takes forever again:

Installing C# dependencies...
Platform: linux, x86_64, name=ubuntu, version=20.10

Downloading package 'OmniSharp for Linux (x64)' (47313 KB).

renkun-ken avatar Nov 02 '20 03:11 renkun-ken

Can the auto updating be disabled completely? I really don't feel like waiting 30mins every time I need to do something in C#

shilangyu avatar Nov 18 '20 13:11 shilangyu

slow download too

same happen here too. extremely slow download at 20 KiB/s (monitored via "nethogs") but for other downloads its fast.

If this helpful for anyone, upon a bit of digging I found these

  1. It downloads from "20.60.232.193" address (gathered from "iftop" and "lsof").
  2. It consistently downloads from there

FoxieFlakey avatar Mar 04 '24 11:03 FoxieFlakey