There is an error bug when I try connecting to the...
# ask-ai
l
There is an error bug when I try connecting to the LiveKit playground using a different browser language. It only works on English. Evaluate what is happening and how I can fix this bug. Here is the error: Unhandled Runtime Error. NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
t
Thanks for reaching out, aphinity. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m looking at the runtime error you shared: "NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node." I’ll help diagnose and give actionable steps. Quick hypothesis (what’s likely happening) • The app is trying to remove a DOM node that isn’t present because UI elements differ when the browser language changes (labels, element ordering, or localized markup). That leads to a removeChild call targeting the wrong parent or a node that’s already been removed. • Language-based differences can change DOM structure or timing (e.g., extra nodes, different IDs/classes rendered, or i18n conditional rendering) so code that assumes a fixed DOM can fail. What you can check right now 1. Reproduce and capture details ◦ Reproduce the issue with a non-English browser language and open DevTools Console + Sources. ◦ Note the stack trace and which component/file and line number call
removeChild
(or where the library calls it). Share that line if you want deeper help. 1. Inspect the DOM at the time of failure ◦ In DevTools Elements, pause on exception (Sources → pause on exceptions). When paused, inspect the attempted parent node and the child node referenced — confirm whether the child is actually in that parent. 1. Look for language-dependent DOM differences ◦ Compare the DOM tree between English and the failing language to find missing/extra nodes, different container elements, or different keys/IDs used by i18n. 1. Check i18n/localization rendering and keys ◦ Ensure localized templates/components render the same structural elements (same wrapper nodes and same data-test-id or class/id attributes) that code uses for DOM manipulation. ◦ If using conditional rendering for certain locales, confirm the code guards DOM operations (see fix suggestions below). 1. Race condition / double remove ◦ Confirm the node isn’t being removed twice (e.g., once by framework and once manually). Use console logging or breakpoints to observe removal calls ordering. Immediate fixes to try • Defensive removal: Before removing, check parent.contains(child) or child.parentNode === parent; only call removeChild if true. Example:
Copy code
if (parent && child && parent.contains(child)) {
    parent.removeChild(child);
  }
• Use framework-safe methods: If using a framework (React/Vue), avoid direct DOM manipulation; let the framework manage DOM or use refs with lifecycle checks. • Use unique, stable selectors: Rely on
data-test-id
or consistent classNames/IDs that localization won’t change. • Synchronize actions: If timing is the issue, ensure removal happens after render (e.g., in next tick or afterMount). If you want, I can: • Review the exact stack trace and the code around the failing line (paste the stack trace and the component code that calls removeChild). • Compare rendered DOM snapshots for English vs failing language if you paste screenshots or HTML snippets. Which would you like me to do next: inspect the stack trace and the failing code, or compare DOM outputs for English vs the other language?
l
Here is the call stack from when I changed the browser language to russian and clicked Connect on the LiveKit Playground for the Livekit Agent: removeChild node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (35684:1) commitDeletionEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22108:1) commitDeletionEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22013:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22413:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22593:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22593:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22593:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22449:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22593:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22593:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22449:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22876:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22876:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22593:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22449:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22593:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22449:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22876:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22449:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22876:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22449:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22449:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22449:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22786:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22720:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22593:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1) commitMutationEffectsOnFiber node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22593:1) recursivelyTraverseMutationEffects node_modules\.pnpm\next@14.2.33_react-dom@18.2.0_react@18.2.0__react@18.2.0\node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (22427:1)
t
Thanks — I’m looking at the stack trace you pasted (ReactDOM’s deletion/mutation phase failing). I’ll diagnose what’s likely happening and give concise, actionable steps to find and fix it. What this stack trace indicates • React is throwing while committing deletions (in React’s mutation effects). That means React attempted to remove a DOM node but the node was already not a child of the parent — typically caused by: ◦ Unstable or incorrect
key
values on elements. ◦ Manual DOM manipulation that conflicts with React’s rendering. ◦ Race conditions where cleanup/unmount runs twice or out of order. ◦ Localization changing rendered structure (different wrappers, extra elements, or conditional rendering for Russian) so the expected DOM tree differs from English. What to check first (quick, targeted diagnostics) 1. Reproduce with DevTools paused on exceptions: ◦ Open DevTools → Sources → enable “Pause on exceptions”. ◦ Reproduce (set browser language to Russian, click Connect). When paused, inspect the call frame and the parent/child DOM nodes involved to see which element React tried to remove. 1. Check component keys: ◦ Look for lists or conditional renders and ensure all items use stable unique
key
props (not indices or locale-dependent values). 1. Search for direct DOM manipulation: ◦ Grep your codebase for
removeChild
,
parentNode.removeChild
,
innerHTML =
, or direct DOM queries. If present, wrap removals defensively or migrate to React-managed updates. 1. Inspect i18n/localized templates: ◦ Compare the rendered DOM in English vs Russian (Elements panel) to spot structural differences (extra wrappers, different element order, missing nodes, changed IDs/classes). ◦ Verify translation strings do not include HTML that changes markup structure. 1. Audit useEffect cleanup and event handlers: ◦ Ensure cleanup functions don’t remove nodes already removed by React. ◦ Guard removals with checks like
if (parent.contains(child)) parent.removeChild(child)
. Immediate fixes to try • Add defensive checks before DOM removal:
Copy code
if (parent && child && parent.contains(child)) {
    parent.removeChild(child);
  }
