I'm getting a bunch of this on 1.21 ``` wsproto_...
# proj-agent-canvas
w
I'm getting a bunch of this on 1.21
Copy code
wsproto_impl.py:366
23:53:50 [agent-server] WARNING  Error closing agent: 'LocalConversation' object has no attribute 'agent'  local_conversation.py:2795
23:53:51 [agent-server] INFO     12.176.89.3:0 - "WebSocket /sockets/events/651db7ce-fc76-425e-a3cb-5dd1a427334c?resend_mode=all" [accepted]  wsproto_impl.py:385
23:53:51 [agent-server] INFO     WebSocket authenticated via first-message auth  sockets.py:223
23:53:51 [agent-server] INFO     Event Websocket Connected: 651db7ce-fc76-425e-a3cb-5dd1a427334c  sockets.py:283
23:53:51 [agent-server] ERROR    Exception in ASGI application
  wsproto_impl.py:366
23:53:51 [agent-server] WARNING  Error closing agent: 'LocalConversation' object has no attribute 'agent'  local_conversation.py:2795
seems like maybe 1.20 conversations are incompatible?
yeah pre-upgrade conversations all seem to trigger a 500 error when loaded
same in 1.22
l
@fresh-machine-37269 find the regression and open an issue. Also examine the testing gap that could have caused this to occur. Conversations from previous versions should remain compatible. Open an issue for this testing gap too.
👀 1
f
⏳ Still working — this is taking longer than this run allows. Follow along at the link above; mention me again for an update.
m
Yes, I saw an issue yesterday about that: github.com/OpenHands/OpenHands/issues/17615 I started to look for a solution. Let you know.
we were saving MCP tools to disk in a format that depended on which version of the mcp library happened to be installed. The mcp library changed how it names fields internally between v1 and v2 (inputSchema → input_schema). The JSON it sends over the wire stayed the same, but when we saved a conversation we wrote the internal names instead of the wire ones. briegly • the sdk used mcp v2 and saved conversations with the new names • 1.49.2 pinned fastmcp below 4 to fix browser tools, which pulled mcp back to v1 (We pinned fastmcp<4 (github.com/OpenHands/software-agent-sdk/pull/5153|#…) because <pypi.org/project/fastmcp-slim/4.0.0/|fastmcp 4 requires mcp 2>, and our github.com/OpenHands/software-agent-sdk/blob/…/pyproject.toml#L13|openai=2.33 pin> leaves <pypi.org/project/browser-use/0.11.13/|browser-use 0.11.13> as the only usable version, which crashes under mcp 2 and silently removes the browser tools (github.com/OpenHands/software-agent-sdk/issues/5152|#…).) • mcp v1 doesn't recognise the new names, so any conversation with an MCP server attached (GitHub, filesystem…) failed to load, and Canvas just looped on "Unable to connect to server" I opened a PR with a fix: • We now always save in the standard format that every mcp version understands • We accept the old format when loading, so affected conversations open again with nothing to repair • The real error now shows up in the logs instead of the misleading one PR with the fix: github.com/OpenHands/software-agent-sdk/pull/5258 PS: This is a dependency conflicts between multiple package. The real problem is that
browser-use
pin
openai==2.26.0
. I wanted to open an issue for that but they have already answered this question and for the moment they are not unpinning because of supply chains attacks
PS2: we should probably do another release of the sdk
c
Thank you, you’re so fast! ❤️
I remember this pinning stuff conflict, ugh. I wonder if we could consider to do browsing with other tools - there are these days others based on playwright too
m
merged... should go out with the next agent-canvas release (probably today)
thanks on a stick 2