-
Notifications
You must be signed in to change notification settings - Fork 191
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
Constant Request textDocument/semanticTokens/range failed. error in vscode #9598
Comments
To be honest, I'm not too fazed about the intellisense and that not working. If there was a way to disable these error notifications (you can't disable errors notifications in VSCode without a CSS hack), or downlevel them to warning that'd be immediately much better for me |
Also reported internally in https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1957989 |
@LiamMorrow , we've recently made some changes that are in the C# Extension for VS Code version 2.22.5 related to the handling of the casing of paths; does that resolve this issue for you? |
I have this even without the c# devkit extension |
This issue is extremly annoying, first of all intellisense doesn't work and on top of that notification keep popping even when we type a single word. Turn of notification also doesn't work. |
Sorry for the delay @phil-allen-msft it's been a hectic couple of weeks as I'm moving rn. Currently running v2.24.17 (prerelease) and I haven't seen the issue after a brief play around 🎉 |
I found the solution for my use case, i had a solution which had Blazor projects from different repos and not part of same workspace, if i open them in separate Workspaces or open the root folder where alll repos exist then no issues. |
This issue is extremely annoying. It keeps spamming these messages in the bottom right: |
Yeah unfortunately it is back for me as well. It's not a small repo, but this is where I can reliably reproduce it |
I've had this issue since start of 2023, it comes and goes. Sometimes it works fine but mostly it's just spitting errors. Is there any ETA on this fix, I feel like this should be important since the C# DeKit extestension is supposed to be "the new thing" for VSCode C# development and right now it's not very usable. |
@SamuelChih I just discovered this setting in vscode. It doesn't fix the problem that it is having, but it does stop it from causing that flood of notifications.
|
I have also observed that snap version of vscode has this issue, installed using below commands and after that i faced no issue
|
G'day, I've been using the c# devkit extension in vscode and have noticed that when editing razor files it constantly shows errors as notifications, simply when navigating to any razor file.
Request textDocument/semanticTokens/range failed.
Logs
Details
[Error - 20:31:23] [LanguageServerHost] System.ArgumentException: Range={ Start={ Line=207, Character=17 }, End={ Line=260, Character=0 } }. text.Length=5758. text.Lines.Count=230 ---> System.ArgumentOutOfRangeException: The requested line number 260 must be less than the number of lines 230. (Parameter 'Line') at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position) in /_/src/Compilers/Core/Portable/Text/TextLineCollection.cs:line 67 at Microsoft.CodeAnalysis.Text.TextLineCollection.GetTextSpan(LinePositionSpan span) in /_/src/Compilers/Core/Portable/Text/TextLineCollection.cs:line 78 at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.RangeToTextSpan(Range range, SourceText text) in /_/src/Features/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 287 --- End of inner exception stack trace --- at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.RangeToTextSpan(Range range, SourceText text) in /_/src/Features/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 292 at Microsoft.CodeAnalysis.LanguageServer.Handler.SemanticTokens.SemanticTokensHelpers.ComputeSemanticTokensDataAsync(ClientCapabilities capabilities, Document document, Range[] ranges, ClassificationOptions options, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Protocol/Handler/SemanticTokens/SemanticTokensHelpers.cs:line 85 at Microsoft.CodeAnalysis.LanguageServer.Handler.SemanticTokens.SemanticTokensHelpers.HandleRequestHelperAsync(IGlobalOptionService globalOptions, SemanticTokensRefreshQueue semanticTokensRefreshQueue, Range[] ranges, RequestContext context, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Protocol/Handler/SemanticTokens/SemanticTokensHelpers.cs:line 50 at Microsoft.CodeAnalysis.LanguageServer.Handler.SemanticTokens.SemanticTokensRangeHandler.HandleRequestAsync(SemanticTokensRangeParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Protocol/Handler/SemanticTokens/SemanticTokensRangeHandler.cs:line 45 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.StartRequestAsync(TRequestContext context, CancellationToken cancellationToken) [Error - 20:31:23] Request textDocument/semanticTokens/range failed. Message: Range={ Start={ Line=207, Character=17 }, End={ Line=260, Character=0 } }. text.Length=5758. text.Lines.Count=230 Code: -32000 [object Object]
Note this happens on both the current release, and the prerelease.
The text was updated successfully, but these errors were encountered: