Skip to content

Setting "Enable on Click" causes MetaMask to silently fail #11099

Open
@shoenseiwaso

Description

@shoenseiwaso

Describe the bug
In the Chrome Extensions settings page, setting MetaMask to "Enable on Click" instead of "Enable on all Sites" causes MetaMask to silently fail.

With "Enable on Click" set, even once MetaMask is enabled on a site, it will make a POST + Preflight request to Infura in the backend, which fails with a CORS error.

image

image

With "Enable on all Sites" checked, there is no Preflight check, it's just a POST:

image

Steps to reproduce (REQUIRED)
Steps to reproduce the behavior, libraries used with version number, and/or any setup information to easily reproduce:

  1. In Chrome, navigate to chrome://extensions/
  2. Toggle Developer mode to ON
  3. Click into the MetaMask settings page
  4. Select Site access > On click
  5. Open up Uniswap
  6. Click the MetaMask icon to enable it, and reload the page
  7. Enter an ETH amount and select a destination token. Note that no tokens load
  8. Go back to the MetaMask settings page and click the background.html link under Inspect views
  9. Observe the POST + Preflight errors

Expected behavior
MetaMask works with "Enable on Click"

Browser details (please complete the following information):

  • OS: macOS 10.15.7
  • Browser: Chrome version 90.0.4430.212 (Official Build) (x86_64)
  • MetaMask Version: 9.5.2

Additional context (Error Messages, etc.)
This used to work, but broke at some point in the past couple of weeks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions