MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.94k stars 4.88k forks source link

failed to execute fetch on 'window': the origin of '*/api' should be same as 'chrome-extension*' #6400

Closed winsvega closed 3 years ago

winsvega commented 5 years ago

Describe the bug The metamask seems to be unable to estimate the gas fee. Label stays like this: Transaction Fee: Loading... and nothing happens.

Console Log:

Uncaught (in promise) TypeError: Failed to execute 'fetch' on 'Window': The origin of 'https://dev.blockscale.net/api/' should be same as 'chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn'
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui.js:1:216722
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui.js:1:2909447
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui.js:1:2221333

The network tab shows this one failing:

Request URL: https://sentry.io/api/273505/store/?sentry_key=<hash>&sentry_version=7
Request Method: POST
Status Code: 429 TOO MANY REQUESTS
Remote Address: 35.188.42.15:443
Referrer Policy: no-referrer-when-downgrade

=====>>>This issue break metamask completely.<<<=====

To Reproduce Ubuntu 16.04. Metamask chrome plugin. Metamask default behavior: Metamask does not work.

Expected behavior Metamask should sign and send transactions Metamask should estimate at least the minimum gasFee for a transaction.

Browser details (please complete the following information):

Screenshots https://ibb.co/NWKn9WX https://ibb.co/q7YBtWw (might require proxy it seems in some regions)

bdresser commented 5 years ago

@winsvega is this from attempting to initiate a transaction from the extension? would you mind sharing a screenshot and checking your background and UI logs for errors? (instructions here)

tmashuang commented 5 years ago

Ability to set the gasFee manually

Settings -> Advanced -> Toggle Advanced gas controls

winsvega commented 5 years ago

does not work even in advanced menu

winsvega commented 5 years ago

https://ibb.co/NWKn9WX

winsvega commented 5 years ago

https://ibb.co/q7YBtWw

winsvega commented 5 years ago

Metamask version 6.3.2 Chrome version Version 60.0.3112.90 (Official Build) (64-bit) Ubuntu 16_04 LTS

bdresser commented 5 years ago

@winsvega we're still having trouble reproducing, and the links you posted above don't resolve. Could you check again? It's possible the ethgasstation API we use went down briefly.

winsvega commented 5 years ago

Links work. Try opening it via proxy. It has debug log on a screenshot

winsvega commented 5 years ago

up

this issue is more than a year already. I think it was since the beginning. Is anyone using metamask on linux at all? the best I could get is sendin a couple of transactions and then it stack on some issue again.

Our team had a very bad experience working with metamask. (we had to develop our own tool) I personally could not use it at all because of this issue.

tmashuang commented 5 years ago

This could be a an API issue, although we use two different services for the gas prices. In the same Console, can you show the Network tab for HTTP response status codes?

pytour commented 5 years ago

I have the same issue and i solved it by installing metamask on Brave browser.

winsvega commented 5 years ago

The network tab shows this one failing:

Request URL: https://sentry.io/api/273505/store/?sentry_key=<hash>&sentry_version=7
Request Method: POST
Status Code: 429 TOO MANY REQUESTS
Remote Address: 35.188.42.15:443
Referrer Policy: no-referrer-when-downgrade
winsvega commented 5 years ago

I have the same issue and i solved it by installing metamask on Brave browser.

instructions from their official page does not work I've heard that Brave brwoser been dead for a while now

curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -

source /etc/os-release

echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ $UBUNTU_CODENAME main" | sudo tee /etc/apt/sources.list.d/brave-browser-release-${UBUNTU_CODENAME}.list

sudo apt update

sudo apt install brave-keyring brave-browser
Gudahtt commented 5 years ago

The Sentry request failures you're seeing aren't responsible for this problem - you can ignore those.

I'm seeing reports of this issue affecting users of Chromium-derived browsers between v60 and v64. Could you try updating your browser to a more recent version? I haven't managed to figure out why it's failing yet, but I'm guessing something about that fetch request was broken between those browser versions.

kumavis commented 5 years ago

Our team had a very bad experience working with metamask.

@winsvega sorry to hear that, happy to hear any and all feedback to help solve the shortcommings

I've heard that Brave brwoser been dead for a while now

brave is alive and well.

Is anyone using metamask on linux at all?

I've used and developed metamask on ubuntu and qubes. haven't had any issues besides some visual ones in qubes

tmashuang commented 3 years ago

We have since moved from blockscale to ethgasstation, PR that implementated #7059.