Closed Bug 1731495 Opened 3 years ago Closed 3 years ago

xdg-desktop-portal 1.10.0 breaks pipewire support

Categories

(Core :: WebRTC, defect)

Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox93 --- fixed
firefox94 --- fixed

People

(Reporter: heftig, Assigned: heftig)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

See a fix for this issue in OBS: https://github.com/obsproject/obs-studio/commit/ef0540c0d7df64b6cb148c80d566281a4ff3ba5c

In the response for the session create request, the type for the "session_handle" field was changed from "s" to "o" to match the documentation. Unfortunately, this now causes clients that do typechecks to fail.

Since xdg-desktop-portal 1.10.0, the type is "o" (an object path string)
instead of "s" (a normal string). g_variant_lookup fails if the type
doesn't match exactly, even though both are strings.

Use g_variant_lookup_value to get the field value, telling it not to
typecheck. Use g_variant_dup_string to extract the string, which doesn't
care about the exact type, so this code should work with all versions of
xdg-desktop-portal.

Following a similar fix to OBS, see
https://github.com/obsproject/obs-studio/commit/ef0540c0d7df.

Assignee: nobody → jan.steffens
Status: NEW → ASSIGNED

Try build WFM, xdg-desktop-portal 1.10.0, Arch Linux.

Martin, you may want to forward port this on Fedora >=35

Flags: needinfo?(stransky)
Pushed by robert.mader@posteo.de:
https://hg.mozilla.org/integration/autoland/rev/21f27a8573cb
Don't typecheck the pipewire session_handle. r=rmader
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

Could this be backported? It'll break screen sharing for many of us on Wayland sessions. Not updating xdg-desktop-portal is not a realistic workaround on a rolling release distro.

Comment on attachment 9241975 [details]
Bug 1731495 - Don't typecheck the pipewire session_handle. r?rmader

Beta/Release Uplift Approval Request

  • User impact if declined: Users with a recent version of xdg-desktop-portal (Arch, beta versions of Fedora or Ubuntu) will have broken screen sharing on Wayland.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Only Wayland screen sharing is affected, equivalent patches are used in other software such as upstream Chrome and OBS Studio.
  • String changes made/needed:
Attachment #9241975 - Flags: approval-mozilla-beta?

Comment on attachment 9241975 [details]
Bug 1731495 - Don't typecheck the pipewire session_handle. r?rmader

The impact is important for the users affected and we don't officially ship Wayland ourselves so that seems not risky, approved for 93 beta 8, thanks.

Attachment #9241975 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Thanks, I think 93 is fine.

Flags: needinfo?(stransky)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: