MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
280 stars 501 forks source link

[New Teams on Mac] Not able to get media device list (Permission denied by system, empty label or device id) #9852

Closed kafka-yu closed 4 months ago

kafka-yu commented 10 months ago

Hi team,

We found an issue when developing our MS Teams tab app on new Teams client on macOS.

Steps to reproduce:

  1. Open an Tab app in new Teams client

  2. Enable the Media permission

  3. Open console, type the following JS script

    await navigator.mediaDevices.getUserMedia({audio: true})
  4. It says:

    Uncaught DOMException: Permission denied by system

  5. Then type the following script:

    await navigator.mediaDevices.enumerateDevices()

    No any label or deviceId is returned.

image image image

New Teams version: Microsoft Teams (work or school) Version 23272.2708.2452.9689 (23272.2708.2452.9689)

Would anyone help check? Thanks.

microsoft-github-policy-service[bot] commented 10 months ago

Hi kafka-yu! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

Prasad-MSFT commented 10 months ago

Hi @kafka-yu - Could you please let us know if this issue is specific to Mac only or does it happen in Windows also?

kafka-yu commented 10 months ago

@Prasad-MSFT Yes only Mac. Windows is good.

image
kafka-yu commented 10 months ago

I think I should forward this issue ticket to "https://github.com/OfficeDev/microsoft-teams-library-js/issues", it is better place?

ChetanSharma-msft commented 10 months ago

Hello @kafka-yu - Please confirm which specific Teams JS library version you are using?

kafka-yu commented 10 months ago

@ChetanSharma-msft We're using 2.5.0. But we invoke the browser's API, not from the Teams JS SDK yet.

kafka-yu commented 10 months ago

hello team, is there any update?

Prasad-MSFT commented 10 months ago

Hi @kafka-yu - We have raised a bug for this issue. We will inform you once we get any further update from engineering team. Thanks!

Prasad-MSFT commented 8 months ago

Hi @kafka-yu - We got update from engineering team that, "From the console logs, the machine/OS itself hasn't provided permission to the app. It's apparent with the error "denied by the system"

If our permissions pipeline rejects a request, the error message shown is: image

macOS needs to provide Teams permissions to allow media (camera/microphone)

kafka-yu commented 8 months ago

Thanks for reply.

macOS needs to provide Teams permissions to allow media (camera/microphone)

The only permission setting on macOS is as below. We have same setting for the classic teams client.

image

Not just my Mac, but my colleagues also meet this situation.

@Prasad-MSFT

Prasad-MSFT commented 7 months ago

Thanks @kafka-yu - We informed the same to engineering team. Once we get further update, we will inform in this thread. Thanks!

Prasad-MSFT commented 5 months ago

Hi @kafka-yu - Engineering team tested on Mac and Windows, the media list returned for them, and it looks fine. Windows: image

Mac: image

Looks it either denied by the system or specific to the app issue. Is this still repro-able? Which app was used for testing? Could you please investigate for any errors within the app? Additionally, ensure that you are using the latest version of Teams.

microsoft-github-policy-service[bot] commented 4 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.