livekit / components-js

Official open source React components and examples for building with LiveKit.
https://livekit.io
Apache License 2.0
183 stars 81 forks source link

Focusing a track from the carousel leads to: Error while running updatePages() #524

Open Ocupe opened 1 year ago

Ocupe commented 1 year ago

Select which package(s) are affected

\@livekit/components-react

Describe the bug

There should be no error in the console when you pin a participant from the carousel. Dieser Fehler scheint weder die Funktion des Karussells noch den Rest der App zu beeinträchtigen.

Reproduction

When one participant is focused, focus another participant from the carousel.

Logs

image

System Info

System:
    OS: macOS 13.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 2.28 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.2.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - ~/Library/pnpm/yarn
    npm: 9.6.6 - /opt/homebrew/bin/npm
  Browsers:
    Brave Browser: 112.1.50.119
    Chrome: 112.0.5615.137
    Firefox: 114.0
    Firefox Developer Edition: 105.0
    Safari: 16.5

Severity

annoyance

Additional Information

No response

lebaudantoine commented 1 month ago

same error, when I quit a meeting, I got the same error @Ocupe

Error while running updatePages():  Error: Element not part of the array: Antoine__ug6s_camera_placeholder not in Antoine__ug6s_camera_TR_VCt38mfcudpVDY
    at t1 (278-bac2459ffa7ea51d.js:3:28533)
    at 278-bac2459ffa7ea51d.js:3:29308
    at 278-bac2459ffa7ea51d.js:3:29367
    at Array.forEach (<anonymous>)
    at 278-bac2459ffa7ea51d.js:3:29258
    at Array.forEach (<anonymous>)
    at t2 (278-bac2459ffa7ea51d.js:3:28969)
    at k (278-bac2459ffa7ea51d.js:3:51646)
    at S (278-bac2459ffa7ea51d.js:3:51920)
    at em (278-bac2459ffa7ea51d.js:1:84661)

I could reproduce it in my app, and your demo app !

Ocupe commented 1 month ago

The logic seems OK, but the order of operation seems off. I think we are calling the hook at a weird inbetween state. @lebaudantoine, does it have any negative impact besides the error logged to the console?

Thank you for reporting this and we are eager to resolve the issue. 👍

swaaj commented 2 weeks ago

Same issue here. I didn't see any negative impact besides the error logged.