Skip to content

NullPointerException in McpClientSession #605

@vorburger

Description

@vorburger

Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create.
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:

Bug description

In enola-dev/enola#1862, I've run into:

java.lang.NullPointerException: data
	at java.base/java.util.Objects.requireNonNull(Objects.java:259)
	at reactor.core.publisher.FluxHandle$HandleSubscriber.next(FluxHandle.java:251)
	at io.modelcontextprotocol.spec.McpClientSession.lambda$sendRequest$12(McpClientSession.java:280)
	at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:113)
	at reactor.core.publisher.SerializedSubscriber.onNext(SerializedSubscriber.java:99)
	at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.onNext(FluxTimeout.java:181)
	at reactor.core.publisher.MonoCreate$DefaultMonoSink.success(MonoCreate.java:176)

I guess that this means that this is null?

Environment

0.14.1

Steps to reproduce

Unfortunately I'm unable to reproduce it locally even myself, but I am consistently seeing this on a failing CI build.

Expected behavior

Clear error message instead of NPE.

Minimal Complete Reproducible example

N/A

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