[GH-ISSUE #22740] issue: each_key_duplicate Error and Broken Infinite Scroll on Notes Page #58469

Closed
opened 2026-05-05 23:13:34 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @silentoplayz on GitHub (Mar 16, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22740

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

Docker

Open WebUI Version

v0.8.10

Ollama Version (if applicable)

v0.18.0

Operating System

Ubuntu 24.04.4 LTS

Browser (if applicable)

Mozilla Firefox Snap for Ubuntu v148.0.2 (64-bit) / Google Chrome v146.0.7680.80 (Official Build) (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 visiting the Notes page from the sidebar and scrolling through the list of existing notes, the infinite scroller should fetch and append the older notes sequentially without throwing errors or halting the rendering sequence.

Actual Behavior

Scrolling through the list of notes triggers the Svelte error Uncaught Error: https://svelte.dev/e/each_key_duplicate, halting the rendering of the items. Any notes not initially displayed to the user fail to load as a result of the UI crashing.

Steps to Reproduce

  1. Start an Open WebUI instance utilizing the v0.8.10 version on Ubuntu 24.04.4 LTS using Firefox v148.0.2.
  2. Ensure you have enough notes in your account to trigger the pagination/infinite scroll behavior (at least more than one "page" of items returned by the API).
  3. Open the browser console (F12 or Inspect -> Console).
  4. Navigate to the Notes page via the sidebar /notes.
  5. Scroll down to trigger the infinite scroll loader to fetch the next page of notes.
  6. Observe the Svelte runtime error Uncaught Error: https://svelte.dev/e/each_key_duplicate in the browser dev tools console, and notice that the pagination fails to append the new list of notes to the UI.

Logs & Screenshots

Browser Console Error(s) (One may or may not be more helpful than the other for debugging/diagnosis of the issue)

First capture (Docker build):

Uncaught Error: https://svelte.dev/e/each_key_duplicate
    mi errors.js:146
    o each.js:349
    Nr runtime.js:258
    Ye runtime.js:460
    Wt batch.js:350
    Gt batch.js:247
    flush batch.js:417
    ensure batch.js:579
    Fn utils.js:47
    Gn task.js:10
    Se task.js:28
    Se task.js:19
    ensure batch.js:573
    ct sources.js:193
    le sources.js:171
    Me Notes.svelte:223
    le Notes.svelte:178
    ca Notes.svelte:185
    setTimeout handler*ca/< Notes.svelte:183
    Ce runtime.js:749
    effect effects.js:329
    Nr runtime.js:258
    Ye runtime.js:460
    Wt batch.js:350
    Gt batch.js:247
    Gt batch.js:314
    Gt batch.js:314
    Gt batch.js:314
    flush batch.js:417
    ensure batch.js:579
    Fn utils.js:47
    Gn task.js:10
    Se task.js:28
    Se task.js:19
    ensure batch.js:573
    ct sources.js:193
    le sources.js:171
    set legacy-client.js:110
    <anonymous> legacy-client.js:149
    $set legacy-client.js:159
    F client.js:1824
    Sn client.js:2666
    Sn client.js:2557
    Cn client.js:382
    async* e43bb9cc-2342-4542-ab8e-eb23c5d0982d:137
    promise callback* e43bb9cc-2342-4542-ab8e-eb23c5d0982d:136
errors.js:146:9
    mi errors.js:146
    o each.js:349
    Nr runtime.js:258
    Ye runtime.js:460
    Wt batch.js:350
    Gt batch.js:247
    flush batch.js:417
    ensure batch.js:579
    Fn utils.js:47
    Gn task.js:10
    Se task.js:28
    (Async: VoidFunction)
    Se task.js:19
    ensure batch.js:573
    ct sources.js:193
    le sources.js:171
    Me Notes.svelte:223
    InterpretGeneratorResume self-hosted:1312
    AsyncFunctionNext self-hosted:780
    (Async: async)
    le Notes.svelte:178
    ca Notes.svelte:185
    (Async: setTimeout handler)
    ca Notes.svelte:183
    Ce runtime.js:749
    effect effects.js:329
    Nr runtime.js:258
    Ye runtime.js:460
    Wt batch.js:350
    Gt batch.js:247
    Gt batch.js:314
    Gt batch.js:314
    Gt batch.js:314
    flush batch.js:417
    ensure batch.js:579
    Fn utils.js:47
    Gn task.js:10
    Se task.js:28
    (Async: VoidFunction)
    Se task.js:19
    ensure batch.js:573
    ct sources.js:193
    le sources.js:171
    set legacy-client.js:110
    <anonymous> legacy-client.js:149
    $set legacy-client.js:159
    F client.js:1824
    InterpretGeneratorResume self-hosted:1312
    AsyncFunctionNext self-hosted:780
    (Async: async)
    Sn client.js:2666
    InterpretGeneratorResume self-hosted:1312
    AsyncFunctionNext self-hosted:780
    (Async: async)
    Sn client.js:2557
    Cn client.js:382
    InterpretGeneratorResume self-hosted:1312
    AsyncFunctionNext self-hosted:780
    (Async: async)
    <anonymous> e43bb9cc-2342-4542-ab8e-eb23c5d0982d:137
    (Async: promise callback)
    <anonymous> e43bb9cc-2342-4542-ab8e-eb23c5d0982d:136

Second capture (Local VSCode build):

Uncaught Svelte error: each_key_duplicate
Keyed each block has duplicate key `e4ea3e23-67c1-489a-a7e7-49cc572ca388` at indexes 0 and 15
https://svelte.dev/e/each_key_duplicate

  in <unknown>
  in Notes.svelte
  in +page.svelte
  in +layout.svelte
  in +layout.svelte
  in +layout.svelte
  in root.svelte
  in undefined
    each_key_duplicate errors.js:138
    validate_each_keys each.js:760
    effect2 each.js:346
    update_reaction runtime.js:258
    update_effect runtime.js:460
    traverse_fn batch.js:350
    process_fn batch.js:247
    flush batch.js:417
    ensure batch.js:579
    run_all utils.js:47
    run_micro_tasks task.js:10
    queue_micro_task task.js:28
    queue_micro_task task.js:19
    ensure batch.js:573
    internal_set sources.js:193
    set sources.js:171
    getItemsPage Notes.svelte:301
    init Notes.svelte:178
    Notes Notes.svelte:185
    setTimeout handler*Notes/< Notes.svelte:183
    untrack runtime.js:749
    effect effects.js:329
    update_reaction runtime.js:258
    update_effect runtime.js:460
    traverse_fn batch.js:350
    process_fn batch.js:247
    process_fn batch.js:314
    process_fn batch.js:314
    process_fn batch.js:314
    flush batch.js:417
    ensure batch.js:579
    run_all utils.js:47
    run_micro_tasks task.js:10
    queue_micro_task task.js:28
    queue_micro_task task.js:19
    ensure batch.js:573
    internal_set sources.js:193
    set sources.js:171
    set legacy-client.js:110
    <anonymous> legacy-client.js:149
    $set legacy-client.js:159
    navigate client.js:1824
    _start_router client.js:2666
    _start_router client.js:2557
    start client.js:382
    async* (index):126
    promise callback* (index):125
errors.js:138:17
    each_key_duplicate errors.js:138
    validate_each_keys each.js:760
    effect2 each.js:346
    update_reaction runtime.js:258
    update_effect runtime.js:460
    traverse_fn batch.js:350
    process_fn batch.js:247
    flush batch.js:417
    ensure batch.js:579
    run_all utils.js:47
    run_micro_tasks task.js:10
    queue_micro_task task.js:28
    (Async: VoidFunction)
    queue_micro_task task.js:19
    ensure batch.js:573
    internal_set sources.js:193
    set sources.js:171
    getItemsPage Notes.svelte:301
    InterpretGeneratorResume self-hosted:1312
    AsyncFunctionNext self-hosted:780
    (Async: async)
    init Notes.svelte:178
    Notes Notes.svelte:185
    (Async: setTimeout handler)
    Notes Notes.svelte:183
    untrack runtime.js:749
    effect effects.js:329
    update_reaction runtime.js:258
    update_effect runtime.js:460
    traverse_fn batch.js:350
    process_fn batch.js:247
    process_fn batch.js:314
    process_fn batch.js:314
    process_fn batch.js:314
    flush batch.js:417
    ensure batch.js:579
    run_all utils.js:47
    run_micro_tasks task.js:10
    queue_micro_task task.js:28
    (Async: VoidFunction)
    queue_micro_task task.js:19
    ensure batch.js:573
    internal_set sources.js:193
    set sources.js:171
    set legacy-client.js:110
    <anonymous> legacy-client.js:149
    $set legacy-client.js:159
    navigate client.js:1824
    InterpretGeneratorResume self-hosted:1312
    AsyncFunctionNext self-hosted:780
    (Async: async)
    _start_router client.js:2666
    InterpretGeneratorResume self-hosted:1312
    AsyncFunctionNext self-hosted:780
    (Async: async)
    _start_router client.js:2557
    start client.js:382
    InterpretGeneratorResume self-hosted:1312
    AsyncFunctionNext self-hosted:780
    (Async: async)
    <anonymous> (index):126
    (Async: promise callback)
    <anonymous> (index):125

Screenshot

First capture (Docker build):
Image

Second capture (Local VSCode build):
Image

Additional Information

This issue is caused by the Svelte keyed #each blocks inside src/lib/components/notes/Notes.svelte. Specifically, either lines 477 ({#each notesList as note, idx (note.id)}) or 563 ({#each notesList as note, idx (note.id)}) throw a duplicate key error because the note.id is not strictly unique among the rendered items array. When getItemsPage() appends the newly fetched pageItems arrays to items (items = [...items, ...pageItems];), overlapping or duplicate items bypass any deduplication logic and crash the each block since the identifier (note.id) appears more than once. Filtering out duplicates prior to setting the items state, or utilizing unique synthetic keys for rendering, would resolve this issue.

Originally created by @silentoplayz on GitHub (Mar 16, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/22740 ### 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 Docker ### Open WebUI Version v0.8.10 ### Ollama Version (if applicable) v0.18.0 ### Operating System Ubuntu 24.04.4 LTS ### Browser (if applicable) Mozilla Firefox Snap for Ubuntu v148.0.2 (64-bit) / Google Chrome v146.0.7680.80 (Official Build) (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 visiting the Notes page from the sidebar and scrolling through the list of existing notes, the infinite scroller should fetch and append the older notes sequentially without throwing errors or halting the rendering sequence. ### Actual Behavior Scrolling through the list of notes triggers the Svelte error `Uncaught Error: https://svelte.dev/e/each_key_duplicate`, halting the rendering of the items. Any notes not initially displayed to the user fail to load as a result of the UI crashing. ### Steps to Reproduce 1. Start an Open WebUI instance utilizing the `v0.8.10` version on Ubuntu 24.04.4 LTS using Firefox v148.0.2. 2. Ensure you have enough notes in your account to trigger the pagination/infinite scroll behavior (at least more than one "page" of items returned by the API). 3. Open the browser console (F12 or Inspect -> Console). 4. Navigate to the `Notes` page via the sidebar `/notes`. 5. Scroll down to trigger the infinite scroll loader to fetch the next page of notes. 6. Observe the Svelte runtime error `Uncaught Error: https://svelte.dev/e/each_key_duplicate` in the browser dev tools console, and notice that the pagination fails to append the new list of notes to the UI. ### Logs & Screenshots **Browser Console Error(s) (One may or may not be more helpful than the other for debugging/diagnosis of the issue)** First capture (Docker build): ```js Uncaught Error: https://svelte.dev/e/each_key_duplicate mi errors.js:146 o each.js:349 Nr runtime.js:258 Ye runtime.js:460 Wt batch.js:350 Gt batch.js:247 flush batch.js:417 ensure batch.js:579 Fn utils.js:47 Gn task.js:10 Se task.js:28 Se task.js:19 ensure batch.js:573 ct sources.js:193 le sources.js:171 Me Notes.svelte:223 le Notes.svelte:178 ca Notes.svelte:185 setTimeout handler*ca/< Notes.svelte:183 Ce runtime.js:749 effect effects.js:329 Nr runtime.js:258 Ye runtime.js:460 Wt batch.js:350 Gt batch.js:247 Gt batch.js:314 Gt batch.js:314 Gt batch.js:314 flush batch.js:417 ensure batch.js:579 Fn utils.js:47 Gn task.js:10 Se task.js:28 Se task.js:19 ensure batch.js:573 ct sources.js:193 le sources.js:171 set legacy-client.js:110 <anonymous> legacy-client.js:149 $set legacy-client.js:159 F client.js:1824 Sn client.js:2666 Sn client.js:2557 Cn client.js:382 async* e43bb9cc-2342-4542-ab8e-eb23c5d0982d:137 promise callback* e43bb9cc-2342-4542-ab8e-eb23c5d0982d:136 errors.js:146:9 mi errors.js:146 o each.js:349 Nr runtime.js:258 Ye runtime.js:460 Wt batch.js:350 Gt batch.js:247 flush batch.js:417 ensure batch.js:579 Fn utils.js:47 Gn task.js:10 Se task.js:28 (Async: VoidFunction) Se task.js:19 ensure batch.js:573 ct sources.js:193 le sources.js:171 Me Notes.svelte:223 InterpretGeneratorResume self-hosted:1312 AsyncFunctionNext self-hosted:780 (Async: async) le Notes.svelte:178 ca Notes.svelte:185 (Async: setTimeout handler) ca Notes.svelte:183 Ce runtime.js:749 effect effects.js:329 Nr runtime.js:258 Ye runtime.js:460 Wt batch.js:350 Gt batch.js:247 Gt batch.js:314 Gt batch.js:314 Gt batch.js:314 flush batch.js:417 ensure batch.js:579 Fn utils.js:47 Gn task.js:10 Se task.js:28 (Async: VoidFunction) Se task.js:19 ensure batch.js:573 ct sources.js:193 le sources.js:171 set legacy-client.js:110 <anonymous> legacy-client.js:149 $set legacy-client.js:159 F client.js:1824 InterpretGeneratorResume self-hosted:1312 AsyncFunctionNext self-hosted:780 (Async: async) Sn client.js:2666 InterpretGeneratorResume self-hosted:1312 AsyncFunctionNext self-hosted:780 (Async: async) Sn client.js:2557 Cn client.js:382 InterpretGeneratorResume self-hosted:1312 AsyncFunctionNext self-hosted:780 (Async: async) <anonymous> e43bb9cc-2342-4542-ab8e-eb23c5d0982d:137 (Async: promise callback) <anonymous> e43bb9cc-2342-4542-ab8e-eb23c5d0982d:136 ``` Second capture (Local VSCode build): ```js Uncaught Svelte error: each_key_duplicate Keyed each block has duplicate key `e4ea3e23-67c1-489a-a7e7-49cc572ca388` at indexes 0 and 15 https://svelte.dev/e/each_key_duplicate in <unknown> in Notes.svelte in +page.svelte in +layout.svelte in +layout.svelte in +layout.svelte in root.svelte in undefined each_key_duplicate errors.js:138 validate_each_keys each.js:760 effect2 each.js:346 update_reaction runtime.js:258 update_effect runtime.js:460 traverse_fn batch.js:350 process_fn batch.js:247 flush batch.js:417 ensure batch.js:579 run_all utils.js:47 run_micro_tasks task.js:10 queue_micro_task task.js:28 queue_micro_task task.js:19 ensure batch.js:573 internal_set sources.js:193 set sources.js:171 getItemsPage Notes.svelte:301 init Notes.svelte:178 Notes Notes.svelte:185 setTimeout handler*Notes/< Notes.svelte:183 untrack runtime.js:749 effect effects.js:329 update_reaction runtime.js:258 update_effect runtime.js:460 traverse_fn batch.js:350 process_fn batch.js:247 process_fn batch.js:314 process_fn batch.js:314 process_fn batch.js:314 flush batch.js:417 ensure batch.js:579 run_all utils.js:47 run_micro_tasks task.js:10 queue_micro_task task.js:28 queue_micro_task task.js:19 ensure batch.js:573 internal_set sources.js:193 set sources.js:171 set legacy-client.js:110 <anonymous> legacy-client.js:149 $set legacy-client.js:159 navigate client.js:1824 _start_router client.js:2666 _start_router client.js:2557 start client.js:382 async* (index):126 promise callback* (index):125 errors.js:138:17 each_key_duplicate errors.js:138 validate_each_keys each.js:760 effect2 each.js:346 update_reaction runtime.js:258 update_effect runtime.js:460 traverse_fn batch.js:350 process_fn batch.js:247 flush batch.js:417 ensure batch.js:579 run_all utils.js:47 run_micro_tasks task.js:10 queue_micro_task task.js:28 (Async: VoidFunction) queue_micro_task task.js:19 ensure batch.js:573 internal_set sources.js:193 set sources.js:171 getItemsPage Notes.svelte:301 InterpretGeneratorResume self-hosted:1312 AsyncFunctionNext self-hosted:780 (Async: async) init Notes.svelte:178 Notes Notes.svelte:185 (Async: setTimeout handler) Notes Notes.svelte:183 untrack runtime.js:749 effect effects.js:329 update_reaction runtime.js:258 update_effect runtime.js:460 traverse_fn batch.js:350 process_fn batch.js:247 process_fn batch.js:314 process_fn batch.js:314 process_fn batch.js:314 flush batch.js:417 ensure batch.js:579 run_all utils.js:47 run_micro_tasks task.js:10 queue_micro_task task.js:28 (Async: VoidFunction) queue_micro_task task.js:19 ensure batch.js:573 internal_set sources.js:193 set sources.js:171 set legacy-client.js:110 <anonymous> legacy-client.js:149 $set legacy-client.js:159 navigate client.js:1824 InterpretGeneratorResume self-hosted:1312 AsyncFunctionNext self-hosted:780 (Async: async) _start_router client.js:2666 InterpretGeneratorResume self-hosted:1312 AsyncFunctionNext self-hosted:780 (Async: async) _start_router client.js:2557 start client.js:382 InterpretGeneratorResume self-hosted:1312 AsyncFunctionNext self-hosted:780 (Async: async) <anonymous> (index):126 (Async: promise callback) <anonymous> (index):125 ``` ### Screenshot First capture (Docker build): <img width="2560" height="720" alt="Image" src="https://github.com/user-attachments/assets/69adf02a-a6d9-4def-b3ee-98fde069392a" /> Second capture (Local VSCode build): <img width="2557" height="638" alt="Image" src="https://github.com/user-attachments/assets/96fd35ac-fdad-4687-aab0-e8381bd51248" /> ### Additional Information This issue is caused by the Svelte keyed `#each` blocks inside `src/lib/components/notes/Notes.svelte`. Specifically, either lines 477 (`{#each notesList as note, idx (note.id)}`) or 563 (`{#each notesList as note, idx (note.id)}`) throw a duplicate key error because the `note.id` is not strictly unique among the rendered `items` array. When `getItemsPage()` appends the newly fetched `pageItems` arrays to `items` (`items = [...items, ...pageItems];`), overlapping or duplicate items bypass any deduplication logic and crash the `each` block since the identifier `(note.id)` appears more than once. Filtering out duplicates prior to setting the `items` state, or utilizing unique synthetic keys for rendering, would resolve this issue.
GiteaMirror added the bugconfirmed issue labels 2026-05-05 23:13:35 -05:00
Author
Owner
<!-- gh-comment-id:4102201151 --> @silentoplayz commented on GitHub (Mar 21, 2026): Should be solved with https://github.com/open-webui/open-webui/commit/58e78e8946fb3644107489fe8e01b17709302b2f#diff-4bb6dfc98d2cc12b6ce0fa3d5d6d4309736a92eec0cf7188b90572904b523412R224. Closing this issue out!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58469