• Replace manual DOM removal with React state updates so React controls lifecycle. • Ensure
key
props are stable across locales (use a locale-independent id). • If timing is suspect, delay removal to next tick or run inside a safe lifecycle (e.g., after mount/unmount hooks complete). Additional targeted steps I can help with • If you paste the component code that mounts/unmounts the agent UI (or any custom DOM-manipulating code), I’ll point out exact lines to change. • If you share a small DOM snapshot (English vs Russian) or the paused call frame from DevTools, I’ll pinpoint the mismatched node and the easiest fix. Which would you like me to look at next: the component code that handles the UI lifecycle, or a DOM snapshot / paused call frame from DevTools? Sources: React Components & UI Library | livekit/livekit_composite | DeepWiki | JavaScript/TypeScript SDK | livekit/livekit_composite | DeepWiki | Web Application Examples | livekit/livekit_composite | DeepWiki
l
Could the issue have to do with being on NextJS 14?
t
Thanks — addressing your specific question about Next.js 14. Short answer: From what I can see, Next.js 14 is not confirmed as the cause. The stack trace shows the error occurs inside React DOM’s commit/deletion phase, which is typically caused by a DOM reconciliation issue (unstable keys, manual DOM manipulation, effect cleanup/race conditions, or localization changing the DOM structure), not the Next.js version itself. What to try next (concise, actionable) • Confirm by testing on Next.js 13 or 15 (if easy): if the bug disappears, that narrows it to framework behavior; if it persists, it’s a component/DOM issue. • Share the component code that mounts/unmounts the playground UI (or any code that manipulates the DOM). I’ll review for: ◦ unstable or locale-dependent
key
props ◦ direct DOM operations (e.g.,
removeChild
) ◦ improper
useEffect
cleanup or double unmounts • While testing, enable DevTools “Pause on exceptions” and inspect the paused frame to see which parent/child nodes are mismatched. If you prefer, paste the relevant component (mount/unmount/effect code) or the paused call frame/DOM snapshot and I’ll point to the exact lines to change. Sources: React Components & UI Library | livekit/livekit_composite | DeepWiki | JavaScript/TypeScript SDK | livekit/livekit_composite | DeepWiki | Web Application Examples | livekit/livekit_composite | DeepWiki
l
Here is the console error: framework-64ad27b21261a9ce.js:1 NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. at uH (framework-64ad27b21261a9ce.js185009) at uQ (framework-64ad27b21261a9ce.js186250) at uq (framework-64ad27b21261a9ce.js186710) at uQ (framework-64ad27b21261a9ce.js186400) at uq (framework-64ad27b21261a9ce.js186710) at uQ (framework-64ad27b21261a9ce.js186400) at uq (framework-64ad27b21261a9ce.js186710) at uQ (framework-64ad27b21261a9ce.js186400) at uq (framework-64ad27b21261a9ce.js186513) at uQ (framework-64ad27b21261a9ce.js186400) a6 @ framework-64ad27b21261a9ce.js:1 a.componentDidCatch.t.callback @ framework-64ad27b21261a9ce.js:1 lX @ framework-64ad27b21261a9ce.js:1 uY @ framework-64ad27b21261a9ce.js:1 e @ framework-64ad27b21261a9ce.js:1 (anonymous) @ framework-64ad27b21261a9ce.js:1 oI @ framework-64ad27b21261a9ce.js:1 oC @ framework-64ad27b21261a9ce.js:1 r8 @ framework-64ad27b21261a9ce.js:1 (anonymous) @ framework-64ad27b21261a9ce.js:1 oI @ framework-64ad27b21261a9ce.js:1 oS @ framework-64ad27b21261a9ce.js:1 x @ framework-64ad27b21261a9ce.js:1 T @ framework-64ad27b21261a9ce.js:1 _ @ inpage.js:166 w @ inpage.js:166 Y @ inpage.js:166 postMessage h @ inpage.js:166 b @ inpage.js:166 u @ framework-64ad27b21261a9ce.js:1 M @ framework-64ad27b21261a9ce.js:1 (anonymous) @ framework-64ad27b21261a9ce.js:1 ow @ framework-64ad27b21261a9ce.js:1 ok @ framework-64ad27b21261a9ce.js:1 aH @ framework-64ad27b21261a9ce.js:1 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 r @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 emit @ 3dbccb2b-4347dd1788b1701d.js:1 emitWhenConnected @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 emit @ 3dbccb2b-4347dd1788b1701d.js:1 _setAttributes @ 3dbccb2b-4347dd1788b1701d.js:1 updateInfo @ 3dbccb2b-4347dd1788b1701d.js:1 updateInfo @ 3dbccb2b-4347dd1788b1701d.js:1 getOrCreateParticipant @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 handleSignalResponse @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 nv @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 main-9cfe80f561b9f817.js:1 NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. at uH (framework-64ad27b21261a9ce.js185009) at uQ (framework-64ad27b21261a9ce.js186250) at uq (framework-64ad27b21261a9ce.js186710) at uQ (framework-64ad27b21261a9ce.js186400) at uq (framework-64ad27b21261a9ce.js186710) at uQ (framework-64ad27b21261a9ce.js186400) at uq (framework-64ad27b21261a9ce.js186710) at uQ (framework-64ad27b21261a9ce.js186400) at uq (framework-64ad27b21261a9ce.js186513) at uQ (framework-64ad27b21261a9ce.js186400) Z @ main-9cfe80f561b9f817.js:1 fn @ main-9cfe80f561b9f817.js:1 componentDidCatch @ main-9cfe80f561b9f817.js:1 a.componentDidCatch.t.callback @ framework-64ad27b21261a9ce.js:1 lX @ framework-64ad27b21261a9ce.js:1 uY @ framework-64ad27b21261a9ce.js:1 e @ framework-64ad27b21261a9ce.js:1 (anonymous) @ framework-64ad27b21261a9ce.js:1 oI @ framework-64ad27b21261a9ce.js:1 oC @ framework-64ad27b21261a9ce.js:1 r8 @ framework-64ad27b21261a9ce.js:1 (anonymous) @ framework-64ad27b21261a9ce.js:1 oI @ framework-64ad27b21261a9ce.js:1 oS @ framework-64ad27b21261a9ce.js:1 x @ framework-64ad27b21261a9ce.js:1 T @ framework-64ad27b21261a9ce.js:1 _ @ inpage.js:166 w @ inpage.js:166 Y @ inpage.js:166 postMessage h @ inpage.js:166 b @ inpage.js:166 u @ framework-64ad27b21261a9ce.js:1 M @ framework-64ad27b21261a9ce.js:1 (anonymous) @ framework-64ad27b21261a9ce.js:1 ow @ framework-64ad27b21261a9ce.js:1 ok @ framework-64ad27b21261a9ce.js:1 aH @ framework-64ad27b21261a9ce.js:1 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 r @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 emit @ 3dbccb2b-4347dd1788b1701d.js:1 emitWhenConnected @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 emit @ 3dbccb2b-4347dd1788b1701d.js:1 _setAttributes @ 3dbccb2b-4347dd1788b1701d.js:1 updateInfo @ 3dbccb2b-4347dd1788b1701d.js:1 updateInfo @ 3dbccb2b-4347dd1788b1701d.js:1 getOrCreateParticipant @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 handleSignalResponse @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 nv @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 main-9cfe80f561b9f817.js:1 A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred Z @ main-9cfe80f561b9f817.js:1 fn @ main-9cfe80f561b9f817.js:1 componentDidCatch @ main-9cfe80f561b9f817.js:1 a.componentDidCatch.t.callback @ framework-64ad27b21261a9ce.js:1 lX @ framework-64ad27b21261a9ce.js:1 uY @ framework-64ad27b21261a9ce.js:1 e @ framework-64ad27b21261a9ce.js:1 (anonymous) @ framework-64ad27b21261a9ce.js:1 oI @ framework-64ad27b21261a9ce.js:1 oC @ framework-64ad27b21261a9ce.js:1 r8 @ framework-64ad27b21261a9ce.js:1 (anonymous) @ framework-64ad27b21261a9ce.js:1 oI @ framework-64ad27b21261a9ce.js:1 oS @ framework-64ad27b21261a9ce.js:1 x @ framework-64ad27b21261a9ce.js:1 T @ framework-64ad27b21261a9ce.js:1 _ @ inpage.js:166 w @ inpage.js:166 Y @ inpage.js:166 postMessage h @ inpage.js:166 b @ inpage.js:166 u @ framework-64ad27b21261a9ce.js:1 M @ framework-64ad27b21261a9ce.js:1 (anonymous) @ framework-64ad27b21261a9ce.js:1 ow @ framework-64ad27b21261a9ce.js:1 ok @ framework-64ad27b21261a9ce.js:1 aH @ framework-64ad27b21261a9ce.js:1 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 302-78e9322008ce8e5a.js:3 r @ 302-78e9322008ce8e5a.js:3 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 emit @ 3dbccb2b-4347dd1788b1701d.js:1 emitWhenConnected @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 emit @ 3dbccb2b-4347dd1788b1701d.js:1 _setAttributes @ 3dbccb2b-4347dd1788b1701d.js:1 updateInfo @ 3dbccb2b-4347dd1788b1701d.js:1 updateInfo @ 3dbccb2b-4347dd1788b1701d.js:1 getOrCreateParticipant @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 handleSignalResponse @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1 nv @ 3dbccb2b-4347dd1788b1701d.js:1 (anonymous) @ 3dbccb2b-4347dd1788b1701d.js:1
t
Thanks — the console trace confirms React is failing during its mutation/deletion phase. To pinpoint the cause I need one of the following: • The component that mounts/unmounts the Playground/agent UI (including any
useEffect
cleanup and any direct DOM manipulation), or • A short DOM snapshot (Elements panel) showing the parent and child nodes around the moment of failure, or • The paused call frame from DevTools when “Pause on exceptions” is hit. What I’ll look for when you share that: • unstable or locale-dependent
key
props in lists/conditional renders • direct DOM calls (
removeChild
,
parentNode
,
innerHTML
) that conflict with React •
useEffect
cleanup that might run twice or remove nodes React expects to manage • locale-specific markup differences (extra wrappers, HTML in translations, or changed IDs/classes) Paste the code snippet or DevTools snapshot you prefer and I’ll point to the exact lines to change and give a safe patch.
l
Which DevTools snapshot do you need?
t
Please capture the DOM when the exception pauses in DevTools. Steps I need you to perform and share one of these: 1. Pause-on-exception DOM (preferred) • DevTools → Sources → enable "Pause on exceptions". • Reproduce the error. When paused, switch to Elements, right-click the highlighted element (or the parent node), choose "Copy → Outer HTML", and paste the HTML here. OR 1. Screenshot of Elements panel • With DevTools paused on the exception, take a screenshot showing the highlighted element and its parent tree in the Elements panel. Paste the image. OR 1. Paused call frame + nearby code • With DevTools paused, open the Call Stack in Sources, copy the top call frame name and file:line, and paste the 10–20 surrounding lines of your component code (especially any
useEffect
cleanup,
key
props, or direct DOM calls). Any of these will let me pinpoint whether a locale-specific element/structure or a cleanup/race is causing the removeChild failure. Paste whichever you can and I’ll analyze it.
l
NotFoundError: Failed to execute Error: 8 === e.nodeType ? e.parentNode.removeChild(t) : e.removeChild(t)) : uA.removeChild(t.stateNode)); File name: framework-64ad27b21261a9ce.js in next/static > chunks > pages
t
Thanks — that stack fragment confirms React's trying to remove a node during commit (the minified code shows a conditional path handling different node types). To diagnose quickly I need one of these (pick whichever is easiest): • Paste the component that mounts/unmounts the playground (JSX + any
useEffect
cleanup and any direct DOM manipulation). • Or paste the paused call frame and ~20 lines of surrounding component code from DevTools when you "Pause on exceptions". • Or copy the Outer HTML of the highlighted element when paused (DevTools → Elements → right-click highlighted node → Copy → Outer HTML). If you paste the component/code, I’ll point to the exact line to change and show a minimal patch (defensive removal, stable keys, or converting manual DOM ops to React-managed updates).
l
From sources: , F = () => (0, a.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 98 96", xmlns: "http://www.w3.org/2000/svg", children: (0, a.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z", fill: "currentColor" }) }) , I = e => { let {children: r, title: t, className: f, childrenClassName: n, padding: d=!0, backgroundColor: s="transparent"} = e; return (0, a.jsxs)("div", { className: "flex flex-col border rounded-sm border-gray-800 text-gray-500 bg-".concat(s, " ").concat(f), children: [t && (0, a.jsx)("div", { className: "flex items-center justify-center text-xs uppercase py-2 border-b border-b-gray-800 tracking-wider", style: { height: "".concat(32, "px") }, children: (0, a.jsx)("h2", { children: t }) }), (0, a.jsx)("div", { className: "flex flex-col items-center grow w-full ".concat(n), style: { height: "calc(100% - ".concat(t ? "32px" : "0px", ")"), padding: "".concat(4 * (d ? 4 : 0), "px") }, children: r })] }) }
t
Thanks — the snippet you shared is a presentational wrapper and doesn't show the mounting/unmounting logic that triggers the removeChild. To pinpoint the bug I still need one of these: • The component that renders the Playground/agent UI (JSX) including any
useEffect
hooks and cleanup functions. • Any code that does direct DOM manipulation (
removeChild
,
appendChild
,
innerHTML
,
parentNode
,
querySelector
, etc.). • The JSX where participants/tiles/list are rendered (look for arrays with
key
props). • Or the Outer HTML you get when DevTools pauses on exception (DevTools → Sources → Pause on exceptions → reproduce → Elements → right‑click highlighted node → Copy → Outer HTML). If you paste the component or the Outer HTML, I’ll point to the exact lines to change and provide a minimal patch (defensive removal or React-managed fix). Which can you share?
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!