New issue
Advanced search Search tips

Issue 739953 link

Starred by 8 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Navigator getUserMedia returns NotReadableError/NotFoundError on video input

Reported by hpol...@gmail.com, Jul 6 2017

Issue description

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

Steps to reproduce the problem:
1. https://webrtc.github.io/samples/src/content/devices/input-output/
2. 
3. 

What is the expected behavior?
Tested same code under Firefox (54)- no issues. Same problem occured with Opera (46.0) only on Linux.

What went wrong?
Same link on Windows 10 with the same version of browser works fine. Under linux (I tested Ubuntu 16.04 and Fedora 25) failing with NotFoundError under Ubuntu or NotReadableError under Fedora

Did this work before? Yes 56

Does this work in other browsers? Yes

Chrome version: 59.0.3071.115  Channel: stable
OS Version: Ubuntu/Fedora
Flash Version:
 
Labels: Needs-Feedback
I tried, but the linke page works fine on Ubuntu for me.
Can you provide more details about your setup?
Also, make sure the camera/mic is not being used by other applications.
Cc: chfremer@chromium.org

Comment 3 by hpol...@gmail.com, Jul 18 2017

So, just to prevent any discrapancy between setup, I did following steps:
1) Rebuild Ubuntu 16.04. Clean install. Updated to lates kernel (4.10.0-28-generic) and other software.
2) Install Google chrome stable from official repository. "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"
3) Install Chromium from official repository."Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36"
4) Run on both of them link from original ticket. Both failing with the same error 'NotFoundError', which comes from adapter-lates.js. Same link with the same level of browsers works fine on Windows 10. 

navigator.getUserMedia error:  
Object
constraint
:
""
message
:
""
name
:
"NotFoundError"
toString
:
function ()
arguments
:
(...)
caller
:
(...)
length
:
0
name
:
"toString"
prototype
:
Object
__proto__
:
function ()
[[FunctionLocation]]
:
adapter-latest.js:1506
[[Scopes]]
:
Scopes[3]
__proto__
:
Object

5) Firefox on same linux works fine "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"

6) Only one camera attached to PC. 'videoinput: USB Camera (046d:08d7) (046d:08d7) id: bf3fb1d613ece1da5ce46cff1279b4d38a205fc6fc3e0ce58d704e8e768f6757' and browsers detect this on load time with no issues.

If you need addition data, please tell what I can provide.

Thanks in advance for you time and help.



Project Member

Comment 4 by sheriffbot@chromium.org, Jul 18 2017

Cc: guidou@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "guidou@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: pnangunoori@chromium.org
Labels: Needs-Feedback
Tested on latest Chrome stable  #59.0.3071.115 and unable to reproduce the issue on Ubuntu 14.04. Attached is the screenshot for the reference.

@Reporter -- Could you please try by removing the extensions and creating a new profile to verify if the issue still persists.

Please let us know if we have missed anything.

Thanks in advance.
739953.png
304 KB View Download

Comment 6 by hpol...@gmail.com, Jul 19 2017

Well, even according to you screen shot, it's not working. Because you have to see a video instead on black window. If you look at console, you'll see that error I've provided earlier.

I have no extensions or addons installed on browsers. It's clean installation. That is a first things I do when I'm testing or debuging pages.

Just to prove this, here is screen shot from Firefox, which is works. 
Selection_002.png
477 KB View Download
Project Member

Comment 7 by sheriffbot@chromium.org, Jul 19 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "pnangunoori@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Interesting. I have seen a case before where a camera (Microsoft Lifecam HD-3000) would not work with https://webrtc.github.io/samples/src/content/devices/input-output/ but would work when testing with https://webrtc.github.io/samples/src/content/getusermedia/gum/, see [1].

hpolk00@: Could you do me a favor and let me know if the camera works with https://webrtc.github.io/samples/src/content/getusermedia/gum/ ? Also, is the camera model (046d:08d7) you are using a Logitech Quickcam Communicate STX? In case you happen to have a different camera handy, could you let me know if it makes any difference?

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=709819#c43

Comment 9 by hpol...@gmail.com, Jul 19 2017

Here are two screen shots for link https://webrtc.github.io/samples/src/content/getusermedia/gum/ from Chrome (image 003) and Chromuium (image 004) with 046d:08d7 Logitech, Inc. QuickCam Communicate STX. On both you can see same error.

I have tried same version of Chrome on Fedora 25 with Dynex Rocketfish (image Screenshot_20170719_131350). Also an error. Will try another camera on my Ubuntu and will post result later.

Btw, if 'video' set to false in media constraints while pass to Navigator.getUserMedia, audio only works fine. Not sure if it helps  ...
Selection_003.png
99 KB View Download
Selection_004.png
67.6 KB View Download
Screenshot_20170719_131350.png
80.4 KB View Download

Comment 10 by hpol...@gmail.com, Jul 19 2017

Just tested with 045e:00f4 Microsoft Corp. LifeCam VX-6000 (SN9C20x + OV9650).
no difference. Same error getUserMedia error: NotFoundError from link https://webrtc.github.io/samples/src/content/getusermedia/gum/

Still works properly on Firefox....
getUserMedia - Chromium_005.png
64.9 KB View Download
Thanks. One more thing, could you please navigate to chrome://media-internals/ and click on the Video Capture tab and show me what it looks like? Note, you may need to open https://webrtc.github.io/samples/src/content/getusermedia/gum/ or any other website that tries to access the camera for that tab to populate.

Comment 12 by hpol...@gmail.com, Jul 19 2017

Here it is.
Selection_006.png
42.2 KB View Download
Cc: -guidou@chromium.org
Owner: guidou@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks. Based on this, the issue is very likely that the driver reports the supported frame rate as 0.0 fps. Newer versions of Chromium reject cameras unless they report a "reasonable" supported frame rate. I believe there is a command-line switch that enables the old behavior, which you could try to confirm this theory: --enable-features=MediaStreamOldVideoConstraints

guido@: Do you have any recommended course of action for this situation?


Comment 14 by hpol...@gmail.com, Jul 19 2017

Well. Here some tests I've done based on your answer.
Starting chromium from command line with: -enable-features=MediaStreamOldVideoConstraints  did not solve problem for browser. Not sure what have changed in linux driver or chromium itself, but this cam was working before in chromium.

Anyway. I ran some tests on linux using  v4l2-ctl utility with '--all' flag on 3 different cameras.
Driver reports different FPS values as you can see from attachement file and even as you expected invalid (0/0) rate.
But what I'm thinking is this. The older cameras were not that advanced and like mine, which did not worked, reports Pixel Format : 'JPEG', however newer cams reports  Pixel Format : 'MJPG' or Pixel Format : 'YUYV' (maybe more of those types), where FPS makes perfect sence.

I'm guessing (it's just mine opinion, please don't consider this as recommendation) when chromium queries available media from system, besides just FPS for example, maybe look at supported media format and if FPS is applicable for this format type, then decide if media is good for use or it's old junk or maybe just ignore that parameter if it's not critical. Again, it's just my opinion. There is probably many other ways around and even open ticket to linux portal to update/fix their driver implementation....

Also, linux driver 'gspca_zc3xx' gave me invalid FPS (0/0) on 2 older cameras and those did not worked. But when I pluged newest modern cams and linux driver 'uvcvideo' was used, chromium start working.....So maybe after all linux team needs to fix or update their driver, but I'm not sure how fast that will happened.

Thanks for you time. I hope it'll help you anyhow. Please see attachement.
WebRTC-cam-test.txt
7.1 KB View Download
If the camera does not report a frame rate of at least 1fps, it will be rejected in M58 and later.
The --enable-features=MediaStreamOldVideoConstraints switch makes 59 and 60 work like 58, so it will not work in this case.

Since this is not the first bug related to cameras that report incorrect frame rates, I think we should patch Chrome to be less strict about that.

Let's keep this bug open and I'll prepare a patch to fix this in 62.
If the patch is simple enough, maybe we'll be able to merge to 61.
Status: Started (was: Assigned)
Project Member

Comment 17 by bugdroid1@chromium.org, Aug 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/18e768a45a41214b25a216c9b4e0d2f765e95121

commit 18e768a45a41214b25a216c9b4e0d2f765e95121
Author: Guido Urdaneta <guidou@chromium.org>
Date: Sat Aug 05 10:03:34 2017

Support cameras that report invalid frame rates.

They should be supported if no constraints are placed on the frame rate.
This CL moves some logic from the algorithm for content capture to a
generic class that supports numeric ranges for both device and content capture.
No behavior change is intended for content capture.

Bug:  739953 
Change-Id: I2ae6f19f75b4c8a404d8bd997bb8d5085eb22b0e
Reviewed-on: https://chromium-review.googlesource.com/596311
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492234}
[modify] https://crrev.com/18e768a45a41214b25a216c9b4e0d2f765e95121/content/renderer/media/media_stream_constraints_util.cc
[modify] https://crrev.com/18e768a45a41214b25a216c9b4e0d2f765e95121/content/renderer/media/media_stream_constraints_util_sets.h
[modify] https://crrev.com/18e768a45a41214b25a216c9b4e0d2f765e95121/content/renderer/media/media_stream_constraints_util_sets_unittest.cc
[modify] https://crrev.com/18e768a45a41214b25a216c9b4e0d2f765e95121/content/renderer/media/media_stream_constraints_util_video_content.cc
[modify] https://crrev.com/18e768a45a41214b25a216c9b4e0d2f765e95121/content/renderer/media/media_stream_constraints_util_video_content_unittest.cc
[modify] https://crrev.com/18e768a45a41214b25a216c9b4e0d2f765e95121/content/renderer/media/media_stream_constraints_util_video_device.cc
[modify] https://crrev.com/18e768a45a41214b25a216c9b4e0d2f765e95121/content/renderer/media/media_stream_constraints_util_video_device_unittest.cc
[modify] https://crrev.com/18e768a45a41214b25a216c9b4e0d2f765e95121/content/renderer/media/user_media_client_impl_unittest.cc

Labels: Needs-Feedback
hpolk00@gmail.com: Can you try a recent Canary to check how it works with some of the cameras that are giving problems due to the reported zero frame rate?

Comment 19 by hpol...@gmail.com, Aug 8 2017

I will do that in a few days. Currently out of town.
Labels: Merge-Request-61
Project Member

Comment 21 by sheriffbot@chromium.org, Aug 13 2017

Labels: -Merge-Request-61 Merge-Review-61 Hotlist-Merge-Review
This bug requires manual review: M61 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), ketakid@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-61 Merge-Rejected-61
This bug has been exists since M59 or earlier(not an M61 regression), M61 is already in Beta and we're only taking critical merges in. Hence, rejecting merge to M61. Please let me know is there is any concern here. 
Status: Fixed (was: Started)
Closing as fixed.
hpolk00@gmail.com: Can you verify on a recent Chrome Canary?

Comment 24 by hthet...@gmail.com, Jan 21 2018

I have seen this error "notReadableError" append on android chrome 63 when asking camera via getUserMedia, but succeed on retry in all my cases, see user agent bellow.

Mozilla/5.0 (Linux; Android 7.0; SM-G925T Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36

Sign in to add a comment