oraios/serena · error · ValueError
Unsupported platform for Kotlin LSP {version}: {platform_id.
Error message
Unsupported platform for Kotlin LSP {version}: {platform_id.value} What it means
Raised by `_create_artifact` for Kotlin LSP versions at or above KOTLIN_SERVER_PACKAGING_MIN_VERSION when the current platform id has no entry in KOTLIN_SERVER_ARTIFACT_BY_PLATFORM. Newer Kotlin server releases ship per-platform artifacts, so Serena can only build a download for platforms in its verified matrix; anything else is rejected rather than guessing a URL.
Source
Thrown at src/solidlsp/language_servers/kotlin_language_server.py:141
def _create_artifact(cls, version: str, platform_id: PlatformId) -> KotlinLSPArtifact:
"""Build download and launcher metadata for one Kotlin LSP release.
JetBrains has three publishing layouts: legacy ZIPs before 262.4739.0,
modern platform archives under ``/kotlin-lsp`` through 262.7569.0,
and modern archives under ``/language-server/kotlin-server`` from
262.8190.0 onward. Serena verifies the frozen initial and current default
releases; arbitrary user-selected versions are unverified by design.
"""
try:
version_parts = tuple(int(part) for part in version.split("."))
except ValueError as exc:
raise ValueError(f"Kotlin LSP version must contain only dot-separated integers: {version!r}") from exc
verified = version in {INITIAL_KOTLIN_LSP_VERSION, DEFAULT_KOTLIN_LSP_VERSION}
if version_parts >= KOTLIN_SERVER_PACKAGING_MIN_VERSION:
artifact_config = KOTLIN_SERVER_ARTIFACT_BY_PLATFORM.get(platform_id.value)
if artifact_config is None:
raise ValueError(f"Unsupported platform for Kotlin LSP {version}: {platform_id.value}")
asset_suffix, archive_type, launcher_parts = artifact_config
asset_name = f"kotlin-server-{version}{asset_suffix}"
cdn_path = "language-server/kotlin-server" if version_parts >= KOTLIN_SERVER_CDN_PATH_MIN_VERSION else "kotlin-lsp"
return KotlinLSPArtifact(
dependency=DownloadedDependency(
url=f"https://download-cdn.jetbrains.com/{cdn_path}/{version}/{asset_name}",
archive_type=archive_type,
allowed_hosts=KOTLIN_LSP_ALLOWED_HOSTS,
verified=verified,
),
launcher_parts=tuple(part.format(version=version) for part in launcher_parts),
)
kotlin_suffix = LEGACY_PLATFORM_KOTLIN_SUFFIX.get(platform_id.value)
if kotlin_suffix is None:
raise ValueError(f"Unsupported platform for Kotlin LSP {version}: {platform_id.value}")
View on GitHub (pinned to 7fcbca7e62)
Solutions
- Run on a supported platform covered by KOTLIN_SERVER_ARTIFACT_BY_PLATFORM (typical linux/windows/macos x86_64 or aarch64)
- Pin an older Kotlin LSP version below KOTLIN_SERVER_PACKAGING_MIN_VERSION that has no per-platform split, if compatible
- Check KOTLIN_SERVER_ARTIFACT_BY_PLATFORM in kotlin_language_server.py for supported platform keys and how your OS is detected
- Upgrade Serena in case a platform mapping was added in a newer release
Example fix
// before: modern version on unsupported platform
_create_artifact("241.18034.62", platform_id=PlatformId.FREEBSD)
// after: legacy layout version that skips the per-platform map
_create_artifact("223.8617.171", platform_id=PlatformId.FREEBSD)
Defensive patterns
Strategy: validation
Validate before calling
from solidlsp.language_servers.kotlin_language_server import KOTLIN_SERVER_ARTIFACT_BY_PLATFORM
if platform_id.value not in KOTLIN_SERVER_ARTIFACT_BY_PLATFORM:
raise SystemExit(f"Kotlin LSP (modern versions) not supported on {platform_id.value}; run on linux/windows/macos x86_64 or aarch64") Type guard
def supports_modern_kotlin_lsp(platform_id) -> bool:
return platform_id.value in KOTLIN_SERVER_ARTIFACT_BY_PLATFORM Try / catch
try:
setup_kotlin_lsp(version, platform_id)
except ValueError as e:
if "Unsupported platform" in str(e):
fallback_to = pick_legacy_compatible_version(platform_id) # version < KOTLIN_SERVER_PACKAGING_MIN_VERSION
setup_kotlin_lsp(fallback_to, platform_id)
else:
raise Prevention
- Check the platform matrix in kotlin_language_server.py before deploying to non-standard OS/arch
- Pin versions intentionally: modern packaging only for platforms in KOTLIN_SERVER_ARTIFACT_BY_PLATFORM
- Keep Serena updated so newly supported platforms appear in the artifact map
- Verify platform detection (PlatformId) on your host resolves to a known value
When it happens
Trigger: `_create_artifact(version, platform_id)` with `version_parts >= KOTLIN_SERVER_PACKAGING_MIN_VERSION` and `KOTLIN_SERVER_ARTIFACT_BY_PLATFORM.get(platform_id.value)` returning None — i.e. an unsupported/unknown PlatformId (unusual OS or architecture) combined with a modern Kotlin LSP version.
Common situations: Running on an OS/arch outside JetBrains's release matrix (e.g. 32-bit, FreeBSD, unusual Linux musl identification); an updated Serena platform enum value missing from the artifact map; misconfigured platform override.
Related errors
- Kotlin LSP version must contain only dot-separated integers:
- This operation requires Serena JetBrains plugin version {'.'
- Unsupported platform: {system}
- Java {BSL_LS_MIN_JAVA_VERSION}+ is required for BSL Language
- Detected a Clojure executable, but it does not support '-Aal
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/9fb3905f6fcef7d9.
Report an issue: GitHub.