Skip to content

General error message for Copy failure details on non-HTTPS and non-localhost webpages #3803

@lisli1

Description

@lisli1

Describe the bug

"Copy failure details" from an issue dialog on a non-secure webpage, such as http://www.washington.edu/accesscomputing/AU/before.html, does not work due to Chrome disabling clipboard access for security reasons (see Additional context). The error message says "Failed to copy failure details. Please try again."

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://www.washington.edu/accesscomputing/AU/before.html
  2. Open extension popup
  3. Run FastPass
  4. Open an issue dialog by clicking on any ! in the highlighted issue boxes on the target page
  5. Select "Copy failure details"
  6. See toast with message "Failed to copy failure details. Please try again."

CodePen repro example

Expected behavior

Have the toast error message be more descriptive of why the copying is failing, or print an error in the console that points out the issue.

Screenshots

Context (please complete the following information)

Are you willing to submit a PR?

yes

Did you search for similar existing issues?

yes

Additional context

According to https://stackoverflow.com/questions/51805395/navigator-clipboard-is-undefined/51823007#51823007, Chrome disables the clipboard for any page that does not have a secure origin (HTTPS or localhost) for security reasons.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomersstatus: resolvedThis issue has been merged into main and deployed to canary.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions