Bug 2231134

Summary: Screencasting Broken
Product: [Fedora] Fedora Reporter: matt.bagnara
Component: xdg-desktop-portal-wlrAssignee: Aleksei Bavshin <alebastr89>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: alebastr89, sway-sig
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description matt.bagnara 2023-08-10 17:40:37 UTC
Screencasting is broken on:
xdg-desktop-portal-wlr-0.7.0-1.fc38.x86_64
wireplumber-0.4.14-1.fc38.x86_64
firefox-116.0-2.fc38.x86_64

I enabled verbosity on the xdg-desktop-portal-wlr service and using the https://mozilla.github.io/webrtc-landing/gum_test.html page in Firefox I attempt to start a screencast:

The following logs of the xdg-desktop-portal-wlr unit
```
Aug 10 09:26:59 fedora xdg-desktop-portal-wlr[7863]: 2023/08/10 09:26:59 [INFO] - xdpw: screencast instance 0x559ea434e280 has 1 references
Aug 10 09:26:59 fedora xdg-desktop-portal-wlr[7863]: 2023/08/10 09:26:59 [INFO] - xdpw: 1 active screencast instances
Aug 10 09:26:59 fedora xdg-desktop-portal-wlr[7863]: 2023/08/10 09:26:59 [INFO] - wlroots: output: eDP-1
Aug 10 09:26:59 fedora xdg-desktop-portal-wlr[7863]: 2023/08/10 09:26:59 [INFO] - dbus: session closed
Aug 10 09:26:59 fedora xdg-desktop-portal-wlr[7863]: 2023/08/10 09:26:59 [DEBUG] - dbus: destroying session 0x559ea434da50
Aug 10 09:26:59 fedora xdg-desktop-portal-wlr[7863]: 2023/08/10 09:26:59 [DEBUG] - xdpw: screencast instance 0x559ea434e280 now has 0 references
Aug 10 09:26:59 fedora xdg-desktop-portal-wlr[7863]: 2023/08/10 09:26:59 [DEBUG] - xdpw: destroying cast instance
```

The screnceast is created and destroyed immediately. There are no relevant logs in the firefox log either

Reproducible: Always

Steps to Reproduce:
1. Launch https://mozilla.github.io/webrtc-landing/gum_test.html
2. Select screen capture
3. Start screen capture
Actual Results:  
Screencapture starts and destroys immediatly