language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Language Client Not Running in Svelte Extension for VSCode

Open felixhaeberle opened this issue 1 year ago • 1 comments

Describe the bug

An error was encountered in the Svelte extension for Visual Studio Code, specifically within the language client mechanism. The error occurs when attempting to send a request via the language client, with the failure message indicating that the client is not currently running.

The error suggests that the language client within the Svelte VSCode extension attempts to send a request when it is in a non-operational state (e.g., stopped, stopping, or failed to start). This situation could disrupt the functionality provided by the extension, such as IntelliSense, linting, or code formatting.

Reproduction

  1. Install the Svelte extension (version 108.2.1) in Visual Studio Code on a Windows 10 system.
  2. Perform actions that require communication with the language server (e.g., opening a Svelte file, editing code).
  3. The error may occur under conditions where the language client has stopped or failed to initialize properly.

Expected behaviour

The language client within the Svelte extension should remain operational during active development sessions, providing continuous support for language features without interruption.

System Info

  • Node Version: v18.17.1
  • Windows Version: 10.0.19045
  • Architecture: x64
  • Environment: production
  • Error Level: error
  • Error Mechanism: onunhandledrejection
  • OS: Windows 10.0.19045
  • Runtime: Node v18.17.1

Which package is the issue about?

No response

Additional Information, eg. Screenshots

Error Details

  • Type: Error
  • Message: Client is not running
  • Location: vscode-languageclient/lib/common/client.js in LanguageClient.sendRequest at line 322:35
  • Handled: No

Stack Trace

  • Failure originates from LanguageClient.sendRequest in client.js at line 322:35.
  • Subsequently, it is referenced in tagRequestor within extension.ts at line 193:23, and in auto-closing functionality for HTML tags in autoClose.ts at line 79:13.
  • Internal Node.js timers functions are involved in the execution path, specifically listOnTimeout and processTimers.
Bildschirmfoto 2024-02-08 um 10 55 55

felixhaeberle avatar Feb 08 '24 09:02 felixhaeberle

Do you have the svelte.language-server.runtime or the svelte.language-server.ls-path config?

If so, please read carefully what the description says. Most people encounter crashes because they mix up these two configs. Or set it to a non-existence path. Unless you know why you need the config, I recommend you remove them.

jasonlyu123 avatar Feb 08 '24 12:02 jasonlyu123

Closing due to inactive and lack of reproduction.

jasonlyu123 avatar May 07 '24 15:05 jasonlyu123