Coder Social home page Coder Social logo

The server crashes about vscode-yaml HOT 8 OPEN

leedstark avatar leedstark commented on August 22, 2024 4
The server crashes

from vscode-yaml.

Comments (8)

TheMasquerader avatar TheMasquerader commented on August 22, 2024 2

I have the same problem.
My setup specs:

  • Windows 10
  • VSCode:
    -- Version 1.20.1
    -- Commit f88bbf9137d24d36d968ea6b2911786bfe103002
    -- Date 2018-02-13T15:34:36.336Z
    -- Shell 1.7.9
    -- Renderer 58.0.3029.110
    -- Node 7.9.0
    -- Architecture x64
  • YAML for VS Code 0.0.10

The error in the Output is:

C:\Users\Atodic\.vscode\extensions\adamvoss.yaml-0.0.10\server\node_modules\vscode-json-languageservice\lib\services\jsonValidation.js:47
            jsonDocument.syntaxErrors.forEach(addProblem);
                                     ^

TypeError: Cannot read property 'forEach' of undefined
    at JSONValidation.doValidation (C:\Users\Atodic\.vscode\extensions\adamvoss.yaml-0.0.10\server\node_modules\vscode-json-languageservice\lib\services\jsonValidation.js:47:38)
    at yamlDocument.documents.map.d (C:\Users\Atodic\.vscode\extensions\adamvoss.yaml-0.0.10\server\node_modules\vscode-yaml-languageservice\lib\yamlLanguageService.js:48:71)
    at Array.map (native)
    at Object.doValidation (C:\Users\Atodic\.vscode\extensions\adamvoss.yaml-0.0.10\server\node_modules\vscode-yaml-languageservice\lib\yamlLanguageService.js:48:62)
    at validateTextDocument (C:\Users\Atodic\.vscode\extensions\adamvoss.yaml-0.0.10\server\out\yamlServerMain.js:215:21)
    at Timeout._onTimeout (C:\Users\Atodic\.vscode\extensions\adamvoss.yaml-0.0.10\server\out\yamlServerMain.js:205:9)
    at ontimeout (timers.js:386:14)
    at tryOnTimeout (timers.js:250:5)
    at Timer.listOnTimeout (timers.js:214:5)
[Error - 9:06:05 AM] Connection to server got closed. Server will not be restarted.

Thank you!

from vscode-yaml.

will-l-h avatar will-l-h commented on August 22, 2024 2

Use the yaml extension by redhat. It's maintained and this issue had been fixed on it.

https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml

from vscode-yaml.

adamvoss avatar adamvoss commented on August 22, 2024

Thank you for reporting this. To fix this it will help to know more about the issue. When this happens, there should be a stack trace and exception information under Output (CTRL+K CTRL+H). Could you provide the information from there? Also if you know how to cause this issue, that would help me to find the issue and test a fix.

from vscode-yaml.

lee-baker avatar lee-baker commented on August 22, 2024

I get this issue also, it happens as soon as I open a YAML file.

The output is

[Info - 1:51:07 pm] Connection to server got closed. Server will restart.
enable
Unsupported feature, node kind: 5
C:\Users\Lee.vscode\extensions\adamvoss.yaml-0.0.8\server\node_modules\vscode-yaml-languageservice\lib\parser\yamlParser.js:138
valueNode.location = key.value;
^

TypeError: Cannot set property 'location' of undefined
at recursivelyBuildAst (C:\Users\Lee.vscode\extensions\adamvoss.yaml-0.0.8\server\node_modules\vscode-yaml-languageservice\lib\parser\yamlParser.js:138:36)
at recursivelyBuildAst (C:\Users\Lee.vscode\extensions\adamvoss.yaml-0.0.8\server\node_modules\vscode-yaml-languageservice\lib\parser\yamlParser.js:124:40)
at createJSONDocument (C:\Users\Lee.vscode\extensions\adamvoss.yaml-0.0.8\server\node_modules\vscode-yaml-languageservice\lib\parser\yamlParser.js:211:21)
at yamlDocs.map.doc (C:\Users\Lee.vscode\extensions\adamvoss.yaml-0.0.8\server\node_modules\vscode-yaml-languageservice\lib\parser\yamlParser.js:255:53)
at Array.map (native)
at Object.parse (C:\Users\Lee.vscode\extensions\adamvoss.yaml-0.0.8\server\node_modules\vscode-yaml-languageservice\lib\parser\yamlParser.js:255:42)
at Object.parseYAMLDocument (C:\Users\Lee.vscode\extensions\adamvoss.yaml-0.0.8\server\node_modules\vscode-yaml-languageservice\lib\yamlLanguageService.js:65:59)
at C:\Users\Lee.vscode\extensions\adamvoss.yaml-0.0.8\server\out\yamlServerMain.js:232:117
at Object.get (C:\Users\Lee.vscode\extensions\adamvoss.yaml-0.0.8\server\out\languageModelCache.js:34:33)
at getJSONDocument (C:\Users\Lee.vscode\extensions\adamvoss.yaml-0.0.8\server\out\yamlServerMain.js:240:26)

from vscode-yaml.

adamvoss avatar adamvoss commented on August 22, 2024

Thanks @lee-baker, that is very helpful!

Unsupported feature, node kind: 5

Node kind 5 means an include reference which are documented in the README as not supported. It would be better if they didn't crash the whole server though. That said, it might not be a whole lot more work to just add support for support rather than adding better failure behavior.

from vscode-yaml.

ferdydek avatar ferdydek commented on August 22, 2024

Oddly the same happens with YAML Support by Red Hat

from vscode-yaml.

emman27 avatar emman27 commented on August 22, 2024

Getting the exact same error as @TheMasquerader

from vscode-yaml.

xujihui1985 avatar xujihui1985 commented on August 22, 2024

this issue has been opened over year, and this problem still not fixed

from vscode-yaml.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.