Skip to content

Error detected while processing - not an open channel if server dies #1239

@OJFord

Description

@OJFord
  • Did you upgrade to latest plugin version? Yes
  • Did you upgrade to/compile latest binary? Run shell command
    bin/languageclient --version to get its version number. languageclient 0.1.161
  • (Neovim users only) Did you check output of :checkhealth LanguageClient? N/A
  • Did you check troubleshooting? Yes

Describe the bug

Any LanguageClient command (including LanguageClientStop & LanguageClientStart) fails with an error like:

Error detected while processing function LanguageClient#startServer[6]..LanguageClient#Call[22]..LanguageClient#Write:
line 11:
E906: Not an open channel

If the (STDIO only?) langauge server exits outside of it's control.

Environment

  • neovim/vim version (nvim --version or vim --version): VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan 16 2022 12:09:56)
  • This plugin version (git rev-parse --short HEAD): a42594c
  • This plugin's binary version (bin/languageclient --version): languageclient 0.1.161
  • Minimal vimrc content (A minimal vimrc is the smallest vimrc that could
    reproduce the issue. Refer to an example here): any
  • Language server link and version: any

To Reproduce

  • Run vim & languageclient
  • :!kill (or kill from another shell) the language server
  • Try to call formatting, stop server, start server, etc.

Current behavior

Error detected while processing function LanguageClient#startServer[6]..LanguageClient#Call[22]..LanguageClient#Write:
line 11:
E906: Not an open channel

Expected behavior

Good: LanguageClientStop shouldn't care IMO, should just close down itself & if server already down that's no problem; LanguageClientStart should start it again if not already running.

Better: Automatically restart on any command; only error if it fails to start up again?

Screenshots

Additional context

I've perhaps most often hit this with VLS (Vue) spinning it's wheels and making vim hang entirely; short of killing the vim instance all I can do is kill the language server and live with the broken languageclient. (Because it's unresponsive, so I can't LanguageClientStop.) Though it has also happened where the server has just died for whatever other reason that wasn't me killing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions