issue: Uncaught (in promise) TypeErrors causes UI to freeze in multi-model chat when navigating message history #6761

Open
opened 2025-11-11 17:05:17 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @silentoplayz on GitHub (Oct 24, 2025).

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.34

Ollama Version (if applicable)

v0.12.6

Operating System

Ubuntu 24.04.3 LTS

Browser (if applicable)

Mozilla Firefox Snap for Ubuntu - v144.0 (64-bit)

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

When navigating back to a previous message that I've sent in the chat history, the UI should remain stable and display the historical message content, even if the set of selected models has been changed. The application should not crash or throw any JavaScript errors.

Actual Behavior

Rather than being displayed the responses that the model(s) provided to my message, I am shown only my message in the chat and not the model's responses. The application gets caught in an exception that isn't being handled properly and the UI becomes unresponsive, forcing me to adjust the URL, followed by a page refresh to workaround the issue. The browser console shows an Uncaught (in promise) TypeError: can't access property "messageIds", e[21][e[23]] is undefined error originating from the MultiResponseMessages.svelte component.

Steps to Reproduce

Prerequisite: Ensure Display Multi-model Responses in Tabs is toggled on in the user's Interface settings. This is a vital setting that needs to be on for this bug to be reproducible at all.

  1. Start a new chat.

  2. Select 3 different models in the model selector at the top of the chat page.
    Image

  3. Send a query to all 3 models (e.g., "Tell me a fun fact about the Roman empire").
    Image

  4. Wait for all models to finish generating a response.

  5. Click the "Edit" pencil icon for the message you just sent and re-send the same message.
    Image

  6. Once the models have finished generating again, remove ONE of the models selected from the model selector. I removed the bottom one here.
    Image

  7. Click the back arrow (<) on your message to navigate back to the initial set of responses sent to all 3 models.
    Image

  8. Observe that the page freezes and a TypeError is thrown in the browser console.
    Image

Logs & Screenshots

Browser Console Error:

Uncaught (in promise) TypeError: can't access property "messageIds", e[21][e[23]] is undefined
    Kt MultiResponseMessages.svelte:295
    uu MultiResponseMessages.svelte:293
    kn MultiResponseMessages.svelte:246
    p MultiResponseMessages.svelte:240
    Zt scheduler.js:119
    vt scheduler.js:79
    promise callback*wt scheduler.js:20
    se Component.js:81
    ctx Component.js:139
    onTransaction RichTextInput.svelte:775
    emit index.js:164
    emit index.js:164
    dispatchTransaction index.js:4693
    dispatch index.js:5724
    get commands/</< index.js:62
    yt RichTextInput.svelte:423
    re MessageInput.svelte:301
    yt Chat.svelte:186
    update Chat.svelte:155
    dn Component.js:144
    dg Chat.svelte:525
    h Immutable
    dn Component.js:148
    I +page.svelte:7
    Ie dom.js:1228
    nt root.svelte:57
    st root.svelte:51
    _e utils.js:165
    F5 +layout.svelte:412
    p +layout.svelte:349
    p +layout.svelte:418
    p +layout.svelte:341
    Zt scheduler.js:119
    vt scheduler.js:79
    promise callback*wt scheduler.js:20
    se Component.js:81
    ctx Component.js:139
    G5 +layout.svelte:311
    at utils.js:41
    ne Component.js:47
    vt scheduler.js:99
    promise callback*wt scheduler.js:20
    se Component.js:81
    ctx Component.js:139
    Pi +layout.svelte:685
    at utils.js:41
    ne Component.js:47
    vt scheduler.js:99
    dn Component.js:164
    wt root.svelte:23
    ht client.js:483
    W client.js:1599
    Xn client.js:330
    async* 9d4310f7-f2c8-49e3-8016-a8d996fda51c:135
    promise callback* 9d4310f7-f2c8-49e3-8016-a8d996fda51c:134
MultiResponseMessages.svelte:295:8
    vt scheduler.js:86
    (Async: promise callback)
    wt scheduler.js:20
    se Component.js:81
    ctx Component.js:139
    onTransaction RichTextInput.svelte:775
    emit index.js:164
    forEach self-hosted:157
    emit index.js:164
    dispatchTransaction index.js:4693
    dispatch index.js:5724
    get commands/</< index.js:62
    yt RichTextInput.svelte:423
    re MessageInput.svelte:301
    yt Chat.svelte:186
    InterpretGeneratorResume self-hosted:1332
    AsyncFunctionNext self-hosted:800
    (Async: async)
    update Chat.svelte:155
    dn Component.js:144
    dg Chat.svelte:525
    h Immutable
    dn Component.js:148
    I +page.svelte:7
    Ie dom.js:1228
    nt root.svelte:57
    st root.svelte:51
    _e utils.js:165
    F5 +layout.svelte:412
    p +layout.svelte:349
    p +layout.svelte:418
    p +layout.svelte:341
    Zt scheduler.js:119
    vt scheduler.js:79
    (Async: promise callback)
    wt scheduler.js:20
    se Component.js:81
    ctx Component.js:139
    G5 +layout.svelte:311
    InterpretGeneratorResume self-hosted:1332
    AsyncFunctionNext self-hosted:800
    (Async: async)
    at utils.js:41
    map self-hosted:175
    ne Component.js:47
    vt scheduler.js:99
    (Async: promise callback)
    wt scheduler.js:20
    se Component.js:81
    ctx Component.js:139
    Pi +layout.svelte:685
    InterpretGeneratorResume self-hosted:1332
    AsyncFunctionNext self-hosted:800
    (Async: async)
    at utils.js:41
    map self-hosted:175
    ne Component.js:47
    vt scheduler.js:99
    dn Component.js:164
    wt root.svelte:23
    ht client.js:483
    W client.js:1599
    InterpretGeneratorResume self-hosted:1332
    AsyncFunctionNext self-hosted:800
    (Async: async)
    Xn client.js:330
    InterpretGeneratorResume self-hosted:1332
    AsyncFunctionNext self-hosted:800
    (Async: async)
    <anonymous> 9d4310f7-f2c8-49e3-8016-a8d996fda51c:135
    (Async: promise callback)
    <anonymous> 9d4310f7-f2c8-49e3-8016-a8d996fda51c:134

Screen recording of how to reproduce this issue:
https://github.com/user-attachments/assets/ac5f97fd-7b82-4e33-b2f9-7f89c1374a96

Agentic AI Analysis

The root cause of this bug is a state management issue in the MultiResponseMessages.svelte component.

When a user sends a message to multiple models, the parentMessage.models array (a snapshot of the selected models at that time) is used to group the responses. The component's initHandler function iterates over this historical array and uses the model's index (modelIdx) to build the groupedMessageIds and groupedMessageIdsIdx objects.

The crash occurs when a user navigates back in the chat history after changing the currently selected models. The initHandler re-runs using the old list of models from the parent message, but the part of the component that renders the response tabs uses the new, currently selected models.

This creates a state mismatch. When a model has been removed, the rendering logic attempts to access an index in the groupedMessageIds object that was never populated (because the model isn't in the new list), leading to an attempt to access a property on undefined.

File: src/lib/components/chat/Messages/MultiResponseMessages.svelte

Originally created by @silentoplayz on GitHub (Oct 24, 2025). ### 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 am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.34 ### Ollama Version (if applicable) v0.12.6 ### Operating System Ubuntu 24.04.3 LTS ### Browser (if applicable) Mozilla Firefox Snap for Ubuntu - v144.0 (64-bit) ### 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 When navigating back to a previous message that I've sent in the chat history, the UI should remain stable and display the historical message content, even if the set of selected models has been changed. The application should not crash or throw any JavaScript errors. ### Actual Behavior Rather than being displayed the responses that the model(s) provided to my message, I am shown only my message in the chat and not the model's responses. The application gets caught in an exception that isn't being handled properly and the UI becomes unresponsive, forcing me to adjust the URL, followed by a page refresh to workaround the issue. The browser console shows an `Uncaught (in promise) TypeError: can't access property "messageIds", e[21][e[23]] is undefined` error originating from the `MultiResponseMessages.svelte` component. ### Steps to Reproduce **Prerequisite:** Ensure `Display Multi-model Responses in Tabs` is toggled on in the user's `Interface` settings. This is a vital setting that needs to be on for this bug to be reproducible at all. 1. Start a new chat. 2. Select 3 different models in the model selector at the top of the chat page. <img width="313" height="104" alt="Image" src="https://github.com/user-attachments/assets/940d4e03-2afd-42b2-965a-e0fdcfccc6b9" /> 3. Send a query to all 3 models (e.g., "Tell me a fun fact about the Roman empire"). <img width="2294" height="641" alt="Image" src="https://github.com/user-attachments/assets/70493a40-d4fb-49c1-b960-b689d8bcf576" /> 4. Wait for all models to finish generating a response. 5. Click the "Edit" pencil icon for the message you just sent and re-send the same message. <img width="2298" height="719" alt="Image" src="https://github.com/user-attachments/assets/6ea88342-593b-4483-a9bb-e41f3329866c" /> 6. Once the models have finished generating again, remove ONE of the models selected from the model selector. I removed the bottom one here. <img width="2298" height="719" alt="Image" src="https://github.com/user-attachments/assets/93cba37c-c683-45b7-89a4-e9c3da4e2722" /> 7. Click the back arrow (`<`) on your message to navigate back to the initial set of responses sent to all 3 models. <img width="2298" height="637" alt="Image" src="https://github.com/user-attachments/assets/ae38ac5e-d6cb-41c0-83e7-e980b6708cf8" /> 9. Observe that the page freezes and a `TypeError` is thrown in the browser console. <img width="2553" height="1282" alt="Image" src="https://github.com/user-attachments/assets/6e104962-479c-4576-ba30-cfdd5035cd85" /> ## Logs & Screenshots **Browser Console Error:** ```js Uncaught (in promise) TypeError: can't access property "messageIds", e[21][e[23]] is undefined Kt MultiResponseMessages.svelte:295 uu MultiResponseMessages.svelte:293 kn MultiResponseMessages.svelte:246 p MultiResponseMessages.svelte:240 Zt scheduler.js:119 vt scheduler.js:79 promise callback*wt scheduler.js:20 se Component.js:81 ctx Component.js:139 onTransaction RichTextInput.svelte:775 emit index.js:164 emit index.js:164 dispatchTransaction index.js:4693 dispatch index.js:5724 get commands/</< index.js:62 yt RichTextInput.svelte:423 re MessageInput.svelte:301 yt Chat.svelte:186 update Chat.svelte:155 dn Component.js:144 dg Chat.svelte:525 h Immutable dn Component.js:148 I +page.svelte:7 Ie dom.js:1228 nt root.svelte:57 st root.svelte:51 _e utils.js:165 F5 +layout.svelte:412 p +layout.svelte:349 p +layout.svelte:418 p +layout.svelte:341 Zt scheduler.js:119 vt scheduler.js:79 promise callback*wt scheduler.js:20 se Component.js:81 ctx Component.js:139 G5 +layout.svelte:311 at utils.js:41 ne Component.js:47 vt scheduler.js:99 promise callback*wt scheduler.js:20 se Component.js:81 ctx Component.js:139 Pi +layout.svelte:685 at utils.js:41 ne Component.js:47 vt scheduler.js:99 dn Component.js:164 wt root.svelte:23 ht client.js:483 W client.js:1599 Xn client.js:330 async* 9d4310f7-f2c8-49e3-8016-a8d996fda51c:135 promise callback* 9d4310f7-f2c8-49e3-8016-a8d996fda51c:134 MultiResponseMessages.svelte:295:8 vt scheduler.js:86 (Async: promise callback) wt scheduler.js:20 se Component.js:81 ctx Component.js:139 onTransaction RichTextInput.svelte:775 emit index.js:164 forEach self-hosted:157 emit index.js:164 dispatchTransaction index.js:4693 dispatch index.js:5724 get commands/</< index.js:62 yt RichTextInput.svelte:423 re MessageInput.svelte:301 yt Chat.svelte:186 InterpretGeneratorResume self-hosted:1332 AsyncFunctionNext self-hosted:800 (Async: async) update Chat.svelte:155 dn Component.js:144 dg Chat.svelte:525 h Immutable dn Component.js:148 I +page.svelte:7 Ie dom.js:1228 nt root.svelte:57 st root.svelte:51 _e utils.js:165 F5 +layout.svelte:412 p +layout.svelte:349 p +layout.svelte:418 p +layout.svelte:341 Zt scheduler.js:119 vt scheduler.js:79 (Async: promise callback) wt scheduler.js:20 se Component.js:81 ctx Component.js:139 G5 +layout.svelte:311 InterpretGeneratorResume self-hosted:1332 AsyncFunctionNext self-hosted:800 (Async: async) at utils.js:41 map self-hosted:175 ne Component.js:47 vt scheduler.js:99 (Async: promise callback) wt scheduler.js:20 se Component.js:81 ctx Component.js:139 Pi +layout.svelte:685 InterpretGeneratorResume self-hosted:1332 AsyncFunctionNext self-hosted:800 (Async: async) at utils.js:41 map self-hosted:175 ne Component.js:47 vt scheduler.js:99 dn Component.js:164 wt root.svelte:23 ht client.js:483 W client.js:1599 InterpretGeneratorResume self-hosted:1332 AsyncFunctionNext self-hosted:800 (Async: async) Xn client.js:330 InterpretGeneratorResume self-hosted:1332 AsyncFunctionNext self-hosted:800 (Async: async) <anonymous> 9d4310f7-f2c8-49e3-8016-a8d996fda51c:135 (Async: promise callback) <anonymous> 9d4310f7-f2c8-49e3-8016-a8d996fda51c:134 ``` **Screen recording of how to reproduce this issue:** https://github.com/user-attachments/assets/ac5f97fd-7b82-4e33-b2f9-7f89c1374a96 ### Agentic AI Analysis The root cause of this bug is a state management issue in the `MultiResponseMessages.svelte` component. When a user sends a message to multiple models, the `parentMessage.models` array (a snapshot of the selected models at that time) is used to group the responses. The component's `initHandler` function iterates over this historical array and uses the model's index (`modelIdx`) to build the `groupedMessageIds` and `groupedMessageIdsIdx` objects. The crash occurs when a user navigates back in the chat history after changing the currently selected models. The `initHandler` re-runs using the *old* list of models from the parent message, but the part of the component that renders the response tabs uses the *new*, currently selected models. This creates a state mismatch. When a model has been removed, the rendering logic attempts to access an index in the `groupedMessageIds` object that was never populated (because the model isn't in the new list), leading to an attempt to access a property on `undefined`. **File:** `src/lib/components/chat/Messages/MultiResponseMessages.svelte`
GiteaMirror added the testing wantedbug labels 2025-11-11 17:05:18 -06:00
Author
Owner

@acomarcho commented on GitHub (Nov 1, 2025):

Can confirm that this happens in my device too, latest dev. But an interesting thing is if you refresh the page and try to recreate it without sending new messages, it doesn't seem to crash, as in you can remove the models and navigate around the past chats/different tabs just fine.

@acomarcho commented on GitHub (Nov 1, 2025): Can confirm that this happens in my device too, latest `dev`. But an interesting thing is if you refresh the page and try to recreate it without sending new messages, it doesn't seem to crash, as in you can remove the models and navigate around the past chats/different tabs just fine.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#6761