{"action":"created","issue":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/3919","repository_url":"https://api.github.com/repos/RocketChat/Rocket.Chat","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/3919/labels{/name}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/3919/comments","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/3919/events","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/3919","id":169433043,"number":3919,"title":"Rocket.Chat Screen Share and Jidesha Chrome extensions returning \"Permission Denied\"","user":{"login":"james-mcgoodwin","id":10244756,"avatar_url":"https://avatars.githubusercontent.com/u/10244756?v=3","gravatar_id":"","url":"https://api.github.com/users/james-mcgoodwin","html_url":"https://github.com/james-mcgoodwin","followers_url":"https://api.github.com/users/james-mcgoodwin/followers","following_url":"https://api.github.com/users/james-mcgoodwin/following{/other_user}","gists_url":"https://api.github.com/users/james-mcgoodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/james-mcgoodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/james-mcgoodwin/subscriptions","organizations_url":"https://api.github.com/users/james-mcgoodwin/orgs","repos_url":"https://api.github.com/users/james-mcgoodwin/repos","events_url":"https://api.github.com/users/james-mcgoodwin/events{/privacy}","received_events_url":"https://api.github.com/users/james-mcgoodwin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/labels/feat:%20video%20conferencing","name":"feat: video conferencing","color":"1d76db"},{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/labels/type:%20support","name":"type: support","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-08-04T17:45:05Z","updated_at":"2016-09-06T17:07:01Z","closed_at":null,"body":"Hooo kay, think I'll dive in here too with some of my findings as well. \r\n\r\nApologies in advance for the deep verbosity, but I've exhausted most of the avenues of investigation that I can figure to check. I hope this is not too much information in one go, but please forgive me if it is. \r\n\r\nMy base problem is that while RocketChat starts video conferences, I cannot launch a desktop screen share from one client to another. This includes both in Chrome and the RC client (have not tested firefox). The error message received back reads: \r\n\r\n> Permission Denied\r\n> Failed to install desktop sharing extension\r\n\r\n\r\nTL;DR : I'm likely doing something wrong in my configs, or in my assumptions. Any advice would be appreciated.\r\n\r\nThe following currently open tickets seem to have the same issue: \r\n#3560 \r\n#3797 \r\n\r\nA quick rundown of what I'm trying to do: \r\n\r\n**Objectives**\r\n\r\n- Rocketchat for text based group comms\r\n- Jitsi Video Bridge / Jisi Meet / Prosoity for group video conferencing\r\n- Rocketchat to perform AD Authentication for company employees to the text and VC rooms\r\n\r\nPretty standard requirement list. \r\n\r\n**Assumptions**\r\n- If the server setup works with these Ubuntu test clients, the same will be true for Windows/MacOS setup with the same browser/extensions\r\n- No microphone or camera is needed by a client to start screen sharing\r\n- The Jidesha Chrome extension should be used instead of the RocketChat Chrome extension since Jidesha can/must be configured for the domains Jitsi is built on. (The RC Chrome Extension cannot be customized)\r\n\r\n**Machines**\r\nI've got two servers and two client computers, all Ubuntu 16.04: \r\n- rocket_chat_rc01 : The rocket chat server with the following packages:  \r\n - npm: 3.5.2-0ubuntu4\r\n - nodejs: 0.10.46\r\n - mongodb-org (meta package): 3.0.12\r\n - Rocket Chat: 0.36.0\r\n - nginx: 1.10.0-0ubuntu0.16.04.2\r\n- rocket_chat_jitsi01 : The jitsi server with the following packages: \r\n - jitsi-videobridge: 757-1\r\n - jitsi-meet: 1.0.1108-1\r\n - jitsi-meet-prosody: 1.0.1108-1\r\n - prosody: 0.9.10-1\r\n - jicofo: 1.0-273-1\r\n - nginx: 1.10.0-0ubuntu0.16.04.2\r\n - openjdk-8-jre-headless: 8u91-b14-3ubuntu1~16.04.1\r\n- rocket_chat_client01 and _client02 : Test clients with the following packages: \r\n - xfce4 (meta package): 4.12.2\r\n - rocketchat: 1.3.1\r\n - chromium-browser: 51.0.2704.79-0ubuntu0.16.04.1.1242\r\n - Chrome Extension - Jidesha: 0.1.5\r\n - Chrome Extension - Rocket.Chat Screen Share: 0.1.0\r\n - No other Chrome Extensions are installed \r\n - NOTE: Only one extension was installed at a time. Trial1 conducted with Jidesha, then it is removed and for Trial2 Rocket.Chat Screen Share is installed. \r\n\r\n**Network**\r\nAll servers are on the following network: \r\n- 10.99.212.208/28 \r\n - No packet filtering is occurring on the network infrastructure\r\n - All Ubuntu instances have iptables disabled. \r\n - I wont bother listing the IP assignments here unless asked. Doesn't seem relevant ATM.\r\n\r\nHostnames (A records / CNAMES) have been setup for: \r\n- jitsi.maas --> rocket_chat_jitsi01\r\n- rocketchat.maas --> rocket_chat_rc01\r\n\r\n**PKI**\r\nI've built a self signed root CA and applied it to all servers/services with the following alternative subject names: \r\n- jitsi.maas\r\n- jitsi-videobridge.jitsi.maas\r\n- auth.jitsi.maas\r\n- focus.jitsi.maas\r\n- conference.jitsi.maas\r\n- meet.jitsi.maas\r\n- rocketchat.maas\r\n\r\nThat cert is used by Nginx on both servers as well as prosody in the Jitsi server. \r\nThe cert has been added to the trusted root cert store in both Ubuntu clients\r\n\r\n**Jidesha**\r\nI've compiled the Jidesha plugin with the following manifest: \r\n```JSON\r\n$  cat ~/git/jidesha/chrome/manifest.json\r\n{\r\n  \"manifest_version\": 2,\r\n  \"name\": \"Jitsi Desktop Streamer\",\r\n  \"description\": \"A simple extension that allows you to stream your desktop into meetings with Jitsi Meet and Jitsi Videobridge.\",\r\n  \"version\": \"0.1.5\",\r\n  \"minimum_chrome_version\": \"34\",\r\n  \"icons\": {\r\n    \"16\": \"jitsi-logo-16x16.png\",\r\n    \"48\": \"jitsi-logo-48x48.png\",\r\n    \"128\": \"jitsi-logo-128x128.png\"\r\n  },\r\n  \"background\": {\r\n        \"scripts\": [ \"background.js\" ],\r\n        \"persistent\": true\r\n  },\r\n  \"permissions\": [\r\n      \"desktopCapture\"\r\n  ],\r\n  \"externally_connectable\": {\r\n      \"matches\": [\r\n          \"*://jitsi.maas/*\",\r\n          \"*://*.jitsi.maas/*\",\r\n\t\t  \"*://rocketchat.maas/*\",\r\n\t\t  \"*://*.rocketchat.maas/*\"\r\n      ]\r\n  }\r\n}\r\n```\r\nThis produces an extension with the following ID:\r\n\r\n> pimkghiofgpblmpodaepplbgokkkpche\r\n\r\nI have configured Jitsi-meet with the following for the Jidesha extension details (file trimmed for brevity):\r\n\r\n```\r\n$  cat /etc/jitsi/meet/jitsi.maas-config.js\r\n/* jshint -W101 */\r\nvar config = {\r\n    hosts: {\r\n        domain: 'jitsi.maas',\r\n       muc: 'conference.jitsi.maas', // FIXME: use XEP-0030\r\n    },\r\n    bosh: '//jitsi.maas/http-bind', // FIXME: use xep-0156 for that\r\n    clientNode: 'http://jitsi.maas/jitsimeet', // The name of client node advertised in XEP-0115 'c' stanza\r\n    desktopSharingChromeMethod: 'ext',\r\n    desktopSharingChromeExtId: 'pimkghiofgpblmpodaepplbgokkkpche', //Custom Jitsi Chrome Extension\r\n    desktopSharingChromeSources: [ 'screen', 'window'],\r\n    desktopSharingChromeMinExtVersion: '0.1',\r\n    webrtcIceUdpDisable: false,\r\n    webrtcIceTcpDisable: false,\r\n  };\r\n```\r\n\r\nI then ensure that RocketChat has the same ID and the correct address for the Jitsi server\r\n![rocket_chat_vc_config](https://cloud.githubusercontent.com/assets/10244756/17409570/da7af17a-5a3d-11e6-971c-c492ea814ae4.png)\r\n\r\n**Results Trial 1 - Jidesha Chrome Extension**\r\nUsing Chromium in either client01 or client02 I can hit https://jitsi.maas and start a desktop screen share using the Jidesha plugin. Jitsi Meet works just fine when my clients connect to it directly. \r\n\r\nWhen I use Rocketchat however, I get the error message quoted at the top: \r\n![rocket_chat_vc_failure_2](https://cloud.githubusercontent.com/assets/10244756/17409703/629030fc-5a3e-11e6-9d8f-bdc466170acf.png)\r\n\r\n![rocket_chat_vc_failure_1](https://cloud.githubusercontent.com/assets/10244756/17409676/3ca40c60-5a3e-11e6-8293-e411701428d3.png)\r\n\r\nLooking at Chrome's dev tools, I see the following error message in the Console that I suspect is pertinent: \r\n![rocket_chat_vc_failure_3](https://cloud.githubusercontent.com/assets/10244756/17409834/d236aba2-5a3e-11e6-873e-ebefad15dd19.png)\r\n\r\n> failed to create local tracks [\"desktop\"]\r\n\r\n**Results Trial 2 - Using Rocket.Chat Screen Share extension**\r\nI repeated the above with the ID for Rocket.Chat Screen Sharing: nocfbnnmjnndkbipkabodnheejiegccf\r\n\r\nAnd again got the same result: \r\n\r\n![rocket_chat_vc_failure_4](https://cloud.githubusercontent.com/assets/10244756/17412217/98238e3e-5a49-11e6-828c-25e3fb32680a.png)\r\n\r\n\r\nHoping that someone might be able to tell me if I have something wrong in my configs or in my assumptions. \r\n\r\nThanks. \r\n"},"comment":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/comments/245019483","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/3919#issuecomment-245019483","issue_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/3919","id":245019483,"user":{"login":"rockneverdies55","id":4588562,"avatar_url":"https://avatars.githubusercontent.com/u/4588562?v=3","gravatar_id":"","url":"https://api.github.com/users/rockneverdies55","html_url":"https://github.com/rockneverdies55","followers_url":"https://api.github.com/users/rockneverdies55/followers","following_url":"https://api.github.com/users/rockneverdies55/following{/other_user}","gists_url":"https://api.github.com/users/rockneverdies55/gists{/gist_id}","starred_url":"https://api.github.com/users/rockneverdies55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockneverdies55/subscriptions","organizations_url":"https://api.github.com/users/rockneverdies55/orgs","repos_url":"https://api.github.com/users/rockneverdies55/repos","events_url":"https://api.github.com/users/rockneverdies55/events{/privacy}","received_events_url":"https://api.github.com/users/rockneverdies55/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T17:07:01Z","updated_at":"2016-09-06T17:07:01Z","body":"@geekgonecrazy - it might make sense to take [jitsi guys](https://github.com/jitsi/jitsi-meet/graphs/contributors)'s opinion on this."}}
{"actor":{"display_login":"rockneverdies55"}}