ngx-scanner icon indicating copy to clipboard operation
ngx-scanner copied to clipboard

In Safari browsers, NotAllowedError stands when denying camera access once and then allowing it

Open mocanapena opened this issue 4 years ago • 1 comments

Describe the bug When user is prompted with the window in Safari browsers to allow or not the camera access, if we click 'Allow' everything works great, but if we click in 'Not allow' and then we click in 'Allow', a console error appears notifying the user the following:

NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

NOTE: The camera seems to be activated as the green light associated to it (mac users) is ON.

To Reproduce

https://stackblitz.com/edit/zxing-scanner-not-allowed

  1. Deny access to camera
  2. Click in Try again button
  3. Camera is activated, but console error is raised and no video is shown in the screen

Expected behavior Camera stream should be visible and console errors should be clean

Screenshots

Desktop (please complete the following information):

  • OS: macOS Catalina 10.15.7
  • Browser: Safari (In Chrome is working fine)
  • Version: 14.0.2

Smartphone (please complete the following information):

  • Device: iPhone6S
  • OS: 14.3
  • Browser Safari
  • Version 14.3

Additional context In Chrome is working as expected

mocanapena avatar Apr 22 '21 18:04 mocanapena

i have the same issue, any explanation or solution for this bug ?

babiibra avatar Jul 01 '21 09:07 babiibra