oraios/serena · error · SolidLSPException

Language Server not started

Error message

Language Server not started

What it means

Raised as SolidLSPException when a request (references, definition, rename, diagnostics, etc.) is attempted while the Vue language server process has not been started or has not finished becoming operational. _ensure_ls_operational gates all API calls behind server_started to prevent requests on a dead/never-launched LSP connection.

Source

Thrown at src/solidlsp/language_servers/vue_language_server.py:216

                return
            log.exception("Error while warming up Vue language server operational state")
        except Exception:
            log.exception("Error while warming up Vue language server operational state")

    def _ensure_ls_operational(self) -> None:
        # short-circuit completed warm-up
        if self._ls_operational_ready_event.is_set():
            return

        # serialize the warm-up sequence
        with self._ls_operational_lock:
            # short-circuit repeated callers after waiting for the lock
            if self._ls_operational_ready_event.is_set():
                return

            # validate server availability
            if not self.server_started:
                raise SolidLSPException("Language Server not started")

            # wait for cross-file reference readiness
            if not self._has_waited_for_cross_file_references:
                sleep(self._get_wait_time_for_cross_file_referencing())
                self._has_waited_for_cross_file_references = True

            # index Vue files on the companion TypeScript server
            self._ensure_vue_files_indexed_on_ts_server()

            # publish operational readiness
            self._ls_operational_ready_event.set()

    @override
    def is_ignored_dirname(self, dirname: str) -> bool:
        return super().is_ignored_dirname(dirname) or dirname in [
            "node_modules",
            "dist",
            "build",

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Ensure start()/initialization completed and the readiness event is set before issuing requests.
  2. Check logs for the server process failing to launch (node missing, vue-language-server binary path wrong) and fix the underlying startup error.
  3. Re-create/restart the SolidLSP instance if the server previously crashed or was stopped.
  4. Wrap requests in retry/backoff to tolerate slow Vue server startup, or increase cross-file reference wait time.
  5. Verify the vue-language-server and typescript-language-server binaries exist (see install-related errors).

Example fix

// before
ls = SolidLSP("vue", "/repo")
refs = ls.request_references("src/App.vue", 10, 0)  # may raise if startup is slow/crashed
// after
ls = SolidLSP("vue", "/repo")
ls.start()
try:
    refs = ls.request_references("src/App.vue", 10, 0)
except SolidLSPException:
    ls.stop(); ls.start()
    refs = ls.request_references("src/App.vue", 10, 0)
Defensive patterns

Strategy: try-catch

Validate before calling

if not hasattr(ls, 'server_started') or not ls.server_started:
    ls.start()  # or wait for readiness before issuing requests

Type guard

def is_ready(ls) -> bool:
    return bool(getattr(ls, "server_started", False)) and getattr(ls, "_ls_operational_ready_event", None) is not None and ls._ls_operational_ready_event.is_set()

Try / catch

try:
    refs = ls.request_references(file_path, line, col)
except SolidLSPException as e:
    if str(e) == "Language Server not started":
        ls.stop(); ls.start()
        refs = ls.request_references(file_path, line, col)
    else:
        raise

Prevention

When it happens

Trigger: Calling request_references/request_definition/request_file_references/request_rename_symbol_edit/request_text_document_diagnostics, or warm-up via _warm_up_ls_operational_state, when self.server_started is False — i.e., before start() completed or after the server process crashed/was stopped.

Common situations: Calling API methods before the server finished initializing (Vue server startup is slow); server process crashed after launch (bad Node install, OOM); calling methods after stop()/context exit; race where the readiness lock was acquired but startup failed silently.

Related errors


AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29). Data as JSON: /api/errors/7e8d49f598439db3. Report an issue: GitHub.