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

ansible-language-server not handling failed promise in window/showMessageRequest #1144

Open
David-Else opened this issue Oct 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@David-Else
Copy link

Summary

This language server does not work with the Helix editor properly. I am experiencing an issue with ansible-language-server where it fails to handle a failed promise when sending the window/showMessageRequest. This problem occurs when running ansible-language-server on node 18.18.0.

The promise fails because the method for window/showMessageRequest is not implemented in Helix. As a result, the server correctly sends back the MethodNotFound JSONRPC reply.

This unhandled failed promise is likely harmless on node 16 where it seems to work OK, but it becomes fatal on node 18.

Extension version

$ ansible-language-server --version 1.2.1

VS Code version

n/a using Helix Editor

Ansible Version

$ ansible --version
ansible [core 2.14.3]
  config file = None
  configured module search path = ['/home/david/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/david/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True

OS / Environment

Debian 12 Bookworm

Relevant log output

(Helix Log file)

2023-10-10T12:55:36.289 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2023-10-10T12:55:36.342 helix_term::application [ERROR] Language Server: Method window/showMessageRequest not found in request 3
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "/usr/local/lib/node_modules/@ansible/ansible-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:565\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "                        responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "                                               ^\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "ResponseError: Method not found: window/showMessageRequest\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "    at handleResponse (/usr/local/lib/node_modules/@ansible/ansible-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:565:48)\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "    at handleMessage (/usr/local/lib/node_modules/@ansible/ansible-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:345:13)\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "    at processMessageQueue (/usr/local/lib/node_modules/@ansible/ansible-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:362:17)\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "    at Immediate.<anonymous> (/usr/local/lib/node_modules/@ansible/ansible-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:334:13)\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "    at process.processImmediate (node:internal/timers:471:21) {\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "  code: -32601,\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "  data: undefined\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "}\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "\n"
2023-10-10T12:55:36.346 helix_lsp::transport [ERROR] ansible-language-server err <- "Node.js v18.13.0\n"
2023-10-10T12:55:36.354 helix_lsp::transport [ERROR] ansible-language-server err: <- StreamClosed
2023-10-10T12:55:36.621 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
@David-Else David-Else added bug Something isn't working new labels Oct 12, 2023
@audgirka audgirka removed the new label Oct 18, 2023
@ssbarnea ssbarnea transferred this issue from ansible/ansible-language-server Mar 15, 2024
@eliliam
Copy link

eliliam commented Aug 29, 2024

This is something I just hit as well, is there any plan on addressing this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Roadmap
Development

No branches or pull requests

3 participants