Repository navigation
build: upgrade LiveKit stack components (server 1.13.7, sip 1.17.0, livekit-client 2.22.3) - #25912
Conversation
The prerm stops only livekit-server, and the postinst only starts livekit-sip, which does nothing on a running unit. An upgrade therefore leaves the old sip process running on its old config, while `livekit-sip --version` already reports the new binary. The prerm now stops both units, and the postinst restarts both. A restart starts a stopped unit, so livekit-server behaves as before, and sip also picks up the new binary when the old package's prerm left it running.
The pinned LiveKit components are several releases behind, and the local livekit-sip patch no longer applies to current sip releases, which aborts the package build. The patch is rebased and cut down to one line of context. It sets its default in a separate statement instead of inside the Config literal, so realigning that literal upstream no longer touches the hunk. sip has read its version from a link-time variable since v1.3.0, so the build passes it through -ldflags; without it the binary reports 0.0.0-dev.
psrpc's handler run loop reads a closed subscription channel as a nil message and selects again, spinning until the handler's close finishes. The loop exists since psrpc b01a52a and is still in v0.8.0 (latest) and in the v0.7.7 livekit v1.13.7 requires. This loop is specially active on meeting ends, healthcheck disconns (webrtc-recorder) and livekit-sip shutdowns. With our livekit-server running under CPUSchedulingPolicy=fifo, it becomes harder to preempt the spinning loop above, so the closers never run again, CPU pegs and stuff breaks. Setting the closed channel to nil disables its select case and removes the spin. Pinning psrpc v0.7.6 only makes it rarer, and gives up the shutdown fixes livekit took v0.7.7 for. The build copies psrpc v0.7.7 into third_party/, applies closed-channel-loop_psrpc.patch and replaces the module with the copy. We'll report this upstream and have it fixed there. Build has a trigger to break if LK upgrades to a newer psrpc version - intentional so we make sure to fix this upstream.
Both livekit-server and livekit-sip ignore a failed yq merge in ExecStartPre, so the binary starts on an empty config. Applications will refuse to start (correctly so), but that leads to a restart loop due to the Restart=always policy and eventual failure due to retry exhaustion. Both inefficient and obfuscates the actual failure cause. Remove the '-' prefix from both their ExecStartPre merge commands so it fails on config-merge time and the error properly bubbles up to journald.
log_level was deprecated and is not a thing anymore in livekit-sip. Change the pkg's default config file to use logging.level instead.
We've previously discussed whether rtp-port-usage-robustness should be
activated by default and decided against it in <= 3.0 as it was still
the default media server (ie high volume) with a sectioned UDP range (ie
collision was not a thing).
In 4.0, this changes in two ways:
- FS is not default. In a default setup, it may only be used in a low
volume role of a bundled call gateway to livekit-sip. So we have no
feasible overhead from using the rtp-port-usage-robustness feature.
- FS, not being default, doesn't have a dedicated UDP range anymore
(it is shared with livekit-sip).
Enable rtp-port-usage-robustness so that FS tests each UDP port before
binding them to prevent collision issues.
…fig key
Two issues:
- Latest livekit-sip versions use a different config key for RTP port
range configs (rtp_port: [range] rather than the port_start/end)
- We do not configure a port range by default, which just makes for an
extra manual config step when enabling dial-in
Put livekit-sip in the default UDP range out of the box and adjust docs
Adjust the config key to use new `rtp_port: rangeStart-rangeEnd format`
in docs.
livekit-client 2.20.2 changes its default camera degradation preference from balanced to maintain-framerate. We want to preserve the old default as resolution has greater value for us than framerate. Pin camera degradation options to balanced. This is still overridable via settings.yml/client configs.
The audio bridge recognises a fatal publish timeout by matching "timed out" in a ConnectionError's message. This is from a time where the SDK didn't really wrap all timeout errors as Timeout error types. This has changed on recent versions. Check for ConnectionErrorReason.Timeout instead when detecting fatal publish timeout errors as livekit-client builds all of them through that type.
While reviewing LK defaults post-tooling updates, I noticed that the mic publish profile is defined three times with varying configs. Everything should be faithful to what settings.yml defines first - including the fallback (in relation to the versioned settings). Put the versioned settings.yml pub profile in a constant in the initial values util and make the bridge fall back to it.
Bump livekit-client to 2.22.3 up from 2.19.0. Bump @livekit/components-react to 2.9.24 up from 2.9.19. Note: [email protected] depends on Object.hasOwn via a 3rd party dep. Deps are not transpiled by default, so this breaks the client in browsers that lack support for it (Chrome < 93, FF < 92, Safari < 15.4). Polyfill it manually in main.html for the browsers that do not support it.
…ersion to 14.1 [email protected] depends on WeakRef availability. I could not get this to be polyfilled, and it is needed. The floor I found for this is Safari < 14.1, which is circa iOS 14 (EOL 2021). Test for WeakRef availability and consequently raise the minimum Safari floor to 14.1.
Lock Share microphone rejoins the second attendee's audio right after the moderator unlocks them. The unlock reaches that attendee through a forced GraphQL reconnection a few hundred ms later, so when the Join Audio click comes first the audio modal still sees the lock, joins listen-only and closes before the test can find it. The test now waits for the attendee's unmute button to be enabled, which reads the same lock state the modal does, before leaving and rejoining audio.
v2.25.0-beta.3 --- * feat(livekit): add the livekit.requestTimeout config * fix(livekit): name masked SIP callers that send no caller ID * fix(livekit): return 'unknown' when SDK track name conversion fails * fix(livekit): incorrect screen share track source check * build: [email protected] (up from 2.15.5) * build: @livekit/[email protected] (up from 0.13.33) * chore: npm audit fix
The client imports webrtc-adapter in meetingClient.jsx only for its global shims. This was mainly used when kurento-client (dropped in 3.0) and SIP.js (dropped in 4.0) were a thing. No reason for a direct import anymore as far as the bbb-webrtc-sfu bridge is concerned. livekit-client has its own version of webrtc-adapter which is handled by in that dep, so it does not require a direct import. Remove the import and the _direct_ dependency.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (22)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe changes update Safari support checks and guidance, revise LiveKit audio and camera publishing settings, and remove the HTML5 client’s Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The compatibility, media publishing, and packaging updates have no established merge-blocking issue. Merge after normal build and test checks, respecting the updated Safari and iOS minimum versions. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The inspected changes do not establish a new authorization bypass or cross-room media exposure. Existing room ownership and microphone mute controls remain present, while startup now stops when configuration generation fails. Risk remains low rather than minimal because upgraded dependency behavior, deployed SIP controls, and recovery under interrupted upgrades were not fully verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚨 Automated tests failed |
7b21831
into
bigbluebutton:v4.0.x-develop
Closes #23363. The per-user client parameters were documented under Administration > Customize > "Passing user metadata to the client on join", a table that said it was "accurate as of BigBlueButton 2.2.17". They are join parameters, so they now live with the join call in development/api.md, in a "User metadata parameters" section with the same eight category tables; the join parameter table gets a userdata-* row and the getJoinUrl row links to the list (one list, linked from both calls, as g-v-egidy asked). The customize page keeps the heading as a pointer so existing links still land somewhere useful, with the custom-CSS example left under it; release-testing.md is relinked. The section also gains the introduction the old page never had: what userdata- is (the per-user counterpart of meta_), the name rule bbb-web applies (getUserCustomData splits on "-" and drops names with a second hyphen), where the values go (client, akka-apps, the userdata attribute of ParticipantJoinEvent, inherited by breakout rooms), that the bbb_ prefix is reserved for BigBlueButton (kepstin's point on the issue), that the client JSON-parses each value so arrays need double quotes, and how getJoinUrlUserdataBlocklist filters them for viewers. Every row was checked against settings.yml and the code that reads it (getFromUserSettings callers in the client, userMetadata in akka-apps): - defaults corrected: bbb_auto_join_audio, bbb_direct_leave_button, bbb_mirror_own_webcam, bbb_transparent_listen_only and bbb_force_restore_presentation_on_new_events are true, not false; bbb_show_session_details_on_join is false, not null; - bbb_enable_video had its sense inverted ("false ... will display"); - bbb_listen_only_mode and bbb_transparent_listen_only are only read by the fullaudio (sfu) bridge; LiveKit ignores both; - bbb_skip_echotest_if_previous_device is ignored on mobile; - bbb_transcription_provider: vosk dropped, the client only tells webspeech and gladia apart; - bbb_presenter_tools / bbb_multi_user_tools: the 29 ids from settings.yml instead of 8 plus "*more", and the example no longer uses single quotes (not JSON, the client keeps the raw string); - bbb_shortcuts: the 12 descId values listed; - bbb_parent_room_moderator: nothing reads it in 4.0; it is set by BreakoutApp2x on breakout join URLs and documented as such; - bbb_fullaudio_bridge, bbb_auto_swap_layout, bbb_hide_presentation removed, read nowhere in the client (the last two were already marked "Removed in 2.6"); - the default column also names the settings.yml key each parameter overrides. Overlaps #26074, which edits the same customize.md table; this commit makes the same corrections before moving the table, so the second to land rebases customize.md keeping the moved version. npx docusaurus build passes with the pre-existing configure-firewall link (from #25912) patched locally; none of the reported broken anchors involve the headings added or moved here.
* docs: doc sync for 4.0 since 4.0.0-rc.5 Range v4.0.0-rc.5..v4.0.x-develop 0f90159 (52 commits). No changes to bigbluebutton.properties, settings.yml, akka-apps application.conf, ApiParams, the create/join tables, resources.xml or bbb-conf. The Grails 8 upgrade (#25466) brought its own docs; its "Upgraded components" list was checked against the Spring Boot 4.1.1 and Grails 8.0.0 BOMs and the build files (Spring Framework 7.0.9, Groovy 5.1.3, Tomcat 11.0.26, Gradle 9.8.0). administration/customize.md, "Configuration of gladia.io": - #26010 moved bbb-transcription-controller from v0.2.10 to v0.4.0, which talks to Gladia's v2 live API and reads the key from gladia.key (gladia-proxy.js); nothing reads x_gladia_key in gladia.startMessage any more, so the documented command left the server without a key. Set gladia.key instead, and drop the "3.0 or higher, use >0.3.x" paragraph and its startMessage (bit_depth and endpointing are now gladia.bitDepth and gladia.endpointing). Mention the translation options. - Warn that the package's after-install.sh copies default.example.yml over default.yml on every install and upgrade, and every BigBlueButton upgrade reinstalls the package (its version comes from bigbluebutton-release). That removes the key and the ESL password bbb-conf --setip writes, and the service then crash-loops with "FSESL connection authentication error". - Say up front which service applies: 4.0 defaults to the LiveKit audio bridge, where bbb-livekit-stt (not packaged; uv or Docker) does the work; bbb-transcription-controller forks audio from FreeSWITCH and only covers audioBridge=bbb-webrtc-sfu. The client settings (audioCaptions enabled, provider gladia) apply to both: bbb-livekit-stt starts on the speech-locale event that carries the provider. new-features.md: - "bbb-transcription-controller 0.4.0 (Gladia v2)" under Other notable changes, as the upgrade note for the above (rc.1 to rc.5 shipped v0.2.10). - "Learning Dashboard: polls and quizzes numbered in the order they were asked" (#25988): untitled polls are numbered chronologically, the header tooltip shows when they were asked, and the Download Session Data CSV uses the same order. Not documented: the UI fixes (#25942, #25993, #25974), the recording panzoom fix (#25991), the bbb-ui-components-react and MUI bumps, the pres-checker build cleanup, the Tomcat parameter limit and upload limits (moved to Spring Boot keys in bbb-web's application.properties with the same values), and the Jackson string limit (raised and dropped again). (cherry picked from commit bcaed58) * docs: iteration doc sync for 4.0.1 Documents the v4.0.0..v4.0.x-develop (cd89568) delta that the per-PR docs commits in the range did not cover. new-features.md - Usability: "Live captions transcribed on the user's device" for public.app.audioCaptions.speechProcessing (#26179) - Dedicated Audio settings tab: the processing pick is now scoped to the browser session and the meeting, public.app.audioFilterStorage (#25744) - Behind the scenes: fewer video-grid re-renders (#26096), lock settings changes without reconnecting viewers (#26004), client modals on BBBModal (#25829), bbb-web Grails 2 cleanup (#26002) - Media: "Last-N audio for the LiveKit bridge (experimental)" (#26211) - Other notable changes: component versions in 4.0.1 (LiveKit stack #25912, bbb-webrtc-recorder 0.18.0, bbb-webrtc-sfu 2.25.0-beta.3, bbb-playback 5.4.8, Tomcat 11.0.27 #26241, Gradle 9.8.1 #26259, FreeSWITCH rtp-port-usage-robustness, livekit-sip rtp_port default), minimum Safari 14.1 (WeakRef, #25912), password-protected Redis for bbb-graphql-actions (#26110) - Upgraded components list: Gradle 9.8.1, Tomcat 11.0.27 - Recent releases: 4.0.1 (the tag does not exist yet) - Client settings / Added: speechProcessing, audioFilterStorage, public.chat.announceUserAwayStatusInChat (#26090), public.media.livekit.selectiveSubscription.lastN; the existing paginationToggleModeratorOnly bullet is tagged 4.0.1 customize.md - speechProcessing was added in 4.0.1, not 4.0 - Advanced Filtering: paragraph on audioFilterStorage - Audio: new section "Play only the most relevant microphones (Last-N)" api.md - New "Updated in 4.0.1" block. The userdata-bbb_parent_room_moderator removal (#26087) moves there from the 4.0 block: it landed after v4.0.0. Left out on purpose: fixes (#26269, #26250, #26118, #26085, #26212 and the rest), the presenter authorization change (#25887), test/CI work and dependency bumps belong in the release notes, not in the docs. akka-apps application.conf, ApiParams.java and LockSettingsParams.java did not change in the range. * docs: keep the 4.0.1 join note in the 4.0 block, drop four sections api.md - userdata-bbb_parent_room_moderator stays in the 4.0 "Removed parameters" line, marked "removed in 4.0.1", instead of a separate "Updated in 4.0.1" block. new-features.md - Drop the 4.0.1 "Behind the scenes" subsections (video-grid re-renders, lock settings without reconnects, BBBModal, bbb-web cleanup): release-notes material, not documentation. - Drop "Learning Dashboard: polls and quizzes numbered in the order they were asked", carried over from the rc.5 sync. * docs: drop the "Other notable changes" entries added for 4.0.1 new-features.md - Drop "Component versions in 4.0.1", "Minimum Safari version is 14.1", "Password-protected Redis for bbb-graphql-actions" and the "bbb-transcription-controller 0.4.0 (Gladia v2)" note carried over from the rc.5 sync. The Safari floor and the Redis password are already documented on their own pages; the version bumps belong in the release notes. * docs: drop the customize.md changes from the 4.0.1 sync customize.md - Back to its v4.0.x-develop content: no Last-N section, no audioFilterStorage paragraph, speechProcessing stays "added in 4.0", and the Gladia v2 edits from the rc.5 sync cherry-pick are gone too. new-features.md - The Last-N section no longer links to the dropped customize.md section; the client-settings bullet still links to it.
The livekit-sip note added in 8aebd60 (#25912) links to /administration/configure-firewall. That is the page's file name and id, not its URL: configure-firewall.md sets slug: /administration/firewall-configuration, which is what install.md and troubleshooting.md already link to. Docusaurus throws on broken links (onBrokenLinks), so `docusaurus build` fails with "Broken link on source page path = /administration/customize/". Since #26058 brought the note to v4.0.x-release on 2026-10-28, the "Build and Deploy Docs" workflow fails too, because its build.sh builds the 4.0 version of the site from that branch, so docs.bigbluebutton.org has not been updated since then. Pull requests do not catch this because no PR workflow runs the docs build. v4.1.x-develop has the same link in a reworded line. The next v4.0.x-develop merge into it takes this line from 4.0 without a conflict, so the fix carries over there.
No pull request workflow builds the docs: automated-tests.yml ignores docs/** and **/*.md, and deploy-docs.yml only runs on pushes to develop. The broken link from #25912 was found only after it reached v4.0.x-release and the docs deploy failed. The new workflow runs `npm run build` in docs/ on pull requests that touch docs/ or the workflow, and on demand. With the stricter config it fails on broken links, anchors, markdown links and images, and duplicate routes. It builds this branch's docs alone, without the other versions, so the archived branches cannot fail it. Node 24 and the action versions match deploy-docs.yml on develop.
No pull request workflow builds the docs: automated-tests.yml ignores docs/** and **/*.md, and deploy-docs.yml only runs on pushes to develop. On v4.0.x the broken link from #25912 was found only after it reached the release branch and the docs deploy failed. The new workflow runs `npm run build` in docs/ on pull requests that touch docs/ or the workflow, and on demand. With the stricter config it fails on broken links, anchors, markdown links and images, and duplicate routes. It builds this branch's docs alone, without the other versions, so the archived branches cannot fail it. Node 24 and the action versions match deploy-docs.yml on develop.
What does this PR do?
Note: this bumps the minimum accepted Safari version to 14.1 (up from 14.0)
Note: bbb-webrtc-recorder is intentionally left out of this round. Ongoing work,
should keep working as is and required very significant upgrades that I'm still testing.
Upgrades the LiveKit stack BBB ships and adapts packaging, client and docs to it. See:
In detail:
Bumps and dependency changes
adapted to the latest livekit-sip version
Reasons for that are long gone (kurento-client/SIP.js)
Adaptations
which livekit-server v1.13.7 requires, makes the it fire on nearly every
handler close. Our unit runs livekit-server under
CPUSchedulingPolicy=fifo,where the spin is hard to preempt, so CPU pegs.
purpose once livekit-server moves off psrpc v0.7.7, so the patch is
revisited against upstream (i.e.: I'm forcing myself to not keep this around forever)
log_level->logging.levelrtp_port: 16384-32768, the range the other mediaservers share. Enabling dial-in no longer needs a manual port-range step.
rtp_port: <START>-<END>form current livekit-sip reads.maintain-framerate.balanced, because resolution matters more than framerate here.ConnectionErrorReason.Timeoutinstead of matching"timed out" in the message. Current livekit-client raises every timeout through
that reason.
WeakRef, which Safari 14.0 and iOS < 14.5 lack,and which has no adequate polyfill.
General build/install fixes
livekit-sip, which does nothing on a running unit. An upgrade left the old sip
process running on its old config.
yqmerge inExecStartPreand started on an empty config. The binaries refuse that config, soRestart=alwayslooped until retry exhaustion and hid the cause.It is now one constant, mirroring
settings.yml, and the audio bridge falls backto it.
Closes Issue(s)
None
Motivation
BBB's LiveKit components are several releases behind upstream.
More
rtp_portoverrides: an override in/etc/bigbluebutton/livekit-sip.yamlmust be a singleSTART-ENDstring. livekit-sip ignores the mapping form without a warning and falls back to 10000-20000.rtc.use_external_ip: true, livekit-server >= 1.10 changes behavior significantly and I no longer recommend using that.use_external_ip: falseandnode_ip: <public IPv4>before upgrading. livekit-server 1.9 accepts both keys.livekit.yaml(use_external_ip: false) is unaffected.