mirror of
https://github.com/open-webui/open-terminal.git
synced 2026-11-05 01:27:28 +00:00
[GH-ISSUE #169] [connection closed] on terminal in open webui after update to latest #100
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/open-terminal#100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @riegera2412 on GitHub (Sep 7, 2026).
Original GitHub issue: https://github.com/open-webui/open-terminal/issues/169
Hey,
as the title says, after updating from v0.12.3 to v0.12.4 (latest) just yesterday I get [connection closed] in the terminal window inside open webui. Going back to v0.12.3 fixed the issue for now.
Not sure what the error exactly is caused by. The docker logs of both containers look fine and the llm's I use can still work in opern-terminal. I have seen the older issues regarding this. Since those were fixed, I assume this might be a new issue.
I am not sure what info you need from me to fix this, so I leave this issue as is for now.
@nderevj commented on GitHub (Sep 7, 2026):
I'm seeing the same issue. As @riegera2412 mentioned, rolling back to v0.12.3 fixed it.
@kev-cs commented on GitHub (Sep 7, 2026):
Hi, I'm a recently new user of open-webui. I was confused thinking something was wrong on my end but using v0.12.3 fixes it. Thank you @riegera2412 !
I can also confirm my llm still can use open-terminal. I'm using docker compose for all of my setup and strangely I'm not seeing any error logs (only success logs) about this anywhere including open-webui, open-terminal and even in my browser's devtools on the webapp.
@definity commented on GitHub (Sep 8, 2026):
Warning ---> Claude figured this out with some prompting on my side <---- maybe obvious but I was curious to find out why reverting to v0.12.3 resolved the issue.
The WS auth token succeeds, then the server immediately closes with code 4004 "Session not found".
That comes from the new ownership check added here:
github.com/open-webui/open-terminal@f0edc9ecc5 (diff-main.py)(ws_terminalinopen_terminal/main.py):Open WebUI sends
X-User-Idon every REST call (POST /api/terminals,/files/*, etc.) but on the websocket upgrade it only putsuser_idin the URL query string — noX-User-Idheader. This check only reads the header, with no query-param fallback (unlike thechat_idcheck right next to it, which does fall back to the payload). So the header comparison is always"" != "<real-user-id>"and the socket gets closed every time.Matches the changelog's own note that this 0.12.4 feature "Requires Open WebUI 0.11.4" — which hasn't been published yet (latest is 0.11.3). Workaround: pin back to
ghcr.io/open-webui/open-terminal:0.12.3until 0.11.4 ships.Packet capture (tcpdump on the open-terminal host, decoded with tshark), same session, in order:
Step 2 seems to make it clear: compare its header list against step 1's —
X-User-Idnever made it onto the websocket handshake. That's exactly the inputws.headers.get("x-user-id", "")in the commit above sees, so it evaluates to"" != "68d001ba-...", and step 4 is thatawait ws.close(code=4004, reason="Session not found")line firing.@definity commented on GitHub (Sep 8, 2026):
Follow-up: re-ran the same capture against 0.12.3 to show how the response is different.
It's the new ownership check in
f0edc9ecomparingws.headers.get("x-user-id", "")(always empty, since this header was never sent on the WS handshake to begin with) againstsession["user_id"]. 0.12.3 didn't have that check.@akehir commented on GitHub (Sep 16, 2026):
I can confirm; I observed the same issue on main; reverting f0edc9e fixes the issue.
@dMwJr commented on GitHub (Oct 14, 2026):
this is still an issue
@definity commented on GitHub (Oct 15, 2026):
It's not an issue for me on the latest version of open webui v0.11.4 and v0.12.x
@closesim commented on GitHub (Oct 15, 2026):
With Open WebUI v0.12.2 and Open Terminal v0.14.0, this is no longer an issue, as it was quickly fixed in a later release.
@dMwJr commented on GitHub (Oct 16, 2026):
That's not the latest versions of either of those apps
Not for me, I'm experiencing this exact issue, latest openwebui, latest open-terminals, and latest terminals. What logs could I look into here to provide more diagnostic information?
@Classic298 commented on GitHub (Oct 16, 2026):
Fixed. Open WebUI 0.11.4 and newer work with Open Terminal 0.12.4 and newer. The reports from early September were on Open WebUI 0.11.3.
I tested all setups and it works on these versions just fine. If you still hit it open a new issue, happy to triage, but this has been fixed for a while now