Error loading Webpack-Dev-Server while accessing VirtualBox

I am trying to check the compatibility of my website with Internet Explorer 11 using VirtualBox on my Mac. I started the local server using Webpack-Dev-Server.

When I accessed the webpage via http://10.0.2.2:8080 , the site loaded fine; but the inspector panel repeatedly repeated this error:

SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd. [WDS] Disconnected! 

Any tips on how to fix this error? Thanks!

+7
internet-explorer virtual-machine virtualbox webpack-dev-server
source share
2 answers

There can be many reasons, one may be in the interface tracks:

In my setup, the webpack server proxied the Symfony server to localhost: 8000. In the interface, I had this path in the configuration variable:

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

This caused requests to localhost: 8000 inside VirtualBox. I modified it to have a VirtualBox virtual bridge:

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

With this change, I got my application running on VirtualBox.

+2
source share

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

+1
source share

All Articles