[GH-ISSUE #22742] issue: Shared Chats Crash with Uncaught TypeError: can't access property "id", Z() is null #35334

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

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

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

Visiting the URL of a publicly shared chat should correctly render the entire chat transcript without throwing runtime Svelte errors or leaving the rendering in an incomplete, "grayed-out" or frozen state.

Actual Behavior

Accessing any shared chat URL completely fails to render correctly, leaving the page grayed out. The browser console throws the following Svelte runtime error: Uncaught TypeError: can't access property "id", Z() is null. This error implies that the frontend component is trying to access a property (id) of a variable that evaluates to null.

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 the Community Sharing feature enabled and the ability to access Shared Chats.
  3. Share a chat to generate a public link (or use an existing pre-shared chat link).
  4. Navigate to that shared chat URL in your browser.
  5. Observe that the chat is grayed out and fails to render effectively.
  6. Open the browser Developer Tools (F12) -> Console.
  7. Observe the Svelte error: Uncaught TypeError: can't access property "id", Z() is null

Logs & Screenshots

Browser Console Error

Uncaught TypeError: can't access property "id", Z() is null
    S UserMessage.svelte:138
    Ce runtime.js:749
    S UserMessage.svelte:24
    Nr runtime.js:258
    hn deriveds.js:360
    fr deriveds.js:375
    Q runtime.js:661
    get src UserMessage.svelte:137
    <anonymous> props.js:317
    Ki store.js:220
    V props.js:317
    A ProfileImage.svelte:5
    k UserMessage.svelte:137
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h if.js:57
    q if.js:65
    gi UserMessage.svelte:135
    q if.js:63
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    q if.js:60
    gi UserMessage.svelte:136
    I Message.svelte:56
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h if.js:57
    q if.js:65
    h Message.svelte:55
    q if.js:63
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    q if.js:60
    h Message.svelte:105
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h if.js:57
    q if.js:65
    mi Message.svelte:54
    q if.js:63
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    q if.js:60
    mi Message.svelte:76
    ne Messages.svelte:469
    e each.js:684
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    Me each.js:683
    o each.js:314
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    Oe each.js:255
    ne Messages.svelte:467
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h key.js:38
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    h key.js:25
    ne Messages.svelte:448
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h if.js:57
    q if.js:65
    ql Messages.svelte:448
    q if.js:63
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    q if.js:60
    ql Messages.svelte:448
    oe +page.svelte:181
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h if.js:57
    q if.js:65
    nt +page.svelte:152
    q if.js:63
    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
UserMessage.svelte:138:41
    S UserMessage.svelte:138
    Ce runtime.js:749
    S UserMessage.svelte:24
    Nr runtime.js:258
    hn deriveds.js:360
    fr deriveds.js:375
    Q runtime.js:661
    get src UserMessage.svelte:137
    <anonymous> props.js:317
    Ki store.js:220
    V props.js:317
    A ProfileImage.svelte:5
    k UserMessage.svelte:137
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h if.js:57
    q if.js:65
    gi UserMessage.svelte:135
    q if.js:63
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    q if.js:60
    gi UserMessage.svelte:136
    I Message.svelte:56
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h if.js:57
    q if.js:65
    h Message.svelte:55
    q if.js:63
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    q if.js:60
    h Message.svelte:105
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h if.js:57
    q if.js:65
    mi Message.svelte:54
    q if.js:63
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    q if.js:60
    mi Message.svelte:76
    ne Messages.svelte:469
    e each.js:684
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    Me each.js:683
    o each.js:314
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    Oe each.js:255
    ne Messages.svelte:467
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h key.js:38
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    h key.js:25
    ne Messages.svelte:448
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h if.js:57
    q if.js:65
    ql Messages.svelte:448
    q if.js:63
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Vs effects.js:415
    q if.js:60
    ql Messages.svelte:448
    oe +page.svelte:181
    ensure branches.js:194
    Nr runtime.js:258
    Ye runtime.js:460
    Y effects.js:136
    Ie effects.js:438
    ensure branches.js:194
    h if.js:57
    q if.js:65
    nt +page.svelte:152
    q if.js:63
    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

Screenshot:

Image

Additional Information

The underlying bug exists in src/lib/components/chat/Messages/UserMessage.svelte at line 138.

The UserMessage.svelte component accepts export let user; as a prop. In the context of a standard authenticated chat session, the user prop is successfully populated with the session user's object. However, when rendering a public Shared Chat, the viewer might be unauthenticated, or the Messages wrapper component may fail to pass down the user prop appropriately contexts where the original author's information is detached.

Because user is implicitly null or undefined in these Shared Chat views, calling user.id inline crashes the component entirely. Adding an optional chaining fallback (user?.id ?? 'default') or wrapping the ProfileImage display logic in a {#if user} block will instantly resolve this broken view.

Originally created by @silentoplayz on GitHub (Mar 17, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/22742 ### 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 Visiting the URL of a publicly shared chat should correctly render the entire chat transcript without throwing runtime Svelte errors or leaving the rendering in an incomplete, "grayed-out" or frozen state. ### Actual Behavior Accessing any shared chat URL completely fails to render correctly, leaving the page grayed out. The browser console throws the following Svelte runtime error: `Uncaught TypeError: can't access property "id", Z() is null`. This error implies that the frontend component is trying to access a property (`id`) of a variable that evaluates to `null`. ### 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 the Community Sharing feature enabled and the ability to access Shared Chats. 3. Share a chat to generate a public link (or use an existing pre-shared chat link). 4. Navigate to that shared chat URL in your browser. 5. Observe that the chat is grayed out and fails to render effectively. 6. Open the browser Developer Tools (F12) -> Console. 7. Observe the Svelte error: `Uncaught TypeError: can't access property "id", Z() is null` ### Logs & Screenshots **Browser Console Error** ```js Uncaught TypeError: can't access property "id", Z() is null S UserMessage.svelte:138 Ce runtime.js:749 S UserMessage.svelte:24 Nr runtime.js:258 hn deriveds.js:360 fr deriveds.js:375 Q runtime.js:661 get src UserMessage.svelte:137 <anonymous> props.js:317 Ki store.js:220 V props.js:317 A ProfileImage.svelte:5 k UserMessage.svelte:137 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h if.js:57 q if.js:65 gi UserMessage.svelte:135 q if.js:63 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 q if.js:60 gi UserMessage.svelte:136 I Message.svelte:56 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h if.js:57 q if.js:65 h Message.svelte:55 q if.js:63 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 q if.js:60 h Message.svelte:105 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h if.js:57 q if.js:65 mi Message.svelte:54 q if.js:63 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 q if.js:60 mi Message.svelte:76 ne Messages.svelte:469 e each.js:684 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 Me each.js:683 o each.js:314 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 Oe each.js:255 ne Messages.svelte:467 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h key.js:38 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 h key.js:25 ne Messages.svelte:448 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h if.js:57 q if.js:65 ql Messages.svelte:448 q if.js:63 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 q if.js:60 ql Messages.svelte:448 oe +page.svelte:181 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h if.js:57 q if.js:65 nt +page.svelte:152 q if.js:63 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 UserMessage.svelte:138:41 S UserMessage.svelte:138 Ce runtime.js:749 S UserMessage.svelte:24 Nr runtime.js:258 hn deriveds.js:360 fr deriveds.js:375 Q runtime.js:661 get src UserMessage.svelte:137 <anonymous> props.js:317 Ki store.js:220 V props.js:317 A ProfileImage.svelte:5 k UserMessage.svelte:137 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h if.js:57 q if.js:65 gi UserMessage.svelte:135 q if.js:63 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 q if.js:60 gi UserMessage.svelte:136 I Message.svelte:56 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h if.js:57 q if.js:65 h Message.svelte:55 q if.js:63 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 q if.js:60 h Message.svelte:105 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h if.js:57 q if.js:65 mi Message.svelte:54 q if.js:63 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 q if.js:60 mi Message.svelte:76 ne Messages.svelte:469 e each.js:684 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 Me each.js:683 o each.js:314 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 Oe each.js:255 ne Messages.svelte:467 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h key.js:38 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 h key.js:25 ne Messages.svelte:448 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h if.js:57 q if.js:65 ql Messages.svelte:448 q if.js:63 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Vs effects.js:415 q if.js:60 ql Messages.svelte:448 oe +page.svelte:181 ensure branches.js:194 Nr runtime.js:258 Ye runtime.js:460 Y effects.js:136 Ie effects.js:438 ensure branches.js:194 h if.js:57 q if.js:65 nt +page.svelte:152 q if.js:63 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 ``` ### Screenshot: <img width="2560" height="1278" alt="Image" src="https://github.com/user-attachments/assets/ccfc2b9a-f1d0-4310-b655-60889de5cbb7" /> ### Additional Information The underlying bug exists in `src/lib/components/chat/Messages/UserMessage.svelte` at line 138. The `UserMessage.svelte` component accepts `export let user;` as a prop. In the context of a standard authenticated chat session, the `user` prop is successfully populated with the session user's object. However, when rendering a public Shared Chat, the viewer might be unauthenticated, or the `Messages` wrapper component may fail to pass down the `user` prop appropriately contexts where the original author's information is detached. Because `user` is implicitly `null` or `undefined` in these Shared Chat views, calling `user.id` inline crashes the component entirely. Adding an optional chaining fallback (`user?.id ?? 'default'`) or wrapping the `ProfileImage` display logic in a `{#if user}` block will instantly resolve this broken view.
GiteaMirror added the bugconfirmed issue labels 2026-04-25 09:33:44 -05:00
Author
Owner

@aayushbaluni commented on GitHub (Mar 17, 2026):

Fix submitted in #22750. Root cause: UserMessage.svelte accessed user.id and user.name without null checks when viewing shared chats as an unauthenticated viewer.

<!-- gh-comment-id:4073329599 --> @aayushbaluni commented on GitHub (Mar 17, 2026): Fix submitted in #22750. Root cause: UserMessage.svelte accessed user.id and user.name without null checks when viewing shared chats as an unauthenticated viewer.
Author
Owner

@aayushbaluni commented on GitHub (Mar 17, 2026):

Fix resubmitted in #22751 targeting dev branch. Root cause: UserMessage.svelte accessed user.id/name without null check in shared chat view.

<!-- gh-comment-id:4073376064 --> @aayushbaluni commented on GitHub (Mar 17, 2026): Fix resubmitted in #22751 targeting dev branch. Root cause: UserMessage.svelte accessed user.id/name without null check in shared chat view.
Author
Owner

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

4d67c817ec

<!-- gh-comment-id:4104689726 --> @Classic298 commented on GitHub (Mar 21, 2026): https://github.com/open-webui/open-webui/commit/4d67c817ec47c0e5d7c8c87bb54fde569393ad06
Author
Owner

@silentoplayz commented on GitHub (Mar 22, 2026):

4d67c81

Whether or not this commit includes the fix for the reported issue, I can confirm that I am able to view shared chats again on the latest dev.

<!-- gh-comment-id:4105729891 --> @silentoplayz commented on GitHub (Mar 22, 2026): > [4d67c81](https://github.com/open-webui/open-webui/commit/4d67c817ec47c0e5d7c8c87bb54fde569393ad06) Whether or not this commit includes the fix for the reported issue, I can confirm that I am able to view shared chats again on the latest `dev`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35334