Closed Bug 1379511 Opened 7 years ago Closed 5 years ago

NotReadableError: Failed to allocate videosource using navigator.mediaDevices.getUserMedia and file:/// path

Categories

(Core :: WebRTC: Audio/Video, defect, P3)

54 Branch
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: eichroys, Unassigned, NeedInfo)

References

Details

(Whiteboard: [needinfo 2017-07-18 to reporter])

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170612122310

Steps to reproduce:

I made a small web page to test out the navigator.mediaDevices.getUserMedia() functionality using the first example code here: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia


Actual results:

The example code works fine in Firefox 54 on JSFiddle and shows a live stream from my webcam, see https://jsfiddle.net/ufob1hx7/2/ - however, running identical code locally from the file path e.g. file:///home/eich/Documents/index.html throws a "NotReadableError: Failed to allocate videosource" exception. The same exact code running from the file path works perfectly in Chromium 59.


Expected results:

Running from the file:/// path should work without exception. It's a perfectly valid method for testing small snippets of code or running client only applications.

I am wondering if it is blocked due to some security origin policy or something which won't give access to the camera. However that boggles the mind. For one it works in Chrome so Google don't consider it a security concern. And of course there is no security concern at all - an index.html file on my own machine should be the most secure execution environment, even more secure than a HTTPS site because I control the code entirely. What can hack me? Nothing. I'd have to do something really, really dumb like run a JSONP request to an HTTP domain, then I risk running arbitrary code. Even then the code has to escape the JS sandbox and get out of the browser to cause any real damage, which is also unlikely.

Please fix this bug. Also consider making sure all other JS APIs work properly from the file:/// path without any bogus "security" exceptions.
Component: Untriaged → WebRTC: Audio/Video
Product: Firefox → Core
I am on OSX latest Nightly and it works from local file. Can you please try it on Nightly. What platform are you on? I see the description reports Linux/Ubundu is that the platform you are getting the error?
Flags: needinfo?(eichroys)
Whiteboard: [needinfo 2017-07-18 to reporter]
Rank: 19
Priority: -- → P1
Mass change P1->P2 to align with new Mozilla triage process
Priority: P1 → P2
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3

No response from reporter. Closing as incomplete.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.