microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.13k stars 29.27k forks source link

System.UriFormatException: Invalid URI for CodeAnalysis Language Server in output console when loading a set of projects #191297

Closed mornemaritz-bmw closed 1 year ago

mornemaritz-bmw commented 1 year ago

Type: Bug

Issue Description

Recently (possibly after recent update) whenever a set of projects is loaded (the containing folder in opened), an error toast popup appears saying that there wa a problem loading project X (the project varies each time the set of projects is loaded). All the projects do load but intellisense does not work.

Steps to Reproduce

Expected Behavior

Actual Behavior

Logs

[Uploading Output.zip…]()

C# log

No build or run needed for the issue to occur

C# LSP Trace Logs

[Uploading VCCode.LSP_Trace_Logs.20230825T104424.zip…]()

Environment information

VSCode version: 1.81.1 C# Extension: 2.0.413 Using OmniSharp: false

Dotnet Information .NET SDK: Version: 7.0.302 Commit: 990cf98a27 Runtime Environment: OS Name: ubuntu OS Version: 20.04 OS Platform: Linux RID: ubuntu.20.04-x64 Base Path: /usr/share/dotnet/sdk/7.0.302/ Host: Version: 7.0.5 Architecture: x64 Commit: 8042d61b17 .NET SDKs installed: 2.1.818 [/usr/share/dotnet/sdk] 3.1.426 [/usr/share/dotnet/sdk] 6.0.408 [/usr/share/dotnet/sdk] 7.0.302 [/usr/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.All 2.1.30 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.30 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.32 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.16 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.30 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.32 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.16 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Other architectures found: None Environment variables: Not set global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/download
Visual Studio Code Extensions |Extension|Author|Version|Folder Name| |---|---|---|---| |azure-account|ms-vscode|0.11.5|ms-vscode.azure-account-0.11.5| |csharp|ms-dotnettools|2.0.413|ms-dotnettools.csharp-2.0.413| |json|ZainChen|2.0.2|zainchen.json-2.0.2| |markdown-mermaid|bierner|1.19.0|bierner.markdown-mermaid-1.19.0| |terraform|hashicorp|2.27.1|hashicorp.terraform-2.27.1| |vim-cheatsheet|AndenetAlexander|0.0.1|andenetalexander.vim-cheatsheet-0.0.1| |vscode-azureterraform|ms-azuretools|0.3.2|ms-azuretools.vscode-azureterraform-0.3.2| |vscode-docker|ms-azuretools|1.26.0|ms-azuretools.vscode-docker-1.26.0| |vscode-dotnet-runtime|ms-dotnettools|1.7.1|ms-dotnettools.vscode-dotnet-runtime-1.7.1| |vscode-kafka|jeppeandersen|0.15.0|jeppeandersen.vscode-kafka-0.15.0| |vscode-kubernetes-tools|ms-kubernetes-tools|1.3.13|ms-kubernetes-tools.vscode-kubernetes-tools-1.3.13| |vscode-yaml|redhat|1.14.0|redhat.vscode-yaml-1.14.0| |vsliveshare|ms-vsliveshare|1.0.5883|ms-vsliveshare.vsliveshare-1.0.5883|;

VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:22:42.175Z) OS version: Windows_NT x64 10.0.19044 Modes: Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz (12 x 2712)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.85GB (17.59GB free)| |Process Argv|--crash-reporter-id 332b75ac-6d4a-4199-8be0-42959dc6e947| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: ubuntu| |OS|Linux x64 5.10.16.3-microsoft-standard-WSL2| |CPUs|Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz (12 x 2712)| |Memory (System)|24.94GB (21.75GB free)| |VM|0%|
Extensions (22) Extension|Author (truncated)|Version ---|---|--- remote-containers|ms-|0.304.0 remote-ssh|ms-|0.102.0 remote-ssh-edit|ms-|0.86.0 remote-wsl|ms-|0.81.0 vscode-remote-extensionpack|ms-|0.24.0 remote-explorer|ms-|0.4.1 remote-server|ms-|1.4.3 vscode-icons|vsc|12.5.0 vim|vsc|1.25.2 vim-cheatsheet|And|0.0.1 markdown-mermaid|bie|1.19.0 terraform|has|2.27.1 vscode-kafka|jep|0.15.0 vscode-azureterraform|ms-|0.3.2 vscode-docker|ms-|1.26.0 csharp|ms-|2.0.413 vscode-dotnet-runtime|ms-|1.7.1 vscode-kubernetes-tools|ms-|1.3.13 azure-account|ms-|0.11.5 vsliveshare|ms-|1.0.5883 vscode-yaml|red|1.14.0 json|Zai|2.0.2
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30803844 282f8724:30602487 f6dab269:30613381 a9j8j154:30646983 showlangstatbar:30737416 03d35959:30757346 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 gsofa:30804715 pythonnosmt12:30797651 pythonidxpt:30805730 pythonnoceb:30805159 synctok:30821570 dsvsc013:30795093 dsvsc014:30804076 diffeditorv2:30821572 ```

It must be noted that I'm running vs code behind a corporate proxy but have not experienced this issue with Omnisharp. Could it be that the new implementation makes a call to an external server. If this is the case but Omnisharp also makes a call to an external, this may have been solved by adding the Omnisharp external host in the no_proxy list. I cannot tell for sure as I don't recall adding a no_proxy entry for Omnisharp.

mjbvz commented 1 year ago

/extC#

vscodenpa commented 1 year ago

It looks like this is caused by the C# extension. Please file the issue to the C# extension repository. Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our issue reporting guidelines for more information.

Happy Coding!