WebRTC audio call fails with "codec collision" (payload_type 111, stereo/non-stereo Opus) — works fine in Chromium-based Edge on the same system
- Dominant language
- C++
- Stars
- 123k
- Forks
- 17.5k
- Avg merge
- 14h 28m
- Merged PRs (30d)
- 870
Description
### Preflight Checklist
- [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [x] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.
### Electron Version
Reproduced on both:
- 39.8.10 (Arch/Manjaro `electron39` package)
- 43.6.0 (Arch/Manjaro `electron43` package, bundled Chromium 150.0.7871.250)
### What operating system(s) are you using?
Other Linux
### Operating System Version
Manjaro Linux, kernel 6.18.49-1-MANJARO, Wayland session (KDE Plasma), PipeWire audio.
### What arch are you using?
x64
### Last Known Working Electron version
Unknown — reproduces identically in two Electron majors 4 versions apart (39 and 43), so likely not a recent regression.
### Does the issue also appear in Chromium / Google Chrome?
I don't know how to test
### Expected Behavior
A WebRTC audio call (Google Chat / Google Meet) negotiates a valid SDP and connects, as it does in a real Chromium-based browser (Microsoft Edge stable) on the exact same machine, same OS session, same audio devices.
### Actual Behavior
The call fails to connect. Chromium's WebRTC stack logs a codec collision and the call layer reports a disconnect:
\`\`\`
[ERROR:third_party/webrtc/pc/sdp_offer_answer.cc:575] A BUNDLE group contains a codec collision between
{payload_type: 111, codec: {mime_type: audio/opus, clock_rate: 48000, num_channels: 2, parameters: {minptime: 10, stereo: 1, useinbandfec: 1}}}
and
{payload_type: 111, codec: {mime_type: audio/opus, clock_rate: 48000, num_channels: 2, parameters: {minptime: 10, useinbandfec: 1}}}.
All codecs must share the same type, encoding name, clock rate and parameters. (INVALID_PARAMETER)
\`\`\`
Two Opus codec entries for the same payload type (111) are generated — one advertising `stereo=1`, one without it — which is an invalid/self-contradictory SDP. The calling web app (Google Chat/Meet) then reports the peer connection as disconnected (`DisconnectedError`, various `EndCause`/`StartupCode` combinations depending on how far initialization got).
### Testcase Gist URL
No minimal repro gist yet — this only reproduces against a live Google Chat/Meet call (a real-world WebRTC service doing its own SDP munging), not a synthetic getUserMedia+RTCPeerConnection testcase. Happy to help build one if a maintainer can point to what would be useful (e.g. a two-peer local repro that forces a `stereo=1`/no-`stereo` transceiver pair on the same m-line).
### Additional Information
- Confirmed NOT reproducible in Microsoft Edge (Chromium-based, not Electron) on the exact same machine, same session, same audio devices, same call — rules out a system/PipeWire/audio-device-specific cause.
- Confirmed independent of which audio input device is selected (tested with two different physical microphones — same collision both times).
- Possibly related to Electron's Linux builds not shipping with the same PipeWire integration as stock Chromium/Chrome/Edge builds (see #29115) — mentioning in case that's a relevant lead for maintainers, though that issue was specifically about screen-share, not general audio/call codec negotiation.
- Audio setup: PipeWire, one active USB microphone tested at a time (Logitech A50 USB headset in `mono-fallback` PipeWire profile, and separately a Creative Live! Cam webcam mic in `analog-stereo` profile) — both trigger the identical collision.
Contributor guide
Research direction
Start by reproducing the live Google Chat or Meet call on Electron 39 or 43 and inspect the WebRTC log at third_party/webrtc/pc/sdp_offer_answer.cc:575. Compare the generated SDP and codec entries with the working Chromium-based Edge case; done means the duplicate payload type 111 Opus collision is absent and the call connects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, electron, linux
- Domain
- audio-video-rtc, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100