[GH-ISSUE #23182] issue: Pasting or typing extremely large text in the chat input causes the page to crash #35441

Closed
opened 2026-04-25 09:39:09 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @ShirasawaSama on GitHub (Mar 28, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23182

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

v0.8.12

Ollama Version (if applicable)

No response

Operating System

Mac

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

The application should handle large text input gracefully without crashing. Possible approaches include:

  • Input size limit: Set a maximum character limit on the input field and display a warning when the limit is approached or exceeded.
  • File upload suggestion: When a paste exceeding a certain threshold is detected, prompt the user to upload the content as a file attachment instead of pasting it directly into the input.

Actual Behavior

The chat input attempts to process and render the entire text in real time. This triggers excessive DOM re-renders and layout recalculations (e.g., auto-resizing the textarea, syntax highlighting, character counting, etc.), overwhelming the browser's main thread and causing the page to freeze or crash.

Steps to Reproduce

  1. Copy a very large block of text (< 2938660).
  2. Paste it into the chat input box.
  3. Observe that the page becomes increasingly unresponsive.
  4. After a few seconds, the browser tab crashes entirely.

Logs & Screenshots

Before crashes:

Image

Additional Information

No response

Originally created by @ShirasawaSama on GitHub (Mar 28, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23182 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version v0.8.12 ### Ollama Version (if applicable) _No response_ ### Operating System Mac ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior The application should handle large text input gracefully without crashing. Possible approaches include: - **Input size limit:** Set a maximum character limit on the input field and display a warning when the limit is approached or exceeded. - **File upload suggestion:** When a paste exceeding a certain threshold is detected, prompt the user to upload the content as a file attachment instead of pasting it directly into the input. ### Actual Behavior The chat input attempts to process and render the entire text in real time. This triggers excessive DOM re-renders and layout recalculations (e.g., auto-resizing the textarea, syntax highlighting, character counting, etc.), overwhelming the browser's main thread and causing the page to freeze or crash. ### Steps to Reproduce 1. Copy a very large block of text (< 2938660). 2. Paste it into the chat input box. 3. Observe that the page becomes increasingly unresponsive. 4. After a few seconds, the browser tab crashes entirely. ### Logs & Screenshots Before crashes: <img width="1492" height="600" alt="Image" src="https://github.com/user-attachments/assets/1b465af8-801c-4a8f-8914-0e3cd4071877" /> ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 09:39:09 -05:00
Author
Owner

@Classic298 commented on GitHub (Mar 28, 2026):

test file?

<!-- gh-comment-id:4148432777 --> @Classic298 commented on GitHub (Mar 28, 2026): test file?
Author
Owner

@ShirasawaSama commented on GitHub (Mar 28, 2026):

@Classic298 You can run this code in browser dev tools:

copy(Array.from({length:10*1024*1024},()=>String.fromCharCode(Math.random()*95+32|0)).join(''))
<!-- gh-comment-id:4148441274 --> @ShirasawaSama commented on GitHub (Mar 28, 2026): @Classic298 You can run this code in browser dev tools: ```js copy(Array.from({length:10*1024*1024},()=>String.fromCharCode(Math.random()*95+32|0)).join('')) ```
Author
Owner

@WiiGe commented on GitHub (Apr 1, 2026):

same, paste huge markdown cause crash too

<!-- gh-comment-id:4173208841 --> @WiiGe commented on GitHub (Apr 1, 2026): same, paste huge markdown cause crash too
Author
Owner

@Classic298 commented on GitHub (Apr 14, 2026):

https://github.com/open-webui/open-webui/issues/12087

<!-- gh-comment-id:4244406258 --> @Classic298 commented on GitHub (Apr 14, 2026): https://github.com/open-webui/open-webui/issues/12087
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35441