Closed Bug 846951 Opened 11 years ago Closed 9 years ago

[Linux] getUserMedia - Requesting camera access with no camera support - no error callback fired

Categories

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

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jsmith, Unassigned)

Details

Note - linux only bug.

Steps:

1. Disable your webcam following (http://askubuntu.com/questions/166809/how-can-i-disable-my-webcam) and restart your Ubuntu machine
2. Go to http://mozilla.github.com/webrtc-landing/gum_test.html
3. Request video

Expected:

You should get a NO_DEVICES_FOUND error.

Actual:

No error callback is fired with an error code. Probably guessing this is a OS-specific integration issue on Linux.
I don't think any Linux-specific bug should block.
Whiteboard: [getUserMedia][blocking-gum-]
I also get no error, but I haven't even disabled my webcam. I suppose the webcam is currently not supported, but then an appropriate error would be nice. The console does not give anything, although when I play "stop" I get

> [15:27:55,482] TypeError: video.mozSrcObject is null @ http://mozilla.github.io/webrtc-landing/gum_test.html:119

The laptop is http://www.lapwik.com/lenovo_thinkpad_edge_13_-_intel but I don't know how to find hardware information about the built-in webcam.

[sorry if this isn't the appropriate thread]
(In reply to hugo from comment #2)
> I also get no error, but I haven't even disabled my webcam. I suppose the
> webcam is currently not supported, but then an appropriate error would be
> nice. The console does not give anything, although when I play "stop" I get
> 
> > [15:27:55,482] TypeError: video.mozSrcObject is null @ http://mozilla.github.io/webrtc-landing/gum_test.html:119
> 
> The laptop is http://www.lapwik.com/lenovo_thinkpad_edge_13_-_intel but I
> don't know how to find hardware information about the built-in webcam.
> [sorry if this isn't the appropriate thread]

Please file a new bug - this is a different issue.

Windows control panel 'system' should be able to show you the hardware info

Run a debug build (http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/ and grab a recent debug nightly for your OS) and do (windows):  "set NSPR_LOG_MODULES=mediamanager:5,getusermedia:5" "set NSPR_LOG_FILE=some_temp_file" and then run the debug build from the command shell (if you have another Firefox running, make sure you add "-no-remote" to the args to avoid just opening a new window in the current firefox)
(In reply to Randell Jesup [:jesup] from comment #3)
> (In reply to hugo from comment #2)
> > I also get no error, but I haven't even disabled my webcam. I suppose the
> > webcam is currently not supported, but then an appropriate error would be
> > nice. The console does not give anything, although when I play "stop" I get
> > 
> > > [15:27:55,482] TypeError: video.mozSrcObject is null @ http://mozilla.github.io/webrtc-landing/gum_test.html:119
[…]
> Please file a new bug - this is a different issue.

About what exactly? The webRTC page does not give information on the page nor in the logs that there's something wrong with the hardware support. I think it should. (this bug is about a NO_DEVICE error, but it's so close to a NO_SUPPORTED_DEVICE error that it I don't see how different the issues are, if you really think it deserves another bug report for this topic, feel free to do it yourself, I hereby grant you all the rights to my bug report, thanks.)

> Windows control panel 'system' should be able to show you the hardware info

I don't understand what that↑ means.

> Run a debug build (http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/
> and grab a recent debug nightly for your OS) and do (windows):  "set
> NSPR_LOG_MODULES=mediamanager:5,getusermedia:5" "set
> NSPR_LOG_FILE=some_temp_file" and then run the debug build from the command
> shell (if you have another Firefox running, make sure you add "-no-remote"
> to the args to avoid just opening a new window in the current firefox)

Sorry, no time for that!
I can reproduce this issue using Firefox ESR 24.4.0 with Linux.

There error callback is not triggered, and mozGetUserMedia doesn't work with video, audio and both.

I visited http://mozilla.github.io/webrtc-landing/ and the following message was displayed:

"mozRTCPeerConnection is missing!
Do you have the latest Nightly and set media.peerconnection.enabled to true? "

It seems that Firefox ESR 24.4.0 doesn't support peerconnection (it is not available in the about:config), however according to Mozilla API (https://developer.mozilla.org/es/docs/Web/API/Navigator.getUserMedia) should be available from version 20.x.

I cannot reproduce this issue in Firefox 28.x for Mac Os and Windows (using wine), so maybe it is only a issue with Linux.

I tested with Chromium 33.0.1750.152 in the same Linux machine using getUserMedia/webkitGetUserMedia and the webcam works without problems, so It is not hardware problem.

The code used for the test:

> <html>
>	<head>
>	</head>
>	<body>
>		<video autoplay>This is a video</video>
><script>
> navigator.getMedia = (  navigator.webkitGetUserMedia ||
>                         navigator.mozGetUserMedia ||
>                         navigator.msGetUserMedia ||
>                         navigator.getUserMedia);
>if (navigator.getMedia) {
> navigator.getMedia (
>   // constraints
>   {
>    video: true,
>    audio: true,
>    toString : function() { return "video,audio" }
>   },
>   // successCallback
>   function(localMediaStream) {    
>    var video = document.querySelector('video');
>    video.src = window.URL.createObjectURL(localMediaStream);
>    video.onloadedmetadata = function(e) {
>         alert("Let's rock!");        
>        };
>       },
>   // errorCallback
>   function(err) {
>    console.log("Error: " + err);    
>   }
> );
>}
>else
>{
> alert("getUserMedia is not supported by your browser!");
>}
></script>
>	</body>
></html>
(In reply to JM Lago from comment #5)
> I can reproduce this issue using Firefox ESR 24.4.0 with Linux.

Important: what linux version?  Whose build of 24.4.0?  (Ours, or a Linux distro's)?  

> 
> There error callback is not triggered, and mozGetUserMedia doesn't work with
> video, audio and both.
> 
> I visited http://mozilla.github.io/webrtc-landing/ and the following message
> was displayed:
> 
> "mozRTCPeerConnection is missing!
> Do you have the latest Nightly and set media.peerconnection.enabled to true?
> "
> 
> It seems that Firefox ESR 24.4.0 doesn't support peerconnection (it is not
> available in the about:config), however according to Mozilla API
> (https://developer.mozilla.org/es/docs/Web/API/Navigator.getUserMedia)
> should be available from version 20.x.

mozGetUserMedia from 20, RTCPeerConnection since 22.  Both are there; I just tried it on my Fedora 19 system (with a camera) and they work with 24.4.  Without a USB camera for video I get NO_DEVICES_FOUND, for audio it sees my headset and built-in audio inputs.

> 
> I cannot reproduce this issue in Firefox 28.x for Mac Os and Windows (using
> wine), so maybe it is only a issue with Linux.
> 
> I tested with Chromium 33.0.1750.152 in the same Linux machine using
> getUserMedia/webkitGetUserMedia and the webcam works without problems, so It
> is not hardware problem.
> 
> The code used for the test:

With that code, it asks me for my audio device.  If I change audio to false (with the USB cam disconnected), it sends an error to the console (error callback works).

Check to make sure media.navigator.enabled is true in about:config.

Also, make sure you're using the version downloaded from our ftp.mozilla.org site.
Flags: needinfo?(juanparati)
Hi Randell,

The enviroment

> Mageia release 4 (Official) for x86_64
> Kernel 3.12.13-desktop-2.mga4 on a Dual-processor x86_64 / \l

> Windows Manager: KDE

> Firefox version: 24.4.0 ESR (Original Mageia Package)
> User agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0


As you did, I also tried to disconnect the webcam, and use only the audio, but the error callback was not raised (I checked it with Firebug and the native firefox console).

I cannot locate the media.navigator.enabled parameter in the about:config, so I figure out that maybe Firefox 24.4.0 ESR doesn't have getUserMedia support.

I downloaded a new version of Firefox (28.x) from mozilla.org, and getUserMedia works like a charm using the same test code used in my last comment.

If is not a issue with the ESR builds then perhaps it is a issue of the distro packaging.
Flags: needinfo?(juanparati)
From Firefox ESR page:
https://www.mozilla.org/en-US/firefox/organizations/


"Who is it for?

Firefox ESR is intended for groups who deploy and maintain the desktop environment in large organizations such as universities and other schools, county or city governments and businesses.

Who is it not for?

Individual users who always want the latest features, performance enhancements and technologies in their browser without waiting for them to become available in ESR several development cycles later."

So maybe getUserMedia is not available because ESR versions don't have all the latest features that non-ESR versions.

Many linux distros like Ubuntu or Mageia are using ESR versions of Firefox, so I guess that some features like getUserMedia are not aligned in the same version numbers.
getUserMedia is in the official 24.4.0 build at
http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.4.0esr/linux-x86_64/en-US/
and also the one in linux-i686

I'm certain of this; I tested it.

You're using a "vendor build" done by Mageia (I don't know that distro), not our build.  They must have built it with --disable-webrtc.

Check about:buildconfig
Hi Randell,

You are right, it was compiled with --disable-webrtc, so it is not issue.
I didn't know about about:buildconfig
Per comments, a build config issue with a non-official build
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Whiteboard: [getUserMedia][blocking-gum-]
You need to log in before you can comment on or make changes to this bug.