Share via

Microsoft Teams with Firefox on Linux

PAKO STOYANOV 0 Reputation points
2026-06-12T15:32:33.7866667+00:00

Screen sharing doesn't work on Firefox on Linux with Wayland.

The only errors seen in the console log are:
Unhandled error/rejection`` {"isTrusted":true} [teams.cloud.microsoft:15:2838](https://teams.cloud.microsoft/"View source in Debugger → https://teams.cloud.microsoft/:15:2838")

Uncaught (in promise) ``DOMException: The fetching process for the media resource was aborted by the user agent at the user's request.

Error: Attempt to postMessage on disconnected port

The browser correctly triggers the screen sharing prompt for the device to choose what to be shared and then it abruptly terminates.
I can observe the same using Microsoft Edge on the machine.

Other websites do not exhibit the same issue such as: https://device-test.com/screen

How to debug and resolve the issue with M$ Teams and Screen Sharing on Linux? What is the cause of the screen share session being terminated immediately after its initiation?

Microsoft Teams | Microsoft Teams for business | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Kai-L 14,210 Reputation points Microsoft External Staff Moderator
    2026-06-12T17:07:45.7366667+00:00

    Dear @PAKO STOYANOV,

    Good day, and I appreciate the clear explanation of your issue. I understand that the screen sharing prompt appears briefly and then closes immediately with a DOMException and port disconnection error. I’m sorry for the inconvenience this has caused, especially when this is affecting your ability to use Microsoft Teams meetings properly.

    As a forum moderator, I am not able to access your account or review the backend systems directly to diagnose and resolve this for you. My role here is limited to providing general guidance and suggestions that users can try on their side.

    From your description and my research, this behavior may be related to how screen sharing works in Microsoft Teams on the web when using Linux with Wayland, especially in Firefox. Screen sharing on Wayland depends on components such as PipeWire and xdg-desktop-portal to allow screen capture. If these components are missing, not running correctly, or not fully supported by the browser/session, the screen sharing prompt may appear and then close unexpectedly.

    Please try the following steps to see if they help:

    1.Check the required components

    Please make sure the required screen sharing components are installed. For Ubuntu-based distributions, you can try:

    sudo apt update

    sudo apt install xdg-desktop-portal xdg-desktop-portal-gnome pipewire wireplumber

    If you are using another distribution, please adjust the command accordingly, such as using dnf on Fedora.

    2.Restart the related services

    After installing or confirming the required components, restart the related services:

    systemctl --user restart pipewire pipewire-pulse wireplumber xdg-desktop-portal

    Then restart your browser and try screen sharing in Teams again.

    3.Test basic screen sharing outside Teams

    Visit https://mozilla.github.io/webrtc-landing/gum_test.html and test screen sharing. (This link is shared by community members for your convenience. It points to a third-party site that is not managed or verified by Microsoft. We can’t guarantee the quality, safety, or suitability of any content or software found there. Please review carefully and make sure you understand any potential risks before using it).

    If screen sharing also fails there, the issue may be related to the Linux desktop environment, browser, or portal configuration rather than Teams only.

    4.Switch to X11/Xorg

    • Log out of your current desktop session.
    • At the login screen, select Ubuntu on Xorg or the equivalent X11/Xorg option for your desktop environment.
    • Log back in and test screen sharing in Teams again.

    Screen sharing may work more reliably under X11/Xorg in some Linux environments.

    5.Consider a third-party Teams wrapper

    Consider the community-maintained teams-for-linux app, which sometimes handles Wayland better with specific flags. You can review it here: Unofficial Microsoft Teams for Linux client · GitHub

    Note: This is an independent third-party project and is not affiliated with Microsoft. Microsoft cannot guarantee its safety, reliability, or feature support. Please review it carefully and use it at your own discretion.

    I hope the above suggestions help narrow down the issue. However, since this appears to be closely related to the Linux desktop environment, browser behavior, and Wayland/X11 screen-sharing components, if the issue continues after trying the steps above, I recommend checking with your Linux distribution’s support forum or a Linux-focused community for more in-depth assistance.

    They may be better able to review the PipeWire, xdg-desktop-portal, Wayland/X11, and browser-specific configuration in your environment. When posting there, it may also help to include your Linux distribution, desktop environment, browser version, and whether you are using Wayland or X11/Xorg.

    Thank you for your patience and understanding. I truly hope you can get this resolved soon. Wishing you all the best.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.