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

Aperta Adatta ai principianti
#1,482 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@swarnendusahu10-dotcom ci sta già lavorando.

Dal 2/12/2026.

  • #1483 di @swarnendusahu10-dotcom — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, react
Ambito
frontend

Direzione di ricerca

Inizia tracciando il modo in cui FuselageSurfaceRenderer esegue il rendering di Markup e UserMention legge MarkupInteractionContext; l’issue fa riferimento a entrambi nel flusso @embeddedchat/ui-kit. Riproduci il problema con un messaggio UIKit contenente una @mention al di fuori del provider, quindi controlla i test esistenti relativi a questi componenti. Il problema è risolto quando la menzione viene visualizzata senza una schermata bianca in assenza del provider.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
JavaScript
Stelle
171
Fork
421
Merge medio
3g 6h
PR unite (30g)
4

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RocketChat/EmbeddedChat

Tutte le issue di RocketChat/EmbeddedChat

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.