anyone else who tries to read smart contract data through Infura and process it on front-end but gets 'CORS' error? My DAPP works fine in Google Chrome and has no issue in fetching the smart contract data. Same on Internet Explorer. The problem is when I use Microsoft Edge that I'm getting this:

Microsoft Edge Error

My web3 implementation is correct:

import Web3 from 'web3';

let web3;
if (typeof window !== 'undefined' && typeof window.web3 !== 'undefined') {
  // metamask is running
  web3 = new Web3(window.web3.currentProvider);
} else {
  // set up provider through infura
  const provider = new Web3.providers.HttpProvider(
    // pass url of remote node
  web3 = new Web3(provider);


export default web3;

3 Answers 3


I FOUND THE SOLUTION! I was running web3@1.0.0-beta.35 however downgrading to web3@1.0.0-beta.34 fixed it for me.

All credits go to clementbalestrat

  • happy to hear that,please don't forget to accept your own answer.
    – Badr Bellaj
    Oct 13, 2018 at 16:18

If you'd like to avoid downgrading, the most-recent pre-release of Web3 also solves the problem. npm i web3@2.0.0-alpha.1


One possibility is that your computer is configured with an Intranet zone and that Intranet zone is dependent on a proxy configuration script: The Intranet Zone. When Fiddler is running, the proxy settings are pointed at Fiddler itself.

Ah, right, there's another factor at work here if you're using an Intranet site as the target of an XHR from a site in the Internet zone.

Edge runs in Enhanced Protected Mode (AppContainer). That has a feature which blocks access to Private Network Resources from Internet-Zone processes. See the "Private Network resources" section of Understanding Enhanced Protected Mode for more details.

Source: Understanding Enhanced Protected Mode

  • What bothers me is that it worked for weeks and now out of nowhere it stopped. I'm considering setting it up through a proxy but I still want to see if others have any solutions
    – Iulian
    Oct 13, 2018 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.