Upgrade LiveKit dependencies - #780
Merged
Merged
Conversation
Co-authored-by: Kræn Hansen <mail@kraenhansen.dk>
Member
Author
6 tasks
Member
Author
|
It's my current understanding that we're blocked on upgrading the LiveKit SDKs as they introduced changes which aren't backwards compatible with the server, we're currently working on upgrading the server to unblock this upgrade. |
Contributor
|
we might not need the git patch after the bump. (see #532) |
|
Is this still in progress? |
Member
Author
|
@kalvin807 can you help me verify that the patch is no longer needed? I agree this seems to be the case (with webrtcHacks/adapter#1177 (comment)) but then this issue popped up 🤔 webrtcHacks/adapter#1194 |
kraenhansen
force-pushed
the
upgrade-livekit-dependencies
branch
from
August 10, 2026 12:44
a06eb34 to
1a4d079
Compare
publishData() now requires Uint8Array<ArrayBuffer> (NonSharedUint8Array); the ambient TextEncoder shim defaulted to Uint8Array<ArrayBufferLike>.
--rebase-merges redid the main merge from scratch, silently discarding the non-conflicting manual edits from the original resolution: the singlePeerConnection removal and the @livekit/react-native(-webrtc) bumps. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kraenhansen
force-pushed
the
upgrade-livekit-dependencies
branch
from
August 10, 2026 15:05
1a4d079 to
78d7219
Compare
kraenhansen
marked this pull request as ready for review
August 10, 2026 17:31
PaulAsjes
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
livekit-clientto^2.21.0@livekit/react-nativeto^2.12.0@livekit/react-native-expo-pluginto^1.0.2@livekit/react-native-webrtcto^144.1.2mainand reverted the temporary compatibility changes from Fix WebRTC connection by pinning livekit-client to 2.16.1 #782 now that the service is on LiveKit server 1.12.0:livekit-client@2.16.1pinsinglePeerConnection: falsefromRoomconstructionlivekit-clientpatch file/registration and regeneratepnpm-lock.yamlwithout patch metadata (see below — the patch was unrelated to Fix WebRTC connection by pinning livekit-client to 2.16.1 #782).TextEncodertype inpackages/client/src/runtime.ts: LiveKit 2.21.0 tightenedLocalParticipant.publishData()to requireUint8Array<ArrayBuffer>(NonSharedUint8Array), but the project's runtime-agnostic shim declaredencode()as returning the widerUint8Array<ArrayBufferLike>, which no longer type-checked.Why removing
patches/livekit-client@2.16.1.patchis safeThe patch did not come from #782 (that PR only renamed it when changing the pin) — it came from #556, fixing a convai-widget crash on Wix sites: Wix's security hardening makes
EventTarget.prototype.addEventListenernon-writable, andwrapPeerConnectionEventin thewebrtc-adaptercode bundled insidelivekit-clientcrashed with a strict-modeTypeErrorwhen assigningproto.addEventListener. The patch guarded that assignment.That fix has since landed upstream: #556 filed webrtcHacks/adapter#1177, fixed by adapter#1178 (merged 2026-04-16). The
livekit-client@2.21.0bundle contains the fixed guard —wrapPeerConnectionEventnow returns early whenObject.getOwnPropertyDescriptor(EventTarget.prototype, 'addEventListener').writableis false, which checks exactly the property Wix hardens, with the same graceful degradation as our patch (skip the polyfill, log).Validation
pnpm installpnpm turbo build check-types lint test(all 34 tasks pass, including the disconnect-consistency regression tests from Fix conversation state consistency through disconnect #925 running against 2.21.0)Slack Thread
Note
Medium Risk
Touches core WebRTC connection setup and dependency versions for voice transport; behavior change from dropping the dual-peer workaround depends on server compatibility, though validation and upstream fixes reduce regression risk.
Overview
Bumps LiveKit across the monorepo:
livekit-clientto ^2.21.0, React Native packages to ^2.12.0 / ^144.1.2 (plus Expo example plugin ^1.0.2), with lockfile refresh and no more exact 2.16.1 pin.Reverts temporary server compatibility from #782:
WebRTCConnectionnow usesnew Room()withoutsinglePeerConnection: false, assuming LiveKit server 1.12.0 supports the v1 join path.Removes
patches/livekit-client@2.16.1.patchandpatchedDependenciesregistration; upstream livekit-client now includes the Wix/non-writableaddEventListenerguard that the patch provided.Aligns
TextEncoder.encodeinruntime.tsto returnUint8Array<ArrayBuffer>sopublishDatatype-checks against LiveKit 2.21.0.Reviewed by Cursor Bugbot for commit 78d7219. Bugbot is set up for automated code reviews on this repo. Configure here.