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

Microsoft Teams crashes when sharing screen under Wayland #23063

Closed
3 tasks done
MightyCreak opened this issue Apr 9, 2020 · 55 comments
Closed
3 tasks done

Microsoft Teams crashes when sharing screen under Wayland #23063

MightyCreak opened this issue Apr 9, 2020 · 55 comments

Comments

@MightyCreak
Copy link

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • N/A (I'm sorry, I can't get to know which version of Electron is used by Microsoft Teams)
  • Operating System:
    • Fedora 31

Expected Behavior

Be able to share my screen in the Teams application.

Actual Behavior

Sharing the screen when on Wayland is actually crashing the Teams application.

To Reproduce

  • Start a session under GNOME (Wayland)
  • Install flatpak package of Teams: flatpak install com.microsoft.Teams
  • Run Teams
  • Start a video call
  • Share your screen
  • Teams crashes and closes

Additional Information

@VerteDinde
Copy link
Member

Hey @MightyCreak! We appreciate you taking the time to report this, but this unfortunately is a Microsoft Teams-specific bug, not an Electron-specific bug, and so is not in our control to fix unless we can get more information from the developers.

You can report the bug to Microsoft Teams directly here: https://docs.microsoft.com/en-us/microsoftteams/platform/feedback

@MightyCreak
Copy link
Author

Hi @VerteDinde from the comment it seems that screen sharing doesn't work with any Electron app on Wayland. I haven't tested another app right that would have this feature, but if this is true, it seems that it would be an Electron bug. Is screen sharing working for Slack when on Wayland for instance?

@danshick
Copy link

Any chance of adding the 'rtc_use_pipewire=true' build flag to support Wayland screen sharing?

@titaniumbones
Copy link

@danshick is that a question for electron or for MS? I'm trying to figure out where I should follow along to track this issue.

@danshick
Copy link

danshick commented May 6, 2020

It's both.

Electron needs a fix and MS needs to build a version of Teams which includes that fix.

As I understand it, the people working on a wayland compatible electron (called electron-ozone) have already added this fix, but electron-ozone itself is not that stable.

Electron doesn't need to wait for ozone to add this fix though. This flag works fine from xwayland, as evidenced by Chromium. Even still, it has to be added, tested, make it into a release, adopted by MS in a build of Teams, and the logic about when to display the screenshare button needs to be updated.

For now, use browser-based Teams in Chromium that supports PipeWire, and set a different user agent so the screenshare button shows up.

@titaniumbones
Copy link

THanks @danshick . Sounds pretty awkward, will maybe just not use the tool :-(

@sashkopavlenko
Copy link

Screen sharing works in unofficial Teams app, which also uses electron.

@titaniumbones
Copy link

@a-pavlenko screen sharing works on wayland? I think the OP and I have both described a bug with the same app you're referring to, so this would be a great new development!

@sashkopavlenko
Copy link

@titaniumbones it seems OP mentioned Teams flatpak app.

Are you sure you are using the unofficial client from the link above? Because that's the only app I got working on Wayland. However, I can share only a window, not the entire screen.

@danshick
Copy link

danshick commented May 20, 2020

I doubt very much that any Electron app is capable of full screen screen sharing on Wayland yet unless you are using electron-ozone or building electron yourself. Electron sharing will work with XWayland windows as well as other Chrome tabs or Electron apps, and this was always the case.

Edit: yeah, looks like they're treating it as an upstream bug/wontfix IsmaelMartinez/teams-for-linux#177

@MightyCreak
Copy link
Author

As @a-pavlenko said, there are two flatpak packages for Teams:

  1. https://flathub.org/apps/details/com.microsoft.Teams (the "most" official one, takes the official Debian package, updated last March)
  2. https://flathub.org/apps/details/com.github.IsmaelMartinez.teams_for_linux (wrap the website in an Electron app, updated last October)

Only the first one is the one used for this issue since it is using the official Debian package made by Microsoft.

@danshick
Copy link

danshick commented May 21, 2020

@MightyCreak Yes, this particular issue relates to the official Teams app only, but neither version will correctly support screen sharing as Electron doesn't build with RTC_USE_PIPEWIRE=true by default. This is true of every electron app using upstream electron at the moment.

Edit: I referenced the non-official version because of the claim that it does support screen casting, as that improperly reflects the nature of the issue.

@btd1337
Copy link

btd1337 commented Jun 19, 2020

After Electron 8.2.2 version the rtc_use_pipewire=true build flag to support Wayland screen sharing.

Reference: #10915

@danshick
Copy link

danshick commented Jun 19, 2020

This is only true in the experimental ozone branch of electron. The issue you point to is still open.

Edit: Specifically, in the AUR build of electron-ozone here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=electron-ozone#n223

@titaniumbones
Copy link

As an end user I just want to be sure I understand the status here: It's not possible to build/install electron-ozone and somehow require teams to use that version? From what I can see the deb package source includes only binaries but wanted to be sure. Thanks!

@danshick
Copy link

That seems like a lot more work than just using the browser based version which can screenshare (assuming you have a browser built with RTC_USE_PIPEWIRE=true).

@SpineEyE
Copy link

Thr browser version only shows one video in conference calls, which is simply not enough. The electron app on Linux also shows only 4 and not 9 or 49, but it's still much better than 1.

@danshick
Copy link

I'd bug MS about that. Maybe try faking your user agent? I find it unacceptable that software would behave differently in different browsers and OSes.

Regardless, I very much doubt it is worth trying to get the packaged Teams app to work with a different electron binary. Even if it were open source, it could be non-trivial to build against a different version of Electron.

For instance, I know the electron-ozone folks struggle to run VSCode against their builds.

Most importantly, this issue, as it relates to a change that the electron project can make to better support screensharing in Teams as well as all other electron apps would be to add the appropriate build flag for pipewire in upstream electron.

@klaasjanelzinga
Copy link

klaasjanelzinga commented Oct 1, 2020

Wrt teams, I posted a uservoice on their site for this issue. Please vote :)

