Skip to content

Emacs eglot gets Internal error when processing workspace/configuration server request #1201

@buzztaiki

Description

@buzztaiki

Describe the bug

When using yaml-language-server with Emacs eglot, an error occurs while processing the workspace/configuration request. This is likely because scopeUri is set to the string "null".

[jsonrpc] e[17:12:40.142] --> workspace/didChangeConfiguration {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{}}}
[jsonrpc] e[17:12:40.156] <-- workspace/configuration[0] {"jsonrpc":"2.0","id":0,"method":"workspace/configuration","params":{"items":[{"section":"yaml"},{"section":"http"},{"section":"[yaml]","scopeUri":"null"},{"section":"editor"},{"section":"files"}]}}
[jsonrpc] e[17:12:40.157] --> workspace/configuration[0] {"jsonrpc":"2.0","id":0,"error":{"code":-32603,"message":"Internal error"}}
[jsonrpc] e[17:12:40.157] <-- workspace/configuration[1] {"jsonrpc":"2.0","id":1,"method":"workspace/configuration","params":{"items":[{"section":"yaml"},{"section":"http"},{"section":"[yaml]","scopeUri":"null"},{"section":"editor"},{"section":"files"}]}}
[jsonrpc] e[17:12:40.158] --> workspace/configuration[1] {"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"Internal error"}}
[jsonrpc] e[17:12:40.164] <-- window/logMessage {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":1,"message":"Error: Internal error\n    at handleResponse (/usr/lib/node_modules/yaml-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:565:48)\n    at handleMessage (/usr/lib/node_modules/yaml-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:345:13)\n    at processMessageQueue (/usr/lib/node_modules/yaml-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:362:17)\n    at Immediate.<anonymous> (/usr/lib/node_modules/yaml-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:334:13)\n    at process.processImmediate (node:internal/timers:504:21)"}}
[jsonrpc] e[17:12:40.164] <-- window/logMessage {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":1,"message":"Error: Internal error\n    at handleResponse (/usr/lib/node_modules/yaml-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:565:48)\n    at handleMessage (/usr/lib/node_modules/yaml-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:345:13)\n    at processMessageQueue (/usr/lib/node_modules/yaml-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:362:17)\n    at Immediate.<anonymous> (/usr/lib/node_modules/yaml-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:334:13)\n    at process.processImmediate (node:internal/timers:504:21)"}}

Expected Behavior

Opening a YAML file should not produce an Internal error, and yaml-language-server should work normally.

Current Behavior

An Internal error occurs when opening a YAML file, making yaml-language-server unusable.

Steps to Reproduce

  1. Open a YAML file.
  2. An Internal error is recorded in the event log, after which LSP features become unavailable.

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions