{"record":{"id":"9fb3905f6fcef7d9","repo":"oraios/serena","slug":"unsupported-platform-for-kotlin-lsp-version-pl","errorCode":null,"errorMessage":"Unsupported platform for Kotlin LSP {version}: {platform_id.value}","messagePattern":"Unsupported platform for Kotlin LSP (.+?): (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/kotlin_language_server.py","lineNumber":141,"sourceCode":"        def _create_artifact(cls, version: str, platform_id: PlatformId) -> KotlinLSPArtifact:\n            \"\"\"Build download and launcher metadata for one Kotlin LSP release.\n\n            JetBrains has three publishing layouts: legacy ZIPs before 262.4739.0,\n            modern platform archives under ``/kotlin-lsp`` through 262.7569.0,\n            and modern archives under ``/language-server/kotlin-server`` from\n            262.8190.0 onward. Serena verifies the frozen initial and current default\n            releases; arbitrary user-selected versions are unverified by design.\n            \"\"\"\n            try:\n                version_parts = tuple(int(part) for part in version.split(\".\"))\n            except ValueError as exc:\n                raise ValueError(f\"Kotlin LSP version must contain only dot-separated integers: {version!r}\") from exc\n\n            verified = version in {INITIAL_KOTLIN_LSP_VERSION, DEFAULT_KOTLIN_LSP_VERSION}\n            if version_parts >= KOTLIN_SERVER_PACKAGING_MIN_VERSION:\n                artifact_config = KOTLIN_SERVER_ARTIFACT_BY_PLATFORM.get(platform_id.value)\n                if artifact_config is None:\n                    raise ValueError(f\"Unsupported platform for Kotlin LSP {version}: {platform_id.value}\")\n\n                asset_suffix, archive_type, launcher_parts = artifact_config\n                asset_name = f\"kotlin-server-{version}{asset_suffix}\"\n                cdn_path = \"language-server/kotlin-server\" if version_parts >= KOTLIN_SERVER_CDN_PATH_MIN_VERSION else \"kotlin-lsp\"\n                return KotlinLSPArtifact(\n                    dependency=DownloadedDependency(\n                        url=f\"https://download-cdn.jetbrains.com/{cdn_path}/{version}/{asset_name}\",\n                        archive_type=archive_type,\n                        allowed_hosts=KOTLIN_LSP_ALLOWED_HOSTS,\n                        verified=verified,\n                    ),\n                    launcher_parts=tuple(part.format(version=version) for part in launcher_parts),\n                )\n\n            kotlin_suffix = LEGACY_PLATFORM_KOTLIN_SUFFIX.get(platform_id.value)\n            if kotlin_suffix is None:\n                raise ValueError(f\"Unsupported platform for Kotlin LSP {version}: {platform_id.value}\")\n","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/kotlin_language_server.py#L123-L159","documentation":"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.","triggerScenarios":"`_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.","commonSituations":"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.","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"],"exampleFix":"// before: modern version on unsupported platform\n_create_artifact(\"241.18034.62\", platform_id=PlatformId.FREEBSD)\n// after: legacy layout version that skips the per-platform map\n_create_artifact(\"223.8617.171\", platform_id=PlatformId.FREEBSD)\n","handlingStrategy":"validation","validationCode":"from solidlsp.language_servers.kotlin_language_server import KOTLIN_SERVER_ARTIFACT_BY_PLATFORM\nif platform_id.value not in KOTLIN_SERVER_ARTIFACT_BY_PLATFORM:\n    raise SystemExit(f\"Kotlin LSP (modern versions) not supported on {platform_id.value}; run on linux/windows/macos x86_64 or aarch64\")","typeGuard":"def supports_modern_kotlin_lsp(platform_id) -> bool:\n    return platform_id.value in KOTLIN_SERVER_ARTIFACT_BY_PLATFORM","tryCatchPattern":"try:\n    setup_kotlin_lsp(version, platform_id)\nexcept ValueError as e:\n    if \"Unsupported platform\" in str(e):\n        fallback_to = pick_legacy_compatible_version(platform_id)  # version < KOTLIN_SERVER_PACKAGING_MIN_VERSION\n        setup_kotlin_lsp(fallback_to, platform_id)\n    else:\n        raise","preventionTips":["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"],"tags":["kotlin","platform","version","unsupported"],"backgroundTag":"unsupported-platform","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}