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

C# Debug and IntelliSense not working on a Linux environment - Stuck on Downloading package 'Razor Language Server Telemetry' #6547

Closed
coderade opened this issue Oct 16, 2023 · 16 comments · Fixed by #6622

Comments

@coderade
Copy link

Environment data

dotnet --info output:

.NET SDK:
Version:   7.0.306
Commit:    f500069cb7

Runtime Environment:
OS Name:     amzn
OS Version:  2
OS Platform: Linux
RID:         linux-x64
Base Path:   /home/valgsfi/.dotnet/sdk/7.0.306/

Host:
  Version:      7.0.9
  Architecture: x64
  Commit:       8e9a17b221

.NET SDKs installed:
  3.0.103 [/home/valgsfi/.dotnet/sdk]
  3.1.426 [/home/valgsfi/.dotnet/sdk]
  6.0.408 [/home/valgsfi/.dotnet/sdk]
  7.0.306 [/home/valgsfi/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.0.3 [/home/valgsfi/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.32 [/home/valgsfi/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.16 [/home/valgsfi/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.9 [/home/valgsfi/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.0.3 [/home/valgsfi/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.32 [/home/valgsfi/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.16 [/home/valgsfi/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.9 [/home/valgsfi/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/home/valgsfi/.dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

VS Code version:

Version: 1.83.1
Commit: f1b07bd25dfad64b0167beb15359ae573aecd2cc
Date: 2023-10-10T23:45:31.402Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 5.15.133-86.144.amzn2.x86_64

C# Extension version: v2.6.24

OmniSharp log

Installing Razor Telemetry Version = undefined...
Platform: linux, x86_64, name=amzn, version=2

Downloading package 'Razor Language Server Telemetry (Linux / x64)' 

Steps to reproduce

  1. Open a .cs file or try to run a .Net / C# project
  2. Intelissense is not working, I can not go to any implementation or have any help from the IDE
  3. When I try to Run/Debug a C# project, the vscode keeps loading but I do not see any results.

Screenshot 2023-10-16 at 11 42 59

Additional context

Even if try to change the ominsharp logs level I can not see anything more than the message: Downloading package 'Razor Language Server...

@dibarbet
Copy link
Member

@davidwengier mind taking a first look here?

@davidwengier
Copy link
Contributor

@coderade Thanks for reporting the issue. Sorry to ask the obvious question, but is there network activity happening while it's supposedly downloading? Do you get issues if you manually try to download the package? The url should be: https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/b4f2fb72ed2acda7263fc597fbd20882/devkittelemetry-linux-x64-7.0.0-preview.23475.5.zip

@coderade
Copy link
Author

hi @davidwengier, thanks for the reply. I am able to download the package manually. Maybe I am having a issue with the proxy or other things in the VsCode settings.

Do you know how I can reference this package manually? I will check the network settings on the vscode too.

Thanks,

@thompson937
Copy link

I'm only here to confirm this issue, switching the "C#" extension to version 2.0.320 allows for continued operation.

@davidwengier
Copy link
Contributor

davidwengier commented Oct 17, 2023

@thompson937 are you also on linux? or a different OS?

@coderade a workaround would be to install it manually I guess. If you can find the VS Code extensions folder, under your user path somewhere, there should be a ms-dotnettools.csharp-<version> folder. If you extract the zip you downloaded into a .razortelemetry folder inside there, hopefully you'll be unblocked while we investigate. Do let us know if that works.

@thompson937
Copy link

@davidwengier Yes, I am using Fedora 38.

@davidwengier
Copy link
Contributor

@thompson937 and you can download the zip file I linked above manually? No proxy settings in VS Code?
@coderade did you and up finding anything interesting in the networking settings in VS Code?

I set up a quick test on my machine (in WSL) and everything worked first time, so sadly its nothing obvious like us forgetting that slashes go two ways. I also went through the git history of the download code, and it hasn't meaningfully changed in almost 2 years, and is basically the same as when it was in O#.

I don't have a lot of experience with linux in geneal (read: basically none) so I'm asking around internally, but if there is any extra info either of you can provide that would be helpful, I'm all ears. Do you have network monitors tools installed that could indicate if the download even starts, for example?

@coderade
Copy link
Author

@davidwengier thanks for the workaround, looks like after some changes on the vscode network/proxy settings, I am able to download the failing package again, and everything is working properly.

Unfortunately, I am not being to reproduce the error again to check what I actually changed to make this works, and as I am working in a client managed network, maybe they changed something on their proxy side also.

The only issue I see is why we got stuck with this kind of message: Downloading package 'Razor Language Server... and we did not get any error message/log after some minutes, but anyway, right now it is working properly and I can provide other informations if you need.

thanks,

@davidwengier
Copy link
Contributor

Thanks @coderade, glad you got things working. We'll definitely look into adding better error reporting, or a timeout, or something for this.

@joshwright10
Copy link

Also experiencing this on Windows x64.
I tried downloading https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/187a09b50228410a03d7e264181e2503/devkittelemetry-win-x64-7.0.0-preview.23475.5.zip and copying it to
%USERPROFILE%\.vscode\extensions\ms-dotnettools.csharp-2.8.23-win32-x64\.razortelemetry

However I still see

Installing Razor Telemetry Version = 7.0.0-preview.23475.5...
Platform: win32, x86_64

Downloading package 'Razor Language Server Telemetry (Windows / x64)'

@davidwengier
Copy link
Contributor

@joshwright10 Do you have any proxy settings in VS Code set? Anything interesting about your network setup?

Also, as far as the workaround goes, did you extract the zip file and put the contents in the directory? or just put the zip file in that directory?

@joshwright10
Copy link

@davidwengier unfortunately I am behind a corporate proxy ibosscloud
I have my Windows PowerShell and PowerShell 7 system profile.ps1 configured with the following:

$proxy="http://cn-randomid.ibosscloud.com:80"
$env:HTTP_PROXY=$proxy
$env:HTTPS_PROXY=$proxy

Relevant VS Code Settings. Proxy server is the same as in the profile.

{
    "http.proxy": "http://cn-randomid.ibosscloud.com:80",
    "http.proxySupport": "on",
    "http.proxyStrictSSL": false
}

I am able to install and uninstall the Extensions from VS Code with no issue. I am also able to access the download link via Edge, so the proxy does allow access.

The zip file was directly extracted into the .vscode\extensions\ms-dotnettools.csharp-2.8.23-win32-x64\.razortelemetry directory. I see language folders and and a bunch of dlls. It looks like it is in the correct location.

I do notice that VS code keeps creating an empty install.Begin file in .vscode\extensions\ms-dotnettools.csharp-2.8.23-win32-x64\.razortelemetry when it starts.

@caoqun98
Copy link

@davidwengier excuse me, but can you tell me how to install the razortelemetry offline? my office computer is offline and it's win10(besides, i also need to install this on another office computer and it's linux, it's also offline) i extracted the zip into the .razortelemetry from the link https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/187a09b50228410a03d7e264181e2503/devkittelemetry-win-x64-7.0.0-preview.23475.5.zip, however, each time i open my vscode, the output still shows downloading package ' razor language server telemetry', and it seems that i cannot debug on my vscode and there is no code navigate or prompts either, do i need to make some other changes?

@davidwengier
Copy link
Contributor

@caoqun98 do the logs indicate what version its trying to download? The link I posted above is pretty old, so if there is a newer version of the package, it will probably still try to download the new one. Also, if you're completely offline you probably want to turn off telemetry in VS Code completely, in which case we'll stop trying to download anything. That change was only recently merged though, in #7092, so it won't have an effect in the version you currently have unfortunately, but soon.

@caoqun98
Copy link

@davidwengier
thx for your tips. according to my output and the url in package.json(it's in the csharp installation folder), i downloaded the new one and extracted it in the .razortelemetry, however, it still downloads from the url... do i need to change some other settings in package.json?

@davidwengier
Copy link
Contributor

It looks like after a successful install it puts a 0 byte file on disk called install.Lock, in the .razortelemetry folder. Try creating that file manually perhaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants