Bug: White screen crash (`Cannot read properties of undefined (reading 'members')`) when rendering UserMention outside MarkupInteractionContext

オープン 初心者向け
#1,482 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@swarnendusahu10-dotcom がすでに取り組んでいます。

2026年12月2日 から。

  • #1483 @swarnendusahu10-dotcom による — オープン

評価

難易度
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> for mrkdwn text without wrapping it in <MarkupInteractionContext.Provider>.
  • MarkupInteractionContext is initialized with createContext() (undefined default).
  • When any UIKit block contains a @mention, UserMention destructures { members, username } from undefined, crashing the entire React tree.
Steps to Reproduce
  1. Open EmbeddedChat in a channel with historical UIKit messages containing @mentions (e.g., #community-chat-any-topic).
  2. Scroll up to load older messages.
  3. As soon as a UIKit block containing a @mention is 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時間
マージ済み PR(30日)
4

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

RocketChat/EmbeddedChat のほかの issue

RocketChat/EmbeddedChat の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。