https://microsoftteams.uservoice.com/forums/555103-public/suggestions/41524504-screen-sharing-on-wayland

@danshick
Copy link

danshick commented Oct 2, 2020

Wrt teams, I posted a uservoice on their site for this issue. Please vote :)

There's nothing MS can do about this until a fix lands in Electron. I suppose they could contribute one, but it wouldn't necessarily be accepted upstream.

@Ella-0
Copy link

Ella-0 commented Nov 8, 2020

I have the exact same issue when using Ozone with Discord.

@jczaja
Copy link

jczaja commented Dec 4, 2020

I had the same problem (Fedora 32) , once I updated (today) teams to vesion 1.3.00.30857-1.x86_64 problem disappeared.

@bkhl
Copy link

bkhl commented Dec 4, 2020

I had the same problem (Fedora 32) , once I updated (today) teams to vesion 1.3.00.30857-1.x86_64 problem disappeared.

I tried this as well today (also on Fedora 32). I can share presentations without crashes, but I'm not given the option to share my screen.

@klingtnet
Copy link

klingtnet commented Dec 5, 2020

but I'm not given the option to share my screen.

I can second this for Arch Linux running Gnome shell 3.38 under Wayland.
My workaround is to use teams in chromium, which works pretty fine, even with screen sharing. In fact, I do not see any advantage of using the electron app at the moment.

Update: fixed a typo.

@paretje
Copy link

paretje commented Dec 5, 2020

I use a chromium derivative, but I see two reasons to use the electron app:

  1. I get more then one video stream. This makes the webapp unusable to do a call with multiple users involved, especially due to the delay when switching between video streams. Well, except when you need to share your screen, then you need to switch quickly ...
  2. I always get notifications. In my browser I don't seem to get notifications for the current chat, so it frequently happens that someone is speaking to me without me knowing. That might be an issue with my browser (qutebrowser), I didn't really debug it yet.

I would prefer to use my browser, but as the Linux electron app is still lagging behind, being limited to only 4 video streams, I'm not holding my breath for when decent support would land in the webapp ...

@zcbenz
Copy link
Member

zcbenz commented Dec 10, 2020

The build flag is enabled in Electron but the feature itself is disabled by default, can you try if passing --enable-features=WebRTCPipeWireCapturer in command line solves the problem?

@danshick
Copy link

danshick commented Dec 10, 2020

The build flag is enabled in Electron but the feature itself is disabled by default, can you try if passing --enable-features=WebRTCPipeWireCapturer in command line solves the problem?

@zcbenz I'm still getting pre-build flag behavior as of v10.1.5 and I don't see the flag in the code currently (at least not where I'd have thought it should go). Can you let me know if there's a specific version that I should be using?

@marc-bouvier
Copy link

Could there be a relation with why Ubuntu 21.04 default to Wayland will fallback to X.org for nvidia users because of bad wayland nvidia support?
https://www.omgubuntu.co.uk/2021/01/ubuntu-21-04-will-use-wayland-by-default

@bkhl
Copy link

bkhl commented Feb 22, 2021

Don't think so, I get the same thing without any Nvidia hardware in sight.

@electron-triage
Copy link

The Electron version reported on this issue is no longer supported. See our supported versions documentation.

If you're still experiencing this issue on a supported version, please open a new issue with an updated repro - a Fiddle is very appreciated.

Electron has a large issues backlog. To help our team prioritize, we're closing older issues and asking for new issues with updated repro steps if it affects a supported version. This helps sort what issues are still relevant and helps us fix them more quickly.

Thanks for your patience and understanding!

@danshick
Copy link

danshick commented Apr 9, 2021

That's interesting. There's nothing special going on in the flatpak file, so I believe the official Debian package must include support as well.

@richard-riverford
Copy link

I was all excited for a minute! I'm also running Teams 1.4.00.7556, from their RPM repo, but still cannot share my screen. I'm running Fedora 34 Workstation with gnome-shell-40.0-1.

@danshick
Copy link

danshick commented Apr 9, 2021

Hmmm, maybe I missed something in the flathub repo? I didn't see any clever flags or additional build steps or anything, but I may have missed something.

@danshick
Copy link

danshick commented Apr 9, 2021

Looking at the commit history, this is the only screensharing cleverness I found...

flathub/com.microsoft.Teams@d50457e

Everything else for the past couple of months is just bot PRs with new versions of the .deb package.

Edit: Maybe there's something different between the RPM and the DEB package? That'd be a M$ thing though.

@mario-tux
Copy link

I tested Teams 1.4.00.7556 using the AUR package (based on the official .deb package) and the flatpak one. No progress: in recent versions the sharing of windows/screen is not even proposed.
I'm using Arch Linux with Gnome Shell 40 with Wayland.
Can someone else confirm that this version of Teams works on Wayland in sharing the whole screen?

@billybraga
Copy link

I am using wayland on Ubuntu 20.04 and Gnome 3.36.7 and Teams 1.4.00.7556 cannot share my screen.

@dagbdagb
Copy link

dagbdagb commented Apr 9, 2021

Have a look at wf-recorder and v4l2loopback, as described over at Arch. I have not tried myself yet. Looks promising.

@danshick
Copy link

danshick commented Apr 9, 2021

I find the web-based Teams application is sufficient for screen sharing. The wf-recorder/v4l2loopback approach works okay too, but it is not as straight forward to set up. I was about to point out https://github.com/CatxFish/obs-v4l2sink, but it appears OBS now directly supports virtual camera mode. That's nice if you want to composite your webcam on top of your display as well (which wf-recorder can't do).

@vchernin
Copy link

vchernin commented May 12, 2021

Update: the mentioned Electron issue is now closed. The issue here is very likely Teams specific and cannot be fixed by making a change to Electron.

Outdated comment:
I've opened an upstream feature request to build Electron with PipeWire by default. Solving the upstream issue would theoretically solve this Teams issue, but does not necessarily mean PipeWire will work for Teams by default, currently you would still need --enable-features=WebRTCPipeWireCapturer (see the upstream issue for more info).

@hugocorreia90
Copy link

Screen sharing is not working on Ubuntu 21.04. I'm using Wayland, MS Teams 1.4.00.7556 and Gnome 3.38.5.

@vchernin
Copy link

There doesn't appear to be anything we can do here to fix this issue. Since Microsoft Teams is proprietary we are dependent on them to fix this. Please upvote this feature request as likely this issue won't be fixed until Teams updates/fixes their version of Electron.

@ZurdenRo
Copy link

ZurdenRo commented May 28, 2021

I use Fedora 34, Gnome 40 on Wayland. I cant screen shared, App dont crushes, but i cant see the option a button screen. I see the comment, hopefully it is resolved quickly.

@tobertigor
Copy link

Still can't share desktop

Manjaro 21.2,
gnome 41.3,
teams 1.4.00.26453-1,
wayland

@eiglow
Copy link

eiglow commented May 16, 2022

There doesn't appear to be anything we can do here to fix this issue. Since Microsoft Teams is proprietary we are dependent on them to fix this. Please upvote this feature request as likely this issue won't be fixed until Teams updates/fixes their version of Electron.

Is it just me or is this link broken? If so, is there a new feature request we can follow?

@MightyCreak
Copy link
Author

Is it just me or is this link broken? If so, is there a new feature request we can follow?

They decommissioned their UserVoice instance... It's one way to fix all the user requests at once... I think the closest thing right now is the answers section in the MS docs: https://docs.microsoft.com/en-us/answers/search.html?type=question%20OR%20idea%20OR%20kbentry%20OR%20answer%20OR%20topic%20OR%20user&redirect=search%2Fsearch&sort=relevance&q=wayland%20%5Boffice-teams-linux-itpro%5D

@MightyCreak
Copy link
Author

Oh I found the new website for feedbacks: https://feedbackportal.microsoft.com/feedback/forum/ad198462-1c1c-ec11-b6e7-0022481f8472

And I guess this would be the feedback about wayland: https://feedbackportal.microsoft.com/feedback/idea/75a009a9-2d60-ec11-a819-000d3a058885

@drew-parsons
Copy link

This Microsoft feedback link has more votes than the one in the previous comment, best to add your vote to it.

https://feedbackportal.microsoft.com/feedback/idea/4eacaa70-272e-ec11-b6e6-00224827bbc2

@drew-parsons
Copy link

Incidently for those wondering what Microsoft is doing with this (i.e. what version of electron they used), you can extract the version number from the installed files (in my case installed by the deb package)

grep -E "^electron" -A2 /usr/share/teams/resources/ThirdPartyNotice.txt

which currently indicates they're still using electron 10,

$ grep -E "^electron" -A2 /usr/share/teams/resources/ThirdPartyNotice.txt 
electron
10.4.7 <https://github.com/electron/electron/archive/v10.4.7.zip>
Copyright (c) 2013-2020 GitHub Inc.

@maxk096
Copy link

maxk096 commented Apr 9, 2023

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

No branches or pull requests