Bug: White screen crash (`Cannot read properties of undefined (reading 'members')`) when rendering UserMention outside MarkupInteractionContext
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, react
- 领域
- frontend
调研方向
先追踪 FuselageSurfaceRenderer 如何渲染 Markup,以及 UserMention 如何读取 MarkupInteractionContext;issue 指向 @embeddedchat/ui-kit 流程中的这两者。使用一条在 provider 外包含 @mention 的 UIKit 消息复现问题,然后检查这些组件周围现有的测试。完成标准是:缺少 provider 时,mention 仍能渲染,且不会出现白屏。
由索引模型根据 Issue 内容生成。
描述
Description
When scrolling up to load older messages in a channel containing UIKit blocks (e.g., #community-chat-any-topic), EmbeddedChat crashes to a blank white screen with:
Uncaught TypeError: Cannot read properties of undefined (reading 'members') in UserMention.
Root Cause
FuselageSurfaceRenderer(in@embeddedchat/ui-kit) renders<Markup>formrkdwntext without wrapping it in<MarkupInteractionContext.Provider>.MarkupInteractionContextis initialized withcreateContext()(undefineddefault).- When any UIKit block contains a
@mention,UserMentiondestructures{ members, username }fromundefined, crashing the entire React tree.
Steps to Reproduce
- Open EmbeddedChat in a channel with historical UIKit messages containing
@mentions(e.g.,#community-chat-any-topic). - Scroll up to load older messages.
- As soon as a UIKit block containing a
@mentionis rendered, the app crashes to a white screen.
Expected Behavior
@mentions inside UIKit blocks or standalone <Markup> should render safely without crashing even when MarkupInteractionContext.Provider is not present.
Screen Recording / Screenshots
https://github.com/user-attachments/assets/6935a208-8508-4cd7-a075-4fc4f625c712
- 主要语言
- JavaScript
- 星标
- 171
- 派生
- 421
- 平均合并
- 3 天 6 小时
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RocketChat/EmbeddedChat 的其他 Issue
-
Bug: username fallback in updateUserUsername never runs since the ddp-client migration可能已有人在做 @MuhammadFaizan-prog 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
RocketChat/EmbeddedChat#1489 ·
维护者通常 1 天内回复
-
[Bug]: Low contrast on color swatch borders in Theme Lab (Layout Editor)可能已有人在做 @yashsarvaiya45 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 79/100
RocketChat/EmbeddedChat#1486 ·
维护者通常 1 天内回复
-
bug(api): _doConnect swallows connection/auth errors and marks failed sessions as authenticated可能已有人在做 @ashwanisingh011 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 76/100
RocketChat/EmbeddedChat#1484 ·
维护者通常 1 天内回复
-
Bug: UIKit PreviewBlock cover image tiles repeatedly and stretches across viewport when zoomed out可能已有人在做 @swarnendusahu10-dotcom 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
RocketChat/EmbeddedChat#1480 · 1 条评论 ·
维护者通常 1 天内回复
-
ug(react): guard against null childElement in MessageAggregator setJumpToMessage可能已有人在做 @Suraj704-glitch 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
RocketChat/EmbeddedChat#1478 ·
维护者通常 1 天内回复
查看 RocketChat/EmbeddedChat 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
[Docs] CONTRIBUTING.md links to retired GitHub Learning Lab and Try Git sites可能已有人在做 @adityamukesh 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 88/100
reillywalter/win-dev-doctor#92 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 78/100