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

[bug]:Jitsi Meet does not have microphone and camera permissions in embedded mode, but it works fine in Chrome/Safari. #3074

Open
6 tasks done
NCPSNetworks opened this issue Jun 20, 2024 · 5 comments

Comments

@NCPSNetworks
Copy link

NCPSNetworks commented Jun 20, 2024

Checks before filing an issue

Mattermost Desktop Version

5.8.1

Operating System

macOS Sonoma 14.5 / Windows 10 x64

Mattermost Server Version

9.9.0

Steps to reproduce

  1. Enable "Embed video inside Mattermost" in the Jitsi Meet plugin settings.
  2. Start a meeting.
  3. Initiate and join a meeting in Mattermost Desktop.

Expected behavior

When starting and joining a Jitsi Meet meeting in Mattermost Desktop with the "Embed video inside Mattermost" setting enabled, the microphone and camera should work correctly without any permission issues.

Observed behavior

When starting and joining a Jitsi Meet meeting in Mattermost Desktop in embedded mode, Jitsi Meet prompts for insufficient permissions for the microphone and camera, even though it works fine in Chrome/Safari.

Log Output

[2024-06-20 13:21:35.059] [info]  [App.Utils] MAS: No files to migrate, skipping
[2024-06-20 13:21:35.072] [info]  [App.Initialize] Autoupgrade disabled: false
[2024-06-20 13:21:35.098] [info]  [ServerDropdownView] init
[2024-06-20 13:21:35.131] [info]  [i18nManager] Set new language en-US
[2024-06-20 13:21:45.553] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:45.553Z [modules/RTC/RTCUtils.js] Failed to get access to local media. OverconstrainedError {"video":{"aspectRatio":1.7777777777777777,"height":{"ideal":1080},"frameRate":{"ideal":60,"max":60,"min":60},"width":{"ideal":1920},"facingMode":"user"},"audio":{"autoGainControl":false,"echoCancellation":false,"noiseSuppression":false,"channelCount":2}}
[2024-06-20 13:21:45.554] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:45.553Z [features/base/tracks] Failed to create local tracks audio,video [object Object]
[2024-06-20 13:21:45.571] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:45.571Z [modules/RTC/RTCUtils.js] Failed to get access to local media. NotAllowedError: Permission denied {"video":false,"audio":{"autoGainControl":false,"echoCancellation":false,"noiseSuppression":false,"channelCount":2}}
[2024-06-20 13:21:45.572] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:45.572Z [features/base/tracks] Failed to create local tracks audio [object Object]
[2024-06-20 13:21:45.573] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:45.573Z [modules/RTC/RTCUtils.js] Failed to get access to local media. OverconstrainedError {"video":{"aspectRatio":1.7777777777777777,"height":{"ideal":1080},"frameRate":{"ideal":60,"max":60,"min":60},"width":{"ideal":1920},"facingMode":"user"},"audio":false}
[2024-06-20 13:21:45.573] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:45.573Z [features/base/tracks] Failed to create local tracks video [object Object]
[2024-06-20 13:21:45.573] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:45.573Z [conference.js] Audio track creation failed with error gum.permission_denied: User denied permission to use device(s): audio
[2024-06-20 13:21:45.573] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:45.573Z [conference.js] Video track creation failed with error gum.constraint_failed: Constraint could not be satisfied: undefined
[2024-06-20 13:21:46.428] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:46.428Z [modules/xmpp/XmppConnection.js] <Oo._maybeEnableStreamResume>:  Stream resume enabled, but WebSockets are not enabled
[2024-06-20 13:21:47.620] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] Permissions policy violation: screen-wake-lock is not allowed in this document.
[2024-06-20 13:21:47.624] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:47.624Z [JitsiConference.js] <qh.setSubject>:  Failed to set subject, participant is not a moderator
[2024-06-20 13:21:47.636] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:47.636Z [features/base/conference] Error while requesting wake lock for screen: NotAllowedError: Failed to execute 'request' on 'WakeLock': Access to Screen Wake Lock features is disallowed by permissions policy
[2024-06-20 13:21:49.675] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:49.675Z [modules/RTC/BridgeChannel.js] <e.onclose>:  Channel closed: 1006 
[2024-06-20 13:21:50.828] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:50.827Z [modules/RTC/BridgeChannel.js] <e.onclose>:  Channel closed: 1006 
[2024-06-20 13:21:52.836] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:52.835Z [modules/RTC/BridgeChannel.js] <e.onclose>:  Channel closed: 1006 
[2024-06-20 13:21:56.841] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:21:56.840Z [modules/RTC/BridgeChannel.js] <e.onclose>:  Channel closed: 1006 
[2024-06-20 13:22:02.230] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:02.230Z [conference.js] <C1._onConferenceFailed>:  CONFERENCE FAILED: conference.destroyed The meeting has been terminated undefined
[2024-06-20 13:22:11.003] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:11.003Z [modules/RTC/RTCUtils.js] Failed to get access to local media. OverconstrainedError {"video":{"aspectRatio":1.7777777777777777,"height":{"ideal":1080},"frameRate":{"ideal":60,"max":60,"min":60},"width":{"ideal":1920},"facingMode":"user"},"audio":{"autoGainControl":false,"echoCancellation":false,"noiseSuppression":false,"channelCount":2}}
[2024-06-20 13:22:11.003] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:11.003Z [features/base/tracks] Failed to create local tracks audio,video [object Object]
[2024-06-20 13:22:11.053] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:11.053Z [modules/RTC/RTCUtils.js] Failed to get access to local media. NotAllowedError: Permission denied {"video":false,"audio":{"autoGainControl":false,"echoCancellation":false,"noiseSuppression":false,"channelCount":2}}
[2024-06-20 13:22:11.054] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:11.053Z [features/base/tracks] Failed to create local tracks audio [object Object]
[2024-06-20 13:22:11.055] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:11.055Z [modules/RTC/RTCUtils.js] Failed to get access to local media. OverconstrainedError {"video":{"aspectRatio":1.7777777777777777,"height":{"ideal":1080},"frameRate":{"ideal":60,"max":60,"min":60},"width":{"ideal":1920},"facingMode":"user"},"audio":false}
[2024-06-20 13:22:11.055] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:11.055Z [features/base/tracks] Failed to create local tracks video [object Object]
[2024-06-20 13:22:11.055] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:11.055Z [conference.js] Audio track creation failed with error gum.permission_denied: User denied permission to use device(s): audio
[2024-06-20 13:22:11.055] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:11.055Z [conference.js] Video track creation failed with error gum.constraint_failed: Constraint could not be satisfied: undefined
[2024-06-20 13:22:11.886] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:11.885Z [modules/xmpp/XmppConnection.js] <Oo._maybeEnableStreamResume>:  Stream resume enabled, but WebSockets are not enabled
[2024-06-20 13:22:12.925] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] Permissions policy violation: screen-wake-lock is not allowed in this document.
[2024-06-20 13:22:12.929] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:12.928Z [JitsiConference.js] <qh.setSubject>:  Failed to set subject, participant is not a moderator
[2024-06-20 13:22:12.939] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:12.939Z [features/base/conference] Error while requesting wake lock for screen: NotAllowedError: Failed to execute 'request' on 'WakeLock': Access to Screen Wake Lock features is disallowed by permissions policy
[2024-06-20 13:22:15.748] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:15.748Z [modules/RTC/RTCUtils.js] Failed to get access to local media. NotAllowedError: Permission denied {"video":false,"audio":{"autoGainControl":false,"echoCancellation":false,"noiseSuppression":false,"channelCount":2}}
[2024-06-20 13:22:15.748] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:22:15.748Z [features/base/tracks] Failed to create local tracks audio [object Object]
[2024-06-20 13:26:30.769] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:26:30.768Z [modules/xmpp/strophe.ping.js] Ping timeout null
[2024-06-20 13:28:11.306] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:28:11.306Z [conference.js] <C1._onConferenceFailed>:  CONFERENCE FAILED: conference.destroyed The meeting has been terminated undefined
[2024-06-20 13:29:05.076] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:29:05.076Z [modules/RTC/RTCUtils.js] Failed to get access to local media. OverconstrainedError {"video":{"aspectRatio":1.7777777777777777,"height":{"ideal":1080},"frameRate":{"ideal":60,"max":60,"min":60},"width":{"ideal":1920},"facingMode":"user"},"audio":{"autoGainControl":false,"echoCancellation":false,"noiseSuppression":false,"channelCount":2}}
[2024-06-20 13:29:05.077] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:29:05.077Z [features/base/tracks] Failed to create local tracks audio,video [object Object]
[2024-06-20 13:29:05.093] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:29:05.093Z [modules/RTC/RTCUtils.js] Failed to get access to local media. NotAllowedError: Permission denied {"video":false,"audio":{"autoGainControl":false,"echoCancellation":false,"noiseSuppression":false,"channelCount":2}}
[2024-06-20 13:29:05.095] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:29:05.095Z [features/base/tracks] Failed to create local tracks audio [object Object]
[2024-06-20 13:29:05.096] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:29:05.096Z [modules/RTC/RTCUtils.js] Failed to get access to local media. OverconstrainedError {"video":{"aspectRatio":1.7777777777777777,"height":{"ideal":1080},"frameRate":{"ideal":60,"max":60,"min":60},"width":{"ideal":1920},"facingMode":"user"},"audio":false}
[2024-06-20 13:29:05.096] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:29:05.096Z [features/base/tracks] Failed to create local tracks video [object Object]
[2024-06-20 13:29:05.097] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:29:05.097Z [conference.js] Audio track creation failed with error gum.permission_denied: User denied permission to use device(s): audio
[2024-06-20 13:29:05.097] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:29:05.097Z [conference.js] Video track creation failed with error gum.constraint_failed: Constraint could not be satisfied: undefined
[2024-06-20 13:29:06.019] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:29:06.018Z [modules/xmpp/XmppConnection.js] <Oo._maybeEnableStreamResume>:  Stream resume enabled, but WebSockets are not enabled
[2024-06-20 13:29:06.769] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] Permissions policy violation: screen-wake-lock is not allowed in this document.
[2024-06-20 13:29:06.773] [warn]  [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:29:06.773Z [JitsiConference.js] <qh.setSubject>:  Failed to set subject, participant is not a moderator
[2024-06-20 13:29:06.787] [error] [WebContentsEventM...] [Example] [TAB_MESSAGING] [renderer] 2024-06-20T05:29:06.787Z [features/base/conference] Error while requesting wake lock for screen: NotAllowedError: Failed to execute 'request' on 'WakeLock': Access to Screen Wake Lock features is disallowed by permissions policy

Additional Information

That's strange because there are no issues in Chrome/Safari.
Voice calls initiated by the mattermost-calls-plugin work fine, but Jitsi Meet in embedded mode does not.
This might be due to some bugs in Mattermost Desktop.
image

@devinbinnie
Copy link
Member

@NCPSNetworks Can you post a video of what you're seeing? We have different permissions prompts per-server and per-app, so it would be good to see where the flow is breaking and doing something unexpected, and will make it easier to figure out the culprit.

@NCPSNetworks
Copy link
Author

video.mp4

@devinbinnie
Copy link
Member

So there could be a Jitsi issue here, but for a sanity check can you check the permissions.json file in your app data folder to see if it's been denied anywhere? You can find the file:
Windows: %userprofile%\AppData\Roaming\Mattermost
macOS: ~/Library/Containers/Mattermost.Desktop/Data/Library/Application Support/Mattermost

@NCPSNetworks
Copy link
Author

NCPSNetworks commented Jul 24, 2024

So there could be a Jitsi issue here, but for a sanity check can you check the permissions.json file in your app data folder to see if it's been denied anywhere? You can find the file: Windows: %userprofile%\AppData\Roaming\Mattermost macOS: ~/Library/Containers/Mattermost.Desktop/Data/Library/Application Support/Mattermost

{ "https://chat.example.com": { "media": { "allowed": true }, "notifications": { "allowed": true } } }

@NCPSNetworks
Copy link
Author

NCPSNetworks commented Aug 21, 2024

After testing, I identified the issue:
Cross-origin requests in embedded mode cause Mattermost Desktop to deny permissions (because it doesn't belong to chat.example.com but rather to meet.example.com).
If I add the server meet.example.com in Mattermost Desktop, permissions can be granted normally when the window is on meet.example.com. However, if I switch back to the Mattermost server page and activate the embedded page, permissions are denied.
I think the solution to this problem is to update Mattermost Desktop so that same-origin requests can call each other. For example, if the Mattermost server is chat.example.com, then that server should be able to share permissions with calls to *.example.com and example.com.

That's why this issue is only encountered in Mattermost Desktop, while it does not occur in Chrome, Edge, or Safari.

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

2 participants