Skip to content

[BUG] When using this tool to do a mcp svr, the client will hang when encountering problems, and it will not continue to execute further, nor will it reach the exception. #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
daidi opened this issue Apr 2, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@daidi
Copy link

daidi commented Apr 2, 2025

my client:

try:
                    result = await self._session.call_tool("plan_recall", {"query": query})
except Exception as e:
                    logger.exception(e)

and sometime it got errors like:

ERROR    [mcp.client.sse] Error parsing server message: 1 validation error for JSONRPCMessage
  Invalid JSON: EOF while parsing a string at line 1 column 76684 [type=json_invalid, input_value='{"jsonrpc":"2.0","id":9,...', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/json_invalid

but my client did't catch the error,so the code hangs....

I guess it might be related to the svr implementation? For example, the error message returned by the sse of the mcp svr received by the fastapi svr, but it didn't disconnect it?

@daidi daidi added the bug Something isn't working label Apr 2, 2025
@shahar4499
Copy link
Contributor

Hey @daidi , can you share more about your implementation of the client?
And do you have clear reproduction steps? Does it happen consistently?
Thanks!

@shira-ayal
Copy link
Collaborator

Closing as it is quite outdated, there is a new version, and we didn't see much response on this bug.
@daidi please re-open if it happens with the new version too!

@shira-ayal shira-ayal closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants