Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Camera Permission #125

Closed
Raul1198 opened this issue Sep 17, 2020 · 6 comments · Fixed by #128
Closed

[Bug] Camera Permission #125

Raul1198 opened this issue Sep 17, 2020 · 6 comments · Fixed by #128
Labels
affects-upstream Issues that also affect Mozilla Firefox (Fenix) builds bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Raul1198
Copy link

Steps to reproduce

  1. Go to Iceweasel Appinfo
  2. Permissions
  3. Camera
  4. Allow

Expected behavior

Camera permission should be enabled

Actual behavior

Deny irrespective of tapping Allow

Device information

  • Android device: Android 10
  • Fenix version: fork10
@interfect
Copy link
Collaborator

I can replicate what I think this is.

  1. Go to the app info and turn camera permission off.
  2. Open the app, go to the URL bar, and hit "Scan". It prompts to grant camera permission. Hit "Deny".
  3. Having denied it in the dialog, go back to settings and turn it on manually.
  4. Go back to the app and hit "Scan" again. It produces a dialog from the app, telling you to go over to settings and give it camera permission, which it already is supposed to have.
  5. No matter on how many times you click the option in the dialog to go to settings, and toggle camera permission off, or off and on again, when you hit "Scan", you just get the dialog.

I can't seem to get it out of this state either; I can't get the original system permission prompt to come back.

Uninstalling and reinstalling and using the interactive prompt to grant camera permissions instead of the app info settings definitely will work; I was just using the camera that way yesterday.

@interfect
Copy link
Collaborator

I can't reproduce this in Mozilla Firefox. There you always get the interactive permission prompt.

@interfect
Copy link
Collaborator

I bet the problem was introduced by this recent commit. The dialog itself certainly was.

commit 87bd441
Author: Elise Richards erichards@mozilla.com
Date: Thu Sep 10 19:09:38 2020 -0500

For #14239: Notification for QR scan when permissions have been denied (#14553)

* Show dialog when permissions are denied

* Add qr permissions dialog to search dialog fragment

* Add qr permissions dialog to the pairing screen

* Show dialog after permissions have been denied

* Reset focus after denying permissions

* Show dialog after permissions denied in search frag and par frag

* Use shared preferences to store camera permission state

* Move dialog creation into the search controller and add tests

* Dialog controller implementation and test

* Route to intent with correct activity. Set focus when dismissing dialog

* Get preferences in old search

@interfect
Copy link
Collaborator

Probably "Use shared preferences to store camera permission state" is the real problem. If the app has a different idea of what its permissions are than what they actually are, that could cause this.

@interfect interfect added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed and removed needs:triage labels Sep 18, 2020
@interfect
Copy link
Collaborator

This is tracked by Mozilla in mozilla-mobile#14998

@interfect interfect added the affects-upstream Issues that also affect Mozilla Firefox (Fenix) builds label Sep 18, 2020
interfect added a commit that referenced this issue Sep 18, 2020
…ssions have been denied (mozilla-mobile#14553)"

This reverts commit 87bd441.

This should fix #125

This will need to itself be reverted when
mozilla-mobile#14998 is fixed.
@interfect
Copy link
Collaborator

I pulled in Mozilla's fix for the upstream issue. This problem should go away in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-upstream Issues that also affect Mozilla Firefox (Fenix) builds bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants