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

Request textDocument/semanticTokens/range failed. #10541

Open
shakibm83 opened this issue Jun 26, 2024 · 0 comments
Open

Request textDocument/semanticTokens/range failed. #10541

shakibm83 opened this issue Jun 26, 2024 · 0 comments

Comments

@shakibm83
Copy link

hello everyone.
when I add this line to my code I get an error:
<InputFile class="hidden" id="englishFile" OnChange="EnglishFileChanged" />

and my error is :
Request textDocument/semanticTokens/range failed.
[Error - 12:26:47 PM] [LanguageServerHost] System.ArgumentException: Range={ Start={ Line=74, Character=37 }, End={ Line=187, Character=0 } }. text.Length=4268. text.Lines.Count=164 ---> System.ArgumentOutOfRangeException: The requested line number 187 must be less than the number of lines 164. (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/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 330 --- End of inner exception stack trace --- at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.RangeToTextSpan(Range range, SourceText text) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 335 at Microsoft.CodeAnalysis.LanguageServer.Handler.InlayHint.InlayHintHandler.HandleRequestAsync(InlayHintParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/InlayHint/InlayHintHandler.cs: line 45 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem3.StartRequestAsync(TRequestContext context, IMethodHandler handler, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 136 Error making textDocument/inlayHint request: Range={ Start={ Line=74, Character=37 }, End={ Line=187, Character=0 } }. text.Length=4268. text.Lines.Count=164 [Error - 12:26:47 PM] [LanguageServerHost] System.ArgumentOutOfRangeException: The requested line number 174 must be less than the number of lines 164. (Parameter 'Line') at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position) in /_/src/Compilers/Core/Portable/Text/TextLineCollection.cs:line 67 at Microsoft.CodeAnalysis.LanguageServer.Extensions.GetPositionFromLinePositionAsync(TextDocument document, LinePosition linePosition, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Extensions/Extensions.cs:line 163 at Microsoft.CodeAnalysis.LanguageServer.Handler.FindAllReferencesHandler.HandleRequestAsync(ReferenceParams referenceParams, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/References/FindAllReferencesHandler.cs:line 61 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem3.StartRequestAsync(TRequestContext context, IMethodHandler handler, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 136 [Error - 12:26:47 PM] [LanguageServerHost] System.ArgumentOutOfRangeException: The requested line number 182 must be less than the number of lines 164. (Parameter 'Line') at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position) in /_/src/Compilers/Core/Portable/Text/TextLineCollection.cs:line 67 at Microsoft.CodeAnalysis.LanguageServer.Extensions.GetPositionFromLinePositionAsync(TextDocument document, LinePosition linePosition, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Extensions/Extensions.cs:line 163 at Microsoft.CodeAnalysis.LanguageServer.Handler.FindAllReferencesHandler.HandleRequestAsync(ReferenceParams referenceParams, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/References/FindAllReferencesHandler.cs:line 61 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem3.StartRequestAsync(TRequestContext context, IMethodHandler handler, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 136 [Error - 12:26:47 PM] Request textDocument/references failed. Message: The requested line number 182 must be less than the number of lines 164. (Parameter 'Line') Code: -32000 [object Object] [Error - 12:26:47 PM] Request textDocument/references failed. Message: The requested line number 174 must be less than the number of lines 164. (Parameter 'Line') Code: -32000 [object Object] [Error - 12:26:48 PM] [LanguageServerHost] System.ArgumentException: Range={ Start={ Line=173, Character=7 }, End={ Line=174, Character=0 } }. text.Length=4268. text.Lines.Count=164 ---> System.ArgumentOutOfRangeException: The requested line number 173 must be less than the number of lines 164. (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/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 330 --- End of inner exception stack trace --- at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.RangeToTextSpan(Range range, SourceText text) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 335 at Microsoft.CodeAnalysis.LanguageServer.Handler.CodeActions.CodeActionHelpers.GetActionSetsAsync(TextDocument document, CodeActionOptionsProvider fallbackOptions, ICodeFixService codeFixService, ICodeRefactoringService codeRefactoringService, Range selection, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/CodeActions/CodeActionHelpers.cs:line 393 at Microsoft.CodeAnalysis.LanguageServer.Handler.CodeActions.CodeActionHelpers.GetVSCodeActionsAsync(CodeActionParams request, TextDocument document, CodeActionOptionsProvider fallbackOptions, ICodeFixService codeFixService, ICodeRefactoringService codeRefactoringService, Boolean hasVsLspCapability, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/CodeActions/CodeActionHelpers.cs:line 40 at Microsoft.CodeAnalysis.LanguageServer.Handler.CodeActionsHandler.HandleRequestAsync(CodeActionParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/CodeActions/CodeActionsHandler.cs:line 59 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem3.StartRequestAsync(TRequestContext context, IMethodHandler handler, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 136 Error making textDocument/codeAction request: Range={ Start={ Line=173, Character=7 }, End={ Line=174, Character=0 } }. text.Length=4268. text.Lines.Count=164 [Error - 12:26:48 PM] [LanguageServerHost] System.ArgumentException: Range={ Start={ Line=74, Character=37 }, End={ Line=187, Character=0 } }. text.Length=4268. text.Lines.Count=164 ---> System.ArgumentOutOfRangeException: The requested line number 187 must be less than the number of lines 164. (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/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 330 --- End of inner exception stack trace --- at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.RangeToTextSpan(Range range, SourceText text) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 335 at Microsoft.CodeAnalysis.LanguageServer.Handler.InlayHint.InlayHintHandler.HandleRequestAsync(InlayHintParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/InlayHint/InlayHintHandler.cs:line 45 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem3.StartRequestAsync(TRequestContext context, IMethodHandler handler, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 136 Error making textDocument/inlayHint request: Range={ Start={ Line=74, Character=37 }, End={ Line=187, Character=0 } }. text.Length=4268. text.Lines.Count=164 [Error - 12:32:42 PM] [LanguageServerHost] System.ArgumentException: Range={ Start={ Line=74, Character=37 }, End={ Line=187, Character=0 } }. text.Length=4432. text.Lines.Count=164 ---> System.ArgumentOutOfRangeException: The requested line number 187 must be less than the number of lines 164. (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/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 330 --- End of inner exception stack trace --- at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.RangeToTextSpan(Range range, SourceText text) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 335 at Microsoft.CodeAnalysis.LanguageServer.Handler.InlayHint.InlayHintHandler.HandleRequestAsync(InlayHintParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/InlayHint/InlayHintHandler.cs:line 45 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem3.StartRequestAsync(TRequestContext context, IMethodHandler handler, CancellationToken cancellationToken) Error making textDocument/inlayHint request: Range={ Start={ Line=74, Character=37 }, End={ Line=187, Character=0 } }. text.Length=4432. text.Lines.Count=164 [Error - 12:32:57 PM] [LanguageServerHost] System.ArgumentException: Range={ Start={ Line=74, Character=37 }, End={ Line=187, Character=0 } }. text.Length=4432. text.Lines.Count=164 ---> System.ArgumentOutOfRangeException: The requested line number 187 must be less than the number of lines 164. (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/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 330 --- End of inner exception stack trace --- at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.RangeToTextSpan(Range range, SourceText text) in /_/src/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 335 at Microsoft.CodeAnalysis.LanguageServer.Handler.InlayHint.InlayHintHandler.HandleRequestAsync(InlayHintParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/InlayHint/InlayHintHandler.cs:line 45 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem3.StartRequestAsync(TRequestContext context, IMethodHandler handler, CancellationToken cancellationToken) Error making textDocument/inlayHint request: Range={ Start={ Line=74, Character=37 }, End={ Line=187, Character=0 } }. text.Length=4432. text.Lines.Count=164
my error

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

No branches or pull requests

2 participants