mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-17 08:21:12 -05:00
[GH-ISSUE #10888] Chat hangs due to unhandled chat-events event #103061
Reference in New Issue
Block a user
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 @krystiancha on GitHub (Feb 27, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/10888
Bug Report
Installation Method
Git clone from main, docker build, docker run.
Environment
Open WebUI Version: main
Ollama (if applicable): N/A
Operating System: Linux
Browser (if applicable): Firefox 135.0, Chromium 132.0.6834.83
Confirmation:
Expected Behavior:
Chat does not freeze when using "direct" API connection.
Actual Behavior:
Chat freezes on first prompt after login when using "direct" API connection. Refreshing the page gets rid of this issue.
Description
The
chat-eventssocket.io event handler is not assigned on login. See this line.The mentioned line is not run on login because
layout'sonMountmethod is ran before the user logs in.When this method is run
localStorage.tokenis still undefined and so this condition is not satisfied, so$socket?.on('chat-events', chatEventHandler)is never executed.When the user refreshes the page while being logged in,
localStorage.tokenis truthy so the condition is satisfied,$socket?.on('chat-events', chatEventHandler)is executed and the chat no longer hangs.Reproduction Details
Steps to Reproduce:
Logs and Screenshots
@tjbck commented on GitHub (Mar 4, 2025):
Status: Open.
#10997