josa42 / coc-sh

SH language server extension using bash-language-server for coc.nvim.
MIT License
209 stars 4 forks source link

`Connection to server got closed. Server will not be restarted` error when starting server #60

Closed EmilyGraceSeville7cf closed 2 years ago

EmilyGraceSeville7cf commented 2 years ago

Environment

Vim: VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 01 2022 09:16:32) OS: Ubuntu 20.04.4 LTS

Steps to reproduce

Logs

1   2022-04-21T19:29:14.375 INFO (pid:20462) [services] - registered service "sh"
  1 2022-04-21T19:29:14.378 INFO (pid:20462) [services] - bash-language-server state change: stopped => starting
  2 2022-04-21T19:29:14.379 INFO (pid:20462) [plugin] - coc.nvim initialized with node: v16.14.0 after 120ms
  3 2022-04-21T19:29:14.399 INFO (pid:20462) [language-client-index] - Language server "sh" started with 20500
  4 2022-04-21T19:29:14.483 INFO (pid:20462) [services] - bash-language-server state change: starting => stopped
  5 2022-04-21T19:29:14.484 INFO (pid:20462) [services] - bash-language-server state change: stopped => starting
  6 2022-04-21T19:29:14.492 INFO (pid:20462) [language-client-index] - Language server "sh" started with 20529
  7 2022-04-21T19:29:14.546 INFO (pid:20462) [services] - bash-language-server state change: starting => stopped
  8 2022-04-21T19:29:14.546 INFO (pid:20462) [services] - bash-language-server state change: stopped => starting
  9 2022-04-21T19:29:14.555 INFO (pid:20462) [language-client-index] - Language server "sh" started with 20554
 10 2022-04-21T19:29:14.631 INFO (pid:20462) [services] - bash-language-server state change: starting => stopped
 11 2022-04-21T19:29:14.631 INFO (pid:20462) [services] - bash-language-server state change: stopped => starting
 12 2022-04-21T19:29:14.642 INFO (pid:20462) [language-client-index] - Language server "sh" started with 20584
 13 2022-04-21T19:29:14.733 INFO (pid:20462) [services] - bash-language-server state change: starting => stopped
 14 2022-04-21T19:29:14.734 ERROR (pid:20462) [services] - Server sh failed to start: Error: Connection to server got closed. Server will not be r    estarted.
 15     at Pf.handleConnectionClosed (/home/emilyseville7cfg/.vim/pack/lsp/start/coc.nvim/build/index.js:224:1006)
 16     at Pf.handleConnectionClosed (/home/emilyseville7cfg/.vim/pack/lsp/start/coc.nvim/build/index.js:224:29270)
 17     at t (/home/emilyseville7cfg/.vim/pack/lsp/start/coc.nvim/build/index.js:224:386)
 18     at qA.invoke (/home/emilyseville7cfg/.vim/pack/lsp/start/coc.nvim/build/index.js:36:9670)
 19     at kd.fire (/home/emilyseville7cfg/.vim/pack/lsp/start/coc.nvim/build/index.js:36:10436)
 20     at Ci (/home/emilyseville7cfg/.vim/pack/lsp/start/coc.nvim/build/index.js:37:10897)
 21     at qA.invoke (/home/emilyseville7cfg/.vim/pack/lsp/start/coc.nvim/build/index.js:36:9670)
 22     at kd.fire (/home/emilyseville7cfg/.vim/pack/lsp/start/coc.nvim/build/index.js:36:10436)
 23     at oT.fireClose (/home/emilyseville7cfg/.vim/pack/lsp/start/coc.nvim/build/index.js:36:12716)
 24     at Socket.<anonymous> (/home/emilyseville7cfg/.vim/pack/lsp/start/coc.nvim/build/index.js:36:14275)
 25 2022-04-21T19:29:25.008 INFO (pid:20462) [attach] - receive notification: openLog []

Configs

My ~/.vimrc:

colorscheme pablo
set number relativenumber
set tabstop=4
set expandtab

My coc-settings.json is empty.

Notes

What am I missing? I want enable a Bash intellisence.

tmpm697 commented 2 years ago

got same issue recently.

tmpm697 commented 2 years ago

solved by update coc.nvim

r10r commented 2 years ago

@EmilySeville7cfg I have the same issue. To what coc.nvim version did you upgrade ?

EmilyGraceSeville7cf commented 2 years ago

I didn't upgrade at all. I've just closed issue after the previous (not yours) comment. I haven't checked out whether everything work now. Sorry. I've just switched to another editor where no such problems happened.

r10r commented 2 years ago

Sorry, I should have addressed @tmpm697

I have the same issue. To what coc.nvim version did you upgrade ?

r10r commented 2 years ago

I've fixed it by upgrading coc-sh to v0.7.0 (I had v0.6.1 installed previously)

tmpm697 commented 2 years ago

You need to run yarn when coc and its relevant plugins updated.