question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Request textDocument/foldingRange failed" repeatedly pops up.

See original GitHub issue

Type: Bug

Issue Description

Constant error popping up saying Request textDocument/foldingRange failed. I am using vscode with Ubuntu 20.04 WSL setup.

Steps to Reproduce

  1. Create a brand new blazor app from the cli dotnet new blazorwasm -o BlazorServerApp
  2. Run project with C#
  3. This error starts to pop up “Request textDocument/semanticTokens/range failed.”
  4. Duplicate this div below itself in the /Shared/NavMenu.razor file <div class="nav-item px-3"> <NavLink class="nav-link" href="fetchdata"> <span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data </NavLink> </div>
  5. Now the “Request textDocument/foldingRange failed” repeatedly pops up.

Expected Behavior

Not to constantly have extension errors popping up because it cannot understand the code.

Actual Behavior

“Request textDocument/foldingRange failed” repeatedly pops up.

Logs

C# log

Post the output from Output-->C# here

C# LSP Trace Logs

Post the output from Output-->C# LSP Trace Logs here. Requires `dotnet.server.trace` to be set to `Trace`

Environment information

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

Dotnet Information .NET SDK: Version: 7.0.400 Commit: 73bf45718d

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.400/

Host: Version: 7.0.10 Architecture: x64 Commit: a6dbb800a4

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

.NET runtimes installed: Microsoft.AspNetCore.App 7.0.10 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 7.0.10 [/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
csdevkit ms-dotnettools 0.3.21 ms-dotnettools.csdevkit-0.3.21-linux-x64
csharp ms-dotnettools 2.0.357 ms-dotnettools.csharp-2.0.357-linux-x64
git-graph mhutchie 1.30.0 mhutchie.git-graph-1.30.0
gitflow vector-of-bool 1.2.1 vector-of-bool.gitflow-1.2.1
githistory donjayamanne 0.6.20 donjayamanne.githistory-0.6.20
gitlens eamodio 14.2.1 eamodio.gitlens-14.2.1
mongodb-vscode mongodb 1.2.0 mongodb.mongodb-vscode-1.2.0
powershell ms-vscode 2023.6.0 ms-vscode.powershell-2023.6.0
prettier-vscode esbenp 10.1.0 esbenp.prettier-vscode-10.1.0
python ms-python 2023.14.0 ms-python.python-2023.14.0
sass-indented syler 1.8.27 syler.sass-indented-1.8.27
svg jock 1.5.3 jock.svg-1.5.3
vscode-color-picker AntiAntiSepticeye 0.0.4 antiantisepticeye.vscode-color-picker-0.0.4
vscode-dotnet-pack ms-dotnettools 1.0.12 ms-dotnettools.vscode-dotnet-pack-1.0.12
vscode-dotnet-runtime ms-dotnettools 1.7.0 ms-dotnettools.vscode-dotnet-runtime-1.7.0
vscode-eslint dbaeumer 2.4.2 dbaeumer.vscode-eslint-2.4.2
vscode-html-css ecmel 1.13.1 ecmel.vscode-html-css-1.13.1
vscode-import-cost wix 3.3.0 wix.vscode-import-cost-3.3.0
vscode-lottie lottiefiles 1.0.5 lottiefiles.vscode-lottie-1.0.5
vscode-pylance ms-python 2023.8.20 ms-python.vscode-pylance-2023.8.20
vscode-react-native msjsdiag 1.11.2 msjsdiag.vscode-react-native-1.11.2
vscode-yaml redhat 1.14.0 redhat.vscode-yaml-1.14.0
vscodeintellicode-csharp ms-dotnettools 0.1.26 ms-dotnettools.vscodeintellicode-csharp-0.1.26-linux-x64

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

System Info
Item Value
CPUs AMD Ryzen 7 Microsoft Surface ® Edition (16 x 1996)
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) 15.45GB (4.39GB free)
Process Argv –folder-uri=vscode-remote://wsl+Ubuntu/home/james/repos/FirstBlazorApp --remote=wsl+Ubuntu --crash-reporter-id f28b5a18-e7d9-4c97-873a-6695beca75bd
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.15.90.1-microsoft-standard-WSL2
CPUs AMD Ryzen 7 Microsoft Surface ® Edition (16 x 1996)
Memory (System) 7.49GB (4.45GB free)
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30792226
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyonecf:30548226
vscccc:30803845
3biah626:30602489
89544117:30613380
a9j8j154:30646983
showlangstatbar:30737416
03d35959:30757346
7ij38806:30736111
pythonfmttext:30731395
pythoncmv:30756943
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
gsofa:30804715
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
diffeditorv2:30812749

Issue Analytics

  • State:closed
  • Created a month ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
james-white-xcommented, Aug 17, 2023

The new update has solved the issue. Thanks

1reaction
allisonchoucommented, Aug 16, 2023

@james-white-x A new version of the C# extension was released a few hours ago that we think fixes this issue (2.0.376). Can you update and let us know if the issue reproduces?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Request textDocument/documentLink failed error on key ...
This gets repeated indefinetly and is making VSCode unusable. I'm editing some JSP / JSTL files so I'm wondering if it's some non-valid...
Read more >
VS Code rust-analyzer: Request textDocument/inlayHint ...
Hello everyone, today I encountered an annoying bug with rust-analyzer. I cloned RustCrypto's AEAD repo and opened it in VS Code, ...
Read more >
Language Server Protocol Specification - 3.17
This message is sent from the server to the client and after the client has successfully executed the request further textDocument/willSaveWaitUntil requests ......
Read more >
VS Code API | Visual Studio Code Extension API
VS Code API. VS Code API is a set of JavaScript APIs that you can invoke in your Visual Studio Code extension. This...
Read more >
Request textDocument/documentLink failed error on key press ...
HTML : Visual Studio Code (vscode) - Request textDocument /documentLink failed error on key press [ Beautify Your Computer ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found