Skip to content

NotAllowedError: Permission denied #1044

@naams886

Description

@naams886

Describe the bug
A NotAllowedError: Permission denied is triggered when calling Html5QrcodeScanner.render(). This occurs even when the browser-level camera permissions are set to "Allow." The issue appears specific to the Google Apps Script Web App environment where the code is executed within a cross-origin iframe.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy the provided script as a Google Apps Script Web App (executed as "Me" with "Anyone within Organization" access).
  2. Open the Web App URL in Chrome.
  3. Click on the "Request Camera Permissions" button.
  4. Observe the red error bar showing NotAllowedError: Permission denied appears in the red UI bar immediately.

Expected behavior
The camera should initialize and show the video feed for scan the QR code.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome / Edge
  • Version: Chrome (Version 145.0.7632.160) / Edge (Version 145.0.3800.97)

Smartphone (please complete the following information):

  • Device: OPPO, SAMSUNG TAB
  • OS: Android 16
  • Browser: Chrome
  • Version: 145

Additional context

  • Library version: Using the latest version from unpkg
  • Attempted Fixes: Switching to the non-workspace URL (omitting /a/domain/) and using Incognito mode did not resolve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions