oraios/serena · error · FileNotFoundError
Kotlin Language Server script not found at {kotlin_script}
Error message
Kotlin Language Server script not found at {kotlin_script} What it means
Raised by the Kotlin language server installer when the expected kotlin-language-server launch script is still absent from the LS resources directory after dependency installation/unpacking. The library downloads and unpacks the Kotlin language server, chmod's the script executable, and throws FileNotFoundError if the script still does not exist at the expected path. It indicates the installation produced a different layout or failed silently.
Source
Thrown at src/solidlsp/language_servers/kotlin_language_server.py:214
)
static_dir = os.path.join(self._ls_resources_dir, ls_dirname)
os.makedirs(static_dir, exist_ok=True)
# Setup Kotlin Language Server
kotlin_script = os.path.join(static_dir, *artifact.launcher_parts)
if not os.path.exists(kotlin_script):
log.info("Downloading Kotlin Language Server...")
artifact.dependency.download_to(static_dir)
if os.path.exists(kotlin_script) and not platform_id.is_windows():
os.chmod(
kotlin_script,
stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH,
)
if not os.path.exists(kotlin_script):
raise FileNotFoundError(f"Kotlin Language Server script not found at {kotlin_script}")
log.info(f"Using Kotlin Language Server script at {kotlin_script}")
return kotlin_script
def _create_launch_command(self, core_path: str) -> list[str]:
command = [core_path, "--stdio"]
# A custom ls_path is independent of Serena's managed version. Select
# arguments from the actual launcher so existing kotlin-lsp.sh/.cmd
# configurations do not inherit IntelliJ-server-only options.
platform_id = PlatformUtils.get_platform_id()
intellij_launcher_name = "intellij-server.exe" if platform_id.is_windows() else "intellij-server"
if os.path.basename(core_path).lower() == intellij_launcher_name:
command.extend(["--system-path", os.path.join(self._project_cache_dir, "kotlin-lsp-system")])
return command
def create_launch_command_env(self) -> dict[str, str]:
"""Provides JVM options for the Kotlin Language Server process."""
env: dict[str, str] = {}View on GitHub (pinned to 7fcbca7e62)
Solutions
- Delete the cached language server directory under the multilspy ls_resources_dir so it is re-downloaded fresh
- Verify network access to the Kotlin language server release URL and retry installation
- Inspect the extracted directory layout; if the script lives in a subdirectory, symlink or copy it to the expected kotlin_script path
- Manually install kotlin-language-server and adjust custom settings / path so the script exists at the expected location
Example fix
// before (stale/corrupt cache) ~/.multilspy/resources/kotlin/ # partial extraction, no languageServer.sh // after rm -rf ~/.multilspy/resources/kotlin && rerun so the installer re-downloads
Defensive patterns
Strategy: validation
Validate before calling
import os
script = os.path.expanduser("~/.multilspy/resources/kotlin/languageServer.sh")
assert os.path.isfile(script) and os.access(script, os.X_OK), f"Kotlin LS script missing at {script} — clear cache and reinstall" Prevention
- Clear the multilspy ls_resources cache for kotlin after upgrading the library
- Ensure outbound network to GitHub releases is allowed in CI
- Run a preflight check that the script exists and is executable before starting a session
- Keep OS user permissions so chmod/extract succeed in the resources dir
When it happens
Trigger: Calling SolidLSP with the Kotlin language server when the downloaded archive does not contain languageServer.sh/kotlin-language-server.sh at the expected location, the download extracted into a nested directory, a proxy/CDN returned an HTML error page saved as the archive, or a previous partial install left the directory in a bad state.
Common situations: Offline or restricted CI environments where the download fails silently, upstream Kotlin language server release renamed/reshaped its assets, corrupted cached install in the multilspy resources directory, running on an OS whose shell scripts are not executable after extraction.
Related errors
- Memory maintenance template not found at {template_path}
- AL Language Server executable not found at: {executable_path
- Download failed? Could not find clojure-lsp executable at {c
- Roslyn Language Server DLL not found after extraction
- Download failed? Could not find cue executable at {cue_execu
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/21fd6ac5d8495ba0.
Report an issue: GitHub.