Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when sharing screen on 1:1 calls #334

Closed
yajo opened this issue Feb 7, 2023 · 11 comments
Closed

Crash when sharing screen on 1:1 calls #334

yajo opened this issue Feb 7, 2023 · 11 comments

Comments

@yajo
Copy link

yajo commented Feb 7, 2023

Hello friends!

After a lot of time without any issues on Element calls, it turns out that recently it started crashing when I attempt to share the screen in a 1:1 call.

I don't know very well how to diagnose this.

System: Fedora Linux 37.20230115.0 (Silverblue), wayland, GNOME 43.2, AMD Radeon™ Graphics.

@telometto
Copy link

telometto commented Feb 12, 2023

Same issue here; same hw.

Here's the last output from running flatpak run im.riot.Riot and trying to share screen:

...
...
** (process:44414): WARNING **: 21:28:22.440: Error writing credentials to socket: Error sending message: Broken pipe
/app/bin/element: line 16:     3 Segmentation fault      (core dumped) env TMPDIR="$XDG_RUNTIME_DIR/app/${FLATPAK_ID:-im.riot.Riot}" zypak-wrapper /app/Element/element-desktop $FLAGS "$@"

@jessicarod7
Copy link

Did this issue start occuring in the last two weeks? It may be related to the changes in #325 (in which case I need to update #337)

@telometto
Copy link

@cam-rod I'm not entirely sure, but not long ago it used to work fine. You could be right about the time frame, but I cannot answer with 100% certainty.

@yajo
Copy link
Author

yajo commented Feb 13, 2023

It stopped working long before. I followed this procedure:

➤ flatpak remote-info --log flathub im.riot.Riot 
          ID: im.riot.Riot
  Referencia: app/im.riot.Riot/x86_64/stable
Arquitectura: x86_64
        Rama: stable
   Colección: org.flathub.Stable
    Descarga: 118,0 MB
   Instalada: 297,7 MB
     Runtime: org.freedesktop.Platform/x86_64/22.08
         Sdk: org.freedesktop.Sdk/x86_64/22.08

      Commit: d3ceae47addf2d3a45e569c1a9ca4cb80d0497af2628ab8936b16885784bc57a
       Padre: c897044b0885b547e76702886039993c2a7fc73a9054ab36b91997b43984814b
      Asunto: Update element-desktop_1.11.20_amd64.deb to 1.11.22 (701e18a4)
       Fecha: 2023-02-03 00:22:34 +0000
   Histórico: 

      Commit: c897044b0885b547e76702886039993c2a7fc73a9054ab36b91997b43984814b
      Asunto: element.sh: Unconditionally enable WebRTCPipeWireCapturer (4de604d6)
       Fecha: 2023-02-02 16:53:49 +0000

      Commit: a2ba54cdc742926e6b99fe248c68e833791478330dde5daa8107457e4832c451
      Asunto: Update element-desktop_1.11.18_amd64.deb to 1.11.20 (44003fd5)
       Fecha: 2023-01-21 01:19:21 +0000

      Commit: 045b87059187f306a8ddae7f193d6494241ef15cbeeb473a1da452cd163371a3
      Asunto: Update element-desktop_1.11.17_amd64.deb to 1.11.18 (c1c2c2c5)
       Fecha: 2023-01-19 17:13:44 +0000

      Commit: ea6cb2947ca7435c512ebeb0a895f863f85a46ecdb5c1077eed717e4e6ebf370
      Asunto: Update element-desktop_1.11.16_amd64.deb to 1.11.17 (328e8659)
       Fecha: 2022-12-26 12:55:27 +0000

      Commit: 9bd0c958912a8187b019b3a11260da2e6c241b92a6e570fd0efc8b2f53186310
      Asunto: Update element-desktop_1.11.15_amd64.deb to 1.11.16 (7a978516)
       Fecha: 2022-12-07 08:14:35 +0000

      Commit: ec731245fd6e7ea473e41f1e756edf0d856985780ea4c3a23100bb316714b25b
      Asunto: Update element-desktop_1.11.14_amd64.deb to 1.11.15 (142cced5)
       Fecha: 2022-11-22 14:59:10 +0000

      Commit: 524e682fc42190a4536e27ea68fe170c88bf31198e7c687191c5915c981d5c5f
      Asunto: Update element-desktop_1.11.13_amd64.deb to 1.11.14 (ccc2f570)
       Fecha: 2022-11-08 22:57:57 +0000

      Commit: 8049c17aff993279fc4da0093f2df01f9f5d26672e4a17a0ee21227ea62c0f64
      Asunto: Update element-desktop_1.11.12_amd64.deb to 1.11.13 (779e29a5)
       Fecha: 2022-11-02 02:55:07 +0000

You can downgrade to the last version that worked properly with this (add sudo if installed system-wide):

flatpak update --commit 9bd0c958912a8187b019b3a11260da2e6c241b92a6e570fd0efc8b2f53186310 im.riot.Riot

If you update to the next release (ea6cb2947ca7435c512ebeb0a895f863f85a46ecdb5c1077eed717e4e6ebf370), Element will crash when sharing screen.

To freeze that Element version and make flatpak not update it automatically, run this:

flatpak mask im.riot.Riot

@yajo
Copy link
Author

yajo commented Feb 13, 2023

I updated my comment #334 (comment) because I got misleaded by the fact that upstream screen sharing got broken in 1.11.15 as you can see in element-hq/element-web#23808. In reality, for the flaptak, the last working release was 1.11.16.

The commit range where the failure exists is this one. Weird, it's just a normal package update. I hope this can help to see what changed upstream that broke the package!

Data from upstream in 1.11.17. Something there must have broken this package:

@jessicarod7
Copy link

Weird. I don't have time to look into it, but hopefully it can be isolated to the WebRTC configuration.

@byquanton
Copy link

No longer Crashes with #387 🥳
(But it may open too many Screen sharing Portals)

@byquanton
Copy link

@yajo can you close this issue as it is resolved now?

@yajo
Copy link
Author

yajo commented Aug 21, 2023

Using GNOME 44.3 wayland I get tens of dialogs asking me to give screen share permissions. If I cancel some of those, it manages to crash. But if I'm fast enough sharing the screen, I can finally share it. The UX is very 💩 still, but at least I can make it work.

@byquanton
Copy link

byquanton commented Aug 21, 2023

electron/electron#39111 (comment)
→ The issue with the separate dialogs is fixed in the development Version of Electron, but not yet backported.
And the new dialogs opening is probably this in DesktopCapturerSourcePicker.tsx

        // We update the sources every 500ms to get newer thumbnails
        this.interval = window.setInterval(async (): Promise<void> => {
            this.setState({
                sources: await getDesktopCapturerSources(),
            });
        }, 500);

@yajo
Copy link
Author

yajo commented Aug 22, 2023

I opened element-hq/element-web#26014 but they told me this must be fixed downstream.

Indeed that code seems to be what opens the dialogs in loop. Maybe we could add a patch here to avoid that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants