You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When integrating the Yaml Language Server with Visual Studio I faced an error during the 'textDocument/completion' call to the server.
The error is outmsg = "{"jsonrpc":"2.0","id":9,"error":{"code":-32603,"message":"Request textDocument/completion failed with message: Cannot read properties of undefined (reading 'length')"}}"
The version of yaml language server is 1.10.0
I fixed this error by changing the condition to 'if (this.customTags && this.customTags.length > 0) {'
The schema is fine and gets validated with the same language server. I am happy to provide if required.
Expected Behavior
Even if customTags are not defined the completion should work successfully.
Current Behavior
It throws an error "Request textDocument/completion failed with message: Cannot read properties of undefined (reading 'length')"}}"
Steps to Reproduce
Setup a new VS client
Don't initialize the language server and start it with defaults.
Run the autocompletion on a schema file.
Environment
[ yes] Windows
Mac
Linux
other (please specify)
The text was updated successfully, but these errors were encountered:
Describe the bug
When integrating the Yaml Language Server with Visual Studio I faced an error during the 'textDocument/completion' call to the server.
The error is outmsg = "{"jsonrpc":"2.0","id":9,"error":{"code":-32603,"message":"Request textDocument/completion failed with message: Cannot read properties of undefined (reading 'length')"}}"
The version of yaml language server is 1.10.0
I tried to attach the yaml language server nodejs process and found that the error is thrown at line 283 of this file https://github.com/redhat-developer/yaml-language-server/blob/1.10.0/src/languageservice/services/yamlCompletion.ts
I fixed this error by changing the condition to 'if (this.customTags && this.customTags.length > 0) {'
The schema is fine and gets validated with the same language server. I am happy to provide if required.
Expected Behavior
Even if customTags are not defined the completion should work successfully.
Current Behavior
It throws an error "Request textDocument/completion failed with message: Cannot read properties of undefined (reading 'length')"}}"
Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: