Description
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.
With "Enable on all Sites" checked, there is no Preflight check, it's just a POST:
Steps to reproduce (REQUIRED)
Steps to reproduce the behavior, libraries used with version number, and/or any setup information to easily reproduce:
- In Chrome, navigate to chrome://extensions/
- Toggle Developer mode to ON
- Click into the MetaMask settings page
- Select Site access > On click
- Open up Uniswap
- Click the MetaMask icon to enable it, and reload the page
- Enter an ETH amount and select a destination token. Note that no tokens load
- Go back to the MetaMask settings page and click the background.html link under Inspect views
- 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.