New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 776649 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug
Team-Security-UX

Blocked on:
issue 631464



Sign in to add a comment

MediaDeviceNotSupported error is thrown when using getUserMedia in headless

Reported by fi...@appear.in, Oct 20 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/61.0.3163.100 Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. download the attached test case
2. use npm to install selenium-webdriver and chromedriver (alternatively run the steps from the adapter.js repo; or ask jansson for help)
3. run `node headlessgum.js`
4. inspect the resulting file scrot.png

What is the expected behavior?
Inspecting the resulting screenshot shows the fake media circle

What went wrong?
according to the screenshot a MediaDeviceNotSupportedError is thrown.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 61.0.3163.100  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 16.0 r0

Using the use-fake-ui-for-media-stream option works, however this does not allow testing screensharing as described in https://bugs.chromium.org/p/chromium/issues/detail?id=459532#c22
which makes headless much less usable for testing.
 
headlessgum.js
2.1 KB View Download

Comment 1 by fi...@appear.in, Oct 20 2017

omg, the title does not make sense at all. Can someone change it to:
MediaDeviceNotSupported error is thrown when using getUserMedia in headless
please?

Comment 2 by guidou@chromium.org, Oct 20 2017

Summary: MediaDeviceNotSupported error is thrown when using getUserMedia in headless (was: MediaDeviceNotSupported errors is thrown when using getUserMedia errors in headless)

Comment 3 by guidou@chromium.org, Oct 20 2017

fippo@: just to be clear, is the problem is only when using screen capture, or there is a problem also with webcam capture, even if --use-fake-ui-for-media-stream is used?

Comment 4 by fi...@appear.in, Oct 20 2017

normal or fake media works when the fake ui is used.

I would not be surprised if the issue was something like "we need to show a permissions ui but this is headless and we can not". But then, the permissions UI should not be necessary since a profile exist.

Comment 5 by guidou@chromium.org, Oct 20 2017

So the problem is that you don't even get the prompt?

Comment 6 by fi...@appear.in, Oct 20 2017

with the permissions in the profile I should not get the prompt.
Unfortunately headless is a bit hard to debug since its not showing anything and taking a screenshot does not include the browser UI.

Comment 7 by guidou@chromium.org, Oct 20 2017

OK, now I understand. With the profile, it should work without the flag, but it fails anyway.

Comment 8 by guidou@chromium.org, Oct 20 2017

Cc: raymes@chromium.org
Components: UI>Browser>Permissions>Prompts
Components: Internals>Headless
Blockedon: 631464
Headless mode doesn't currently support granting permissions, which is probably part of the problem here.
Status: Available (was: Unconfirmed)
Labels: Hotlist-EnamelAndFriendsFixIt
Labels: -Hotlist-EnamelAndFriendsFixIt

Sign in to add a comment