mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #21656] issue: RangeError when pressing Enter in chat #19549
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 @m1g32 on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21656
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.7.2
Ollama Version (if applicable)
No response
Operating System
kubernetes 1.32
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
A proper response is generated and no error shown after sending a new message in a chat.
Actual Behavior
No actual response is shown in the chat, only an error with the model-name. This only happens rarely and seemingly random.
The application shows an "Uncaught RangeError: There is no position before the top-level node" in the console.
Steps to Reproduce
Logs & Screenshots
Console Error
index.js:884 Uncaught RangeError: There is no position before the top-level node
at Dr.before (index.js:884:19)
at keydown (RichTextInput.svelte:951:33)
at index.js:3108:26
at mg.someProp (index.js:5502:42)
at ll (index.js:3106:17)
at Lm.n.dom.addEventListener.n.input.eventHandlers. (index.js:3075:53)
issue in RichTextInput.svelte:
-> possible Fix?
Additional Information
I would really appreciate help with fixing this problem and not being closed as not reproducible. 😢
@Classic298 commented on GitHub (Feb 20, 2026):
try the latest version, you are on a 2 months old version - and sorry, i cannot reproduce with these steps to reproduce. Nor have I ever encountered this on any setup i work with
Sorry. Try the latest version first.
@Classic298 commented on GitHub (Feb 20, 2026):
RichTextInput's isInside() is just about cursor position when pressing Enter. It has nothing to do with why a response failed or how the error gets displayed.
You saw the RangeError in console and the model error toast, and assumed they were the same bug. They're not even in the same layer of the stack.
The error parsing in handleOpenAIError tries a few known shapes, FastAPI's detail, OpenAI's error.message, then plain message. And if none match it just stringifies the whole thing. So if the upstream returns an error response in an unexpected format, it'll just dump the raw object.
Any backend logs would help here because this is most certainly an upstream error.
But first try a newer version.