Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS issue with 1.2.0 on Firefox and Safari #2978

Closed
kivutar opened this issue Jul 29, 2019 · 6 comments
Closed

CORS issue with 1.2.0 on Firefox and Safari #2978

kivutar opened this issue Jul 29, 2019 · 6 comments
Assignees
Labels
1.x 1.0 related issues Bug Addressing a bug

Comments

@kivutar
Copy link

kivutar commented Jul 29, 2019

Steps to reproduce:

  • Import web3 1.2.0
  • var web3 = new Web3(new Web3.providers.HttpProvider('https://rinkeby.infura.io/'));
  • web3.eth.getTransaction('0xd540f813d46953f5bf7c0b3797572ff6b73eee0eeadfac071baee0da9a7a9b5a').then(console.log);

You will get the following error messages:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://rinkeby.infura.io/. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://rinkeby.infura.io/. (Reason: CORS request did not succeed).
Error: Invalid JSON RPC response: ""

Doesn't happen on Brave or Chrome or the new Edge, but happens on Firefox, Safari and Safari Mobile.

@nivida nivida added 1.x 1.0 related issues Bug Addressing a bug labels Jul 29, 2019
@dillonsvincent
Copy link

Is there a fix in sight, this isn't the first time this issue has come up. It was in earlier versions as well. Is anyway we can get a client test in place to send a test call to infura from webkit before a release? You could use something like phantomJS or another headless webkit testing framework.

@felixwatts
Copy link

this is pretty serious guys

@cgewecke
Copy link
Collaborator

cgewecke commented Oct 8, 2019

@felixwatts Just leaving a note - it looks like this is fixed on the 2.0 branch with #2564.

Will prioritize back-porting that to 1.x but it could still be a bit before it makes it to a published patch.

@nivida
Copy link
Contributor

nivida commented Oct 8, 2019

@cgewecke I will back port this fix this week to include it in the next release.

@felixwatts The next version will be published after devcon when I‘m back home.

@davidtacer
Copy link

I can't install 1.2.2 version. I tried with node versions: 10.16.3, 12.10.0, 12.13.0, 13.1.0

@alcuadrado
Copy link

Can you post the errors you are getting @davidtacer? Or better yet, open another issue with them? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Bug Addressing a bug
Projects
None yet
Development

No branches or pull requests

7 participants