Skip to content

Request deserilization is broken / throwing exception in version 0.6.0 #189

@lopesc

Description

@lopesc

Describe the bug
The following was working in version 0.5.0. Seems like a kotlinx serlialization library version conflict

I send a POST request to the server with body:

{
        "jsonrpc": "2.0",
        "method": "tools/list",
        "id": 1
}

The server throws the following exception when it reaches Protocol.onRequest() here.

java.lang.AbstractMethodError: 'kotlinx.serialization.KSerializer[] kotlinx.serialization.internal.GeneratedSerializer.typeParametersSerializers()'
	at io.modelcontextprotocol.kotlin.sdk.ListToolsRequest$$serializer.typeParametersSerializers(types.kt:1154)
	at kotlinx.serialization.internal.PluginGeneratedSerialDescriptor$typeParameterDescriptors$2.invoke(PluginGeneratedSerialDescriptor.kt:40)
	at kotlinx.serialization.internal.PluginGeneratedSerialDescriptor$typeParameterDescriptors$2.invoke(PluginGeneratedSerialDescriptor.kt:39)
	at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:125)
	at kotlinx.serialization.internal.PluginGeneratedSerialDescriptor.getTypeParameterDescriptors$kotlinx_serialization_core(PluginGeneratedSerialDescriptor.kt:39)
	at kotlinx.serialization.internal.PluginGeneratedSerialDescriptor$_hashCode$2.invoke(PluginGeneratedSerialDescriptor.kt:44)
	at kotlinx.serialization.internal.PluginGeneratedSerialDescripto

Confirmation of request body being handled by the Protocol:
Image

Point at which the exception is being thrown:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions