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

Issue 885184 link

Starred by 6 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug
Team-Security-UX



Sign in to add a comment

Issue in the "Camera" permission flow with Mac Mojave OSX

Reported by siva.a.s...@gmail.com, Sep 18

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

Steps to reproduce the problem:
1. Reset the "Camera" permission from the terminal ("tccutil reset Camera" command helps resetting permission)
2. Invoke the getUserMedia API, please use this jsfiddle page, https://jsfiddle.net/r60bzmrs/
3. Allow the browser permission to access Camera, (If it was not available)
4. If the browser permission is allowed, now OS prompt for Camera permission.
5. Choose "Don't Allow" from both the prompts,
6. No error reported.

Note : Reset the OS permission for reproducing this issue, please refer step 1.

What is the expected behavior?
1. The getUserMedia API should wait and resolve only if the OS permission is allowed by the user.
2. Else that API should throw an error, If the OS permission is "Don't allowed".

What went wrong?
1. The getUserMedia API resolves with the stream before the OS permission.
2. And the video stream is not playable as the OS permission is not grated by the user.

Did this work before? N/A 

Does this work in other browsers? No
 https://bugzilla.mozilla.org/show_bug.cgi?id=1479051

Chrome version: 69.0.3497.100  Channel: stable
OS Version: OS X 10.14.0
Flash Version: 

This change is required from the Mac Mojave OSX.
 
Labels: Proj-MacMojave
Labels: Needs-Triage-M69
Labels: Triaged-ET
siva.a.shankar@ - Thanks for filling the issue...

As per the original comment, the issue is specific to Mac Mojave. 
As we don't have that particular Mac OS to test and confirm the issue from TE end, requesting the appropriate team to look into the issue and help in further triaging..

Thanks...
Components: Internals>Permissions>Model
 Issue 885183  has been merged into this issue.
Owner: ellyjo...@chromium.org
Status: Assigned (was: Unconfirmed)
ellyjones: Seems this is an issue with the interaction between Mac OS's camera permission and Chrome's permission, could you take a look (and reassign if appropriate?) Thanks!
The microphone permission also problematic, there is no error thrown if the user has rejected microphone access, it will just give empty sound stream
Cc: rsesek@chromium.org dalecur...@chromium.org
Owner: a...@chromium.org
mac triage: over to avi@, who is on point for the 10.14 permissions flow.
Cc: ossu@chromium.org
Poking this one, specifically for the microphone side of things. Is the permissions check something that we can/have to trigger manually from within Chrome in Mojave? I was under the impression the OS would somehow deal with that.

If it is, then we need to do so. Mojave is rolled out enough that it should be straightforward to test. If it isn't, then we need to figure out why Chrome is marked as without that permission - perhaps something goes wrong during the macOS upgrade? 
In Mojave, the OS will now *always* mediate access to protected resources; there is no auto-granting of the permission. The OS prompt is one-shot at the time of accessing the resource, and users can grant access later in System Preferences. Apps can query and request permission in a flow that is separate from trying to acquire the resource for the first time. More info here: https://developer.apple.com/videos/play/wwdc2018/702/
Thanks for the link!

For audio, it seems like we could plug in a call to AVCaptureDevice::authorizationStatusForMediaType() without too much hassle, and fail early, rather than creating an audio stream that's just silent. I guess that would require us to pull that in weakly, considering it's part of the 10.14 SDK.
Yes, something like that would work. The new way to handle future-SDK things is to use the |if (@availalble(macOS 10.14, *))| syntax, which handles some of the old complexity with weak linking.
Cc: niklase@chromium.org chfremer@chromium.org
Cc: olka@chromium.org maxmorin@chromium.org
 Issue 921480  has been merged into this issue.
Labels: -Pri-2 Pri-1
Bumping this bug up a bit: the audio team have gotten several reports of the microphone just silently not working on macOS Mojave, all solved by having the user go into System Preferences and ensure that Google Chrome has the right permission.

IMO, there needs to be some UX in place to inform the user that Chrome is not allowed to read the Microphone / Camera when a that hasn't been blocked in Chrome asks for Microphone or Camera. Is this the right bug to track that work?

For audio, I could add a check like in #11, where we'd just fail earlier if we don't have permission, but it's possible it would create timing issues. It also doesn't actually help the user get audio working, just makes it more obvious when it's not working.

Comment 16 by ossu@chromium.org, Yesterday (42 hours ago)

Cc: grunell@chromium.org

Comment 17 by naicuoct...@gmail.com, Today (19 hours ago)

While testing with Chrome 71.0.3578.98 on Mojave 10.14.2 I noticed that on refresh an error IS thrown (NotReadableError).

In my experience, the only time the error is NOT thrown is the 1st time the browser asks for OS level permissions and you deny them. If you refresh you get a proper NotReadableError.

I was able to replicate the issue with the JSFiddle in the initial bug report https://jsfiddle.net/r60bzmrs/ , with this CodePen listing getUserMedia() errors https://codepen.io/naicuoctavian/pen/wPeZWO and with the production video recorder at https://addpipe.com

Comment 18 by naicuoct...@gmail.com, Today (19 hours ago)

FFox 64 always throws an error: when you're 1st asked for the OS level permission and you deny AND on refresh (after denying).

The error thrown by FFox is NotFoundError. 

To clear the OS level permissions use these Terminal commands:
tccutil reset Camera
tccutil reset Microphone

Sign in to add a comment