NullPointerException in McpClientSession
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start at mcp-core/src/main/java/io/modelcontextprotocol/spec/McpClientSession.java line 280 and review the sendRequest flow around the reported FluxHandle NPE. Use the failure described in enola-dev/enola#1862 and the 0.14.1 environment as context; done means the failure no longer produces an uninformative NPE and instead reports a clear error.
Written by the indexing model from the issue text.
Description
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 https://github.com/enola-dev/enola/issues/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
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 1.1k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelcontextprotocol/java-sdk
-
area/transport bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
modelcontextprotocol/java-sdk#1136 ·
-
area/client bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
modelcontextprotocol/java-sdk#1124 · 1 comment ·
-
ServerCapabilities.logging is added unconditionally, overriding the caller's explicit capabilities Openbug P2 ready for work
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/java-sdk#1086 · 1 comment ·
-
enhancement good first issue P3
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
modelcontextprotocol/java-sdk#1067 ·
-
bug P2 ready for work
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
modelcontextprotocol/java-sdk#898 · 1 comment ·
All issues in modelcontextprotocol/java-sdk
Similar issues
-
bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
emitter:client:csharp feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100