emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.76k stars 875 forks source link

Error starting up pyls over tramp: No buffer named *pyls-remote* #1580

Open rlivings39 opened 4 years ago

rlivings39 commented 4 years ago

Describe the bug Launching pyls via tramp gives error:

Error: (error "No buffer named *pyls-remote*")
tramp-file-name-handler: No buffer named *pyls-remote*

To Reproduce Start emacs with:

emacs -Q -l ~/lsp-start-plain.el

Then register a remote pyls:

(require 'lsp-mode)
(lsp-register-client
 (make-lsp-client :new-connection (lsp-tramp-connection "pyls")
                  :major-modes '(python-mode)
                  :remote? t
                  :server-id 'pyls-remote))

Then open a remote python file, start lsp, and notice error. If I create that buffer C-x b *pyls-remote* <RET> and then run M-x lsp everything launches correctly.

Which Language Server did you use pyls

OS Client: Ubuntu 18.04 Remote: Debian 10

Error callstack Debug on error doesn't catch anything.

Command "pyls" is present on the path.
Command "pyls" is present on the path.
Found the following clients for /remote:/ek/cgi-bin/settings.py: (server-id pyls-remote, priority 0)
The following clients were selected based on priority: (server-id pyls-remote, priority 0)

There are no open workspaces for lsp-workspace-show-log.

*Messages*
Tramp: Opening connection for remote using scp...
Tramp: Sending command ‘exec ssh   -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none remote’
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘remote’
Tramp: Opening connection for remote using scp...done
Tramp: Inserting ‘/scp:remote:/ek/cgi-bin/settings.py’...
Tramp: Encoding remote file ‘/scp:remote:/ek/cgi-bin/settings.py’ with ‘base64 <%s’...done
Tramp: Decoding local file ‘/tmp/tramp.10016jLM.py’ with ‘base64-decode-region’...done
Tramp: Inserting ‘/scp:remote:/ek/cgi-bin/settings.py’...done
File mode specification error: (error No buffer named *pyls-remote*)

Tramp: Checking ‘vc-registered’ for /scp:remote:/ek/cgi-bin/settings.py...failed
File mode specification error: (error No buffer named *pyls-remote*)
Error: (error "No buffer named *pyls-remote*")

Tramp: Checking ‘vc-registered’ for /scp:remote:/ek/cgi-bin/settings.py...failed
Error: (error "No buffer named *pyls-remote*")
tramp-file-name-handler: No buffer named *pyls-remote*
yyoncho commented 4 years ago

Can you provide the corresponding call stack (after M-x toggle-debug-on-error)?

Edit: Ignore, missed

Debug on error doesn't catch anything.