10

I am trying to test my website compatibility for Internet Explorer 11, using VirtualBox in my Mac. I ran a local server using Webpack-Dev-Server.

When I accessed the web page via http://10.0.2.2:8080, the site is loaded fine; but the inspector panel keep throwing this error repeatedly:

SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd. 

[WDS] Disconnected!

Any clues how to fix this error? Thanks!

Danny
  • 543
  • 1
  • 5
  • 14

2 Answers2

4

There may be many reasons, one may be in frontend paths:

In my setup the webpack server was proxying into Symfony server at localhost:8000. At frontend, I had that path in a config variable:

var configuration = {
    apiPath: 'http://localhost:8000/api/v1/'
}

That caused requests into localhost:8000 inside VirtualBox. I changed it to have VirtualBox localhost bridge path:

var configuration = {
    apiPath: 'http://10.0.2.2:8000/api/v1/'
}

With that change I got my app working in VirtualBox.

  • Legend! I had my webpack config 'publicPath' set to the IIS 'http://localhost:4000', but when I access it in VirtualBox it's via a 'http://localhost.fiddler:4000' url. Updating the webpack config with the 'fiddler' url solved the problem for me. – Jim Doyle Jan 26 '17 at 10:49
1

You need to set localhost to 10.0.2.2 in your hosts file. This answer shows how.

Community
  • 1
  • 1
Jay
  • 3,471
  • 4
  • 35
  • 49