Skip to content

Fix: crash on mobile with 0.17.0-rc.2 due to a log causing stringify to crash with TypedError: circular structure #3733

Merged
BillCarsonFr merged 3 commits intolivekitfrom
valere/bug_fix_stringify_crash
Feb 11, 2026
Merged

Fix: crash on mobile with 0.17.0-rc.2 due to a log causing stringify to crash with TypedError: circular structure #3733
BillCarsonFr merged 3 commits intolivekitfrom
valere/bug_fix_stringify_crash

Conversation

@BillCarsonFr
Copy link
Copy Markdown
Member

@BillCarsonFr BillCarsonFr commented Feb 10, 2026

EC on mobile (embedded as a widget on android only) was crashing in the RC.
As per sentry report it is due to a JSON.stringify() crash

Converting circular structure to JSON
    --> starting at object with constructor 'e'
    |     property '_parentage' -> object with constructor 'e'
    |     property '_finalizers' -> object with constructor 'Array'
    --- index 0 closes the circle

Caused by a log statement that is logging an array of objects containing several observables.

I am not sure to understand why it only crash on mobile, I am not familiar enough with the web runtime.
Anyhow it is abusive to log this full array like it is now, so I fixed that.
Also adding a defensive try/catch around the stringify for safety

fixes https://github.com/element-hq/voip-internal/issues/473

@BillCarsonFr BillCarsonFr changed the base branch from livekit to valere/fix_netlify_deploy February 10, 2026 17:01
@BillCarsonFr BillCarsonFr changed the base branch from valere/fix_netlify_deploy to livekit February 11, 2026 12:22
@BillCarsonFr BillCarsonFr added the backport-candidate Something that is a candidate for backport to a particular release branch label Feb 11, 2026
@BillCarsonFr BillCarsonFr merged commit 076cc03 into livekit Feb 11, 2026
20 checks passed
toger5 pushed a commit that referenced this pull request Feb 11, 2026
Fix: crash on mobile (android) with `0.17.0-rc.2` due to a log causing stringify to crash with `TypedError: circular structure`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-candidate Something that is a candidate for backport to a particular release branch PR-Bug-Fix Release note category. A PR that fixes a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants