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

Language server crash #102

Closed
unicode-it opened this issue Dec 6, 2021 · 7 comments
Closed

Language server crash #102

unicode-it opened this issue Dec 6, 2021 · 7 comments

Comments

@unicode-it
Copy link

unicode-it commented Dec 6, 2021

After installing as written in the docs and opening any vue file, I get the following error.

[coc.nvim]: UnhandledRejection: Connection to server got closed. Server will not be restarted.
Error: Connection to server got closed. Server will not be restarted.                                                                                                                  
    at np.handleConnectionClosed (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:967)
    at np.handleConnectionClosed (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:28612)
    at t (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:386)
    at tM.invoke (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:9670)
    at sd.fire (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:10436)
    at bi (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:36:10897)
    at tM.invoke (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:9670)
    at sd.fire (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:10436)
    at _M.fireClose (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:12716)
    at ChildProcess.<anonymous> (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:62:11975)
UnhandledRejection: Connection to server got closed. Server will not be restarted.
Error: Connection to server got closed. Server will not be restarted.
    at np.handleConnectionClosed (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:967)
    at np.handleConnectionClosed (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:28612)
    at t (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:386)
    at tM.invoke (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:9670)
    at sd.fire (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:10436)
    at bi (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:36:10897)
    at tM.invoke (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:9670)
    at sd.fire (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:10436)
    at _M.fireClose (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:12716)
    at ChildProcess.<anonymous> (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:62:11975)
UnhandledRejection: Connection to server got closed. Server will not be restarted.
Error: Connection to server got closed. Server will not be restarted.
    at np.handleConnectionClosed (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:967)
    at np.handleConnectionClosed (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:28612)
    at t (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:386)
    at tM.invoke (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:9670)
    at sd.fire (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:10436)
    at bi (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:36:10897)
    at tM.invoke (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:9670)
    at sd.fire (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:10436)
    at _M.fireClose (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:12716)
    at ChildProcess.<anonymous> (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:62:11975)
UnhandledRejection: Connection to server got closed. Server will not be restarted.

{
  "name": "Volar doctor info",
  "filePath": "xxx.vue",
  "clientVersion": "0.7.8",
  "serverVersion": "0.29.8",
  "vueVersion": "3.2.22",
  "vueRuntimeDomVersion": "3.2.22",
  "vueTscVersion": "0.29.8",
  "tsVersion": "4.4.3",
  "tsServerPath": "/home/user/.config/coc/extensions/node_modules/@yaegassy/coc-volar/node_modules/typescript/lib/tsserverlibrary.js",
  "settings": {
    "enable": true,
    "useWorkspaceTsdk": false,
    "diagnostics": {
      "enable": true,
      "tsLocale": "en"
    },
    "lowPowerMode": false,
    "codeLens": {
      "references": true,
      "pugTools": false,
      "scriptSetupTools": false
    },
    "autoClosingTags": false,
    "autoCompleteRefs": false,
    "takeOverMode": {
      "enabled": false
    },
    "formatting": {
      "enable": true,
      "printWidth": 100
    },
    "completion": {
      "tagNameCase": "both",
      "attrNameCase": "kebab",
      "autoImportComponent": true
    },
    "dev": {
      "serverPath": ""
    },
    "fix": {
      "completion": true
    }
  }
}

@yaegassy
Copy link
Owner

yaegassy commented Dec 6, 2021

I am unable to reproduce the crash in my environment. Can you tell me the output result of :CocInfo in your environment?

Also, do you have the same problem with vue projects (ts/js) created with vite? https://vitejs.dev/guide/#scaffolding-your-first-vite-project

@unicode-it
Copy link
Author

CocInfo

## versions

vim version: NVIM v0.6.0
node version: v12.22.7
coc.nvim version: 0.0.80-03c9add7cd
coc.nvim directory: /home/user/.config/nvim/plugged/coc.nvim
term: xterm-256color
platform: linux

@unicode-it
Copy link
Author

I created a fresh vue-ts project with vite as you explained and still the same error:

[coc.nvim]: UnhandledRejection: Connection to server got closed. Server will not be restarted.
Error: Connection to server got closed. Server will not be restarted.                                                                                                                  
    at np.handleConnectionClosed (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:967)
    at np.handleConnectionClosed (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:28612)
    at t (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:223:386)
    at tM.invoke (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:9670)
    at sd.fire (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:10436)
    at bi (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:36:10897)
    at tM.invoke (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:9670)
    at sd.fire (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:10436)
    at _M.fireClose (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:35:12716)
    at ChildProcess.<anonymous> (/home/user/.config/nvim/plugged/coc.nvim/build/index.js:62:11975)

@unicode-it
Copy link
Author

Is it possible to get a stacktrace / crash log of the server component?

@unicode-it
Copy link
Author

Maybe it is an incompatibility with my nvim config. But I don't know how to debug further. I don't know how the server component is executed and why it crashes.

@yaegassy
Copy link
Owner

yaegassy commented Dec 8, 2021

Is it possible to update the Node.js version? Can you update to at least v14 or higher and give it a try?

This may be a related issue.

@unicode-it
Copy link
Author

Thank you. The update solved the issue.

I would propose to add this requirement to the docs. And some hints on debugging issues could be nice as well.

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

No branches or pull requests

2 participants