mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #22742] issue: Shared Chats Crash with Uncaught TypeError: can't access property "id", Z() is null
#58471
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 @silentoplayz on GitHub (Mar 17, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22742
Check Existing Issues
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
README.md.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 tonull.Steps to Reproduce
v0.8.10version on Ubuntu 24.04.4 LTS using Firefox v148.0.2.Uncaught TypeError: can't access property "id", Z() is nullLogs & Screenshots
Browser Console Error
Screenshot:
Additional Information
The underlying bug exists in
src/lib/components/chat/Messages/UserMessage.svelteat line 138.The
UserMessage.sveltecomponent acceptsexport let user;as a prop. In the context of a standard authenticated chat session, theuserprop is successfully populated with the session user's object. However, when rendering a public Shared Chat, the viewer might be unauthenticated, or theMessageswrapper component may fail to pass down theuserprop appropriately contexts where the original author's information is detached.Because
useris implicitlynullorundefinedin these Shared Chat views, callinguser.idinline crashes the component entirely. Adding an optional chaining fallback (user?.id ?? 'default') or wrapping theProfileImagedisplay logic in a{#if user}block will instantly resolve this broken view.@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.
@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.
@Classic298 commented on GitHub (Mar 21, 2026):
4d67c817ec@silentoplayz commented on GitHub (Mar 22, 2026):
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.