mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[GH-ISSUE #21601] issue: WebSocket collaborative editing race: AttributeError on user.get after disconnect #58197
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 @JIW-roosi on GitHub (Feb 19, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21601
Check Existing Issues
Installation Method
Other
Open WebUI Version
0.7.2 (relevant code unchanged in 0.8.3)
Ollama Version (if applicable)
No response
Operating System
Ubuntu (kubernetes)
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When a user disconnects from a collaborative note, pending debounced saves should either complete gracefully or be canceled. No AttributeError should be triggered.
Actual Behavior
After a user disconnects, a debounced save task runs, attempts to access the removed session from SESSION_POOL, receives None, and crashes when document_save_handler calls user.get('role'). This results in repeated Task exception errors (50+ in series) in the logs and slowing of the system and "page not responding" errors for users.
Steps to Reproduce
Logs & Screenshots
2026-02-19 12:19:56.165 | ERROR | open_webui.tasks:cleanup_task:87 - Task exception was never retrieved
future: <Task finished name='Task-254075' coro=<yjs_document_update..debounced_save() done, defined at /app/backend/open_webui/socket/main.py:622> exception=AttributeError("'NoneType' object has no attribute 'get'")>
Traceback (most recent call last):
File "/app/backend/open_webui/socket/main.py", line 538, in document_save_handler
user.get("role") != "admin"
└ None
AttributeError: 'NoneType' object has no attribute 'get'
2026-02-19 12:19:56.222 | ERROR | open_webui.tasks:cleanup_task:87 - Task exception was never retrieved
future: <Task finished name='Task-254080' coro=<yjs_document_update..debounced_save() done, defined at /app/backend/open_webui/socket/main.py:622> exception=AttributeError("'NoneType' object has no attribute 'get'")>
Traceback (most recent call last):
File "/app/backend/open_webui/socket/main.py", line 538, in document_save_handler
user.get("role") != "admin"
└ None
AttributeError: 'NoneType' object has no attribute 'get'
2026-02-19 12:19:56.264 | ERROR | open_webui.tasks:cleanup_task:87 - Task exception was never retrieved
future: <Task finished name='Task-254084' coro=<yjs_document_update..debounced_save() done, defined at /app/backend/open_webui/socket/main.py:622> exception=AttributeError("'NoneType' object has no attribute 'get'")>
Traceback (most recent call last):
File "/app/backend/open_webui/socket/main.py", line 538, in document_save_handler
user.get("role") != "admin"
└ None
AttributeError: 'NoneType' object has no attribute 'get'
2026-02-19 12:19:56.284 | ERROR | open_webui.tasks:cleanup_task:87 - Task exception was never retrieved
future: <Task finished name='Task-254087' coro=<yjs_document_update..debounced_save() done, defined at /app/backend/open_webui/socket/main.py:622> exception=AttributeError("'NoneType' object has no attribute 'get'")>
Traceback (most recent call last):
File "/app/backend/open_webui/socket/main.py", line 538, in document_save_handler
user.get("role") != "admin"
└ None
AttributeError: 'NoneType' object has no attribute 'get'
2026-02-19 12:19:56.365 | ERROR | open_webui.tasks:cleanup_task:87 - Task exception was never retrieved
future: <Task finished name='Task-254092' coro=<yjs_document_update..debounced_save() done, defined at /app/backend/open_webui/socket/main.py:622> exception=AttributeError("'NoneType' object has no attribute 'get'")>
Traceback (most recent call last):
File "/app/backend/open_webui/socket/main.py", line 538, in document_save_handler
user.get("role") != "admin"
└ None
AttributeError: 'NoneType' object has no attribute 'get'
Additional Information
No response
@sourav1243 commented on GitHub (Feb 19, 2026):
I'd like to work on fixing this bug in open-webui/open-webui.
I've encountered similar issues before and have experience debugging and fixing these types of problems. I can investigate the root cause and implement a proper fix.
Could you please assign this issue to me?
@tjbck commented on GitHub (Feb 19, 2026):
Should be addressed in dev.