<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>9.0.0-beta.24</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>macOS Mojave 10.14.6</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>7.1.11</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Application builds without issues</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Errors in console and build fails</p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">Only electron version was changed from  <strong>7.1.11</strong> to <strong>9.0.0-beta.24</strong>. This leads to failing in build process</p>
<p dir="auto">Console build error:<br>
signing         file=dist/mac/App.app identityName=Apple Development: <a href="mailto:user@gmail.com">user@gmail.com</a> (111111) identityHash=222222 provisioningProfile=none<br>
Command failed: codesign --sign 22222222 --force --timestamp --options runtime --entitlements /Users/user//entitlements.mac.inherit.plist /Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework<br>
/Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework: code object is not signed at all<br>
In subcomponent: /Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Helpers/chrome_crashpad_handler<br>
stackTrace=                                                                                                                                                                                       Error: Command failed: codesign --sign 2222222 --force --timestamp --options runtime --entitlements /Users/user//entitlements.mac.inherit.plist /Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework<br>
/Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework: code object is not signed at all<br>
In subcomponent: /Users/user//mac/App.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Helpers/chrome_crashpad_handler<br>
at ChildProcess.exithandler (child_process.js:289:12)<br>
at ChildProcess.emit (events.js:182:13)<br>
at maybeClose (internal/child_process.js:961:16)<br>
at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)<br>
From previous event:<br>
at runCallback (timers.js:693:18)<br>
at tryOnImmediate (timers.js:664:5)<br>
at processImmediate (timers.js:646:5)<br>
From previous event:<br>
at MacPackager.signApp (/Users/user//node_modules/app-builder-lib/src/macPackager.ts:329:27)<br>
at MacPackager.doPack (/Users/user//node_modules/app-builder-lib/src/platformPackager.ts:244:16)<br>
npm ERR! code ELIFECYCLE<br>
npm ERR! errno 1</p>
<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/main/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">16</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">Other Linux</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">Any Linux on Wayland</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">x64</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto">v15.3.3</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Screencasting works with one working PipeWire/Portal dialog as in previous releases.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">When screencasting with an app on Electron 16 duplicate PipeWire/portal prompts are shown. This specific issue does not occur with Chromium 96 (upstream to Electron 16), or in Electron 15.</p>
<p dir="auto">Tested on Jitsi Meet Electron (now Electron 16) and this <a href="https://github.com/hokein/electron-sample-apps/tree/master/desktop-capture">demo app</a>.</p>
<p dir="auto">In Jitsi Meet Electron there is an endless loop of prompts <a href="https://github.com/jitsi/jitsi-meet-electron/issues/677#issue-1068967622" data-hovercard-type="issue" data-hovercard-url="/jitsi/jitsi-meet-electron/issues/677/hovercard">as shown here</a>. The many prompts can also lead to <a href="https://github.com/jitsi/jitsi-meet-electron/issues/677#issuecomment-986197541" data-hovercard-type="issue" data-hovercard-url="/jitsi/jitsi-meet-electron/issues/677/hovercard">crashes</a> (possibly due to the portal being overwhelmed).</p>
<p dir="auto">In <a href="https://user-images.githubusercontent.com/38842733/144923535-ce9f6545-5ac3-4c59-95b2-adba8d1ee750.mp4" rel="nofollow">the demo app</a> I only see up to 2 portal prompts, but typically only one is usable at a time, and even after accepting both prompts it's not guaranteed to work.</p>
<p dir="auto">This was reported on both GNOME and KDE Plasma Wayland.</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">Note: This is a different issue than <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="976002953" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/30652" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/30652/hovercard" href="https://github.com/electron/electron/issues/30652">#30652</a>. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="976002953" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/30652" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/30652/hovercard" href="https://github.com/electron/electron/issues/30652">#30652</a> is about the app itself creating an unnecessary dialog. With <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="976002953" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/30652" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/30652/hovercard" href="https://github.com/electron/electron/issues/30652">#30652</a> screencasting is still reasonably usable. However, this issue effectively makes screencasting unusable (depending on the app it seems).</p>
<p dir="auto">Test demo with Electron 16:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone https://github.com/hokein/electron-sample-apps
npm install -g electron@16
electron ./electron-sample-apps/desktop-capture --enable-features=WebRTCPipeWireCapturer"><pre class="notranslate"><code class="notranslate">git clone https://github.com/hokein/electron-sample-apps
npm install -g electron@16
electron ./electron-sample-apps/desktop-capture --enable-features=WebRTCPipeWireCapturer
</code></pre></div>
<p dir="auto">Electron 15 instead:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm install -g electron@15
electron ./electron-sample-apps/desktop-capture --enable-features=WebRTCPipeWireCapturer"><pre class="notranslate"><code class="notranslate">npm install -g electron@15
electron ./electron-sample-apps/desktop-capture --enable-features=WebRTCPipeWireCapturer
</code></pre></div>
<p dir="auto">With Jitsi Meet Electron simply install it (e.g. with Flatpak), start a new meeting and screen share.</p>