Skip to content

Bug: kotlin.Nothing does not have instances #104

@fmunteanu

Description

@fmunteanu

Description

When sending a standard LSP shutdown request to the Kotlin language server, it responds with an error instead of acknowledging the shutdown gracefully.

Error Details

  • Error message: 'kotlin.Nothing' does not have instances
  • Error code: -32803
  • When it occurs: During the LSP shutdown sequence when sending shutdown request

Expected Behavior

According to the LSP specification, the server should respond successfully to the shutdown request and then wait for the exit notification.

Actual Behavior

The server throws an error response, which causes LSP clients to fail the shutdown sequence unless they explicitly catch and ignore this error.

Impact

  • LSP clients must implement workarounds (try/catch) to handle this error
  • Prevents graceful shutdown of the language server
  • Non-compliant with LSP specification

Environment

  • OS: macOS
  • Installation: brew install jetbrains/utils/kotlin-lsp
  • Kotlin LSP version: stable 0.253.10629
  • Project type: Gradle/Ktor project (https://github.com/ktorio/ktor)
  • Java version: openjdk version "25" 2025-09-16

Workaround

Currently, LSP clients must wrap the shutdown request in a try/catch block and continue with forceful termination (SIGKILL) even when the error occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions