WebSocket connection to 'ws://localhost:35729/livereload' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Hi, I get this error when trying to “emulate” a ionic app from the Ionic Lab:

WebSocket connection to ‘ws://localhost:35729/livereload’ failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

I suppose this is an error connecting to the ionic app within the emulator for debugging purposes?

I tried a test console.error() message in the app and it didn’t show in the Ionic Lab console.

I am very new to ionic, thanks for any help!

1 Like

Still stuck with this, any ideas?

Hi Kaspi , You are running in localhost … ,

ionic serve --address [your ip addesss:8100]

Try this

1 Like

Have same problem , any one have solution ?

I am having the same problem when I try “ionic serve”, since I upgraded ionic-app-script to 1.0.0 today

I had that problem when the serve stopped running.
Check that the serve is running.

i m also having this problem please guid any solution, when i upgrade my ionic cli to the latest

Any news on this? I’m also stuck with this.
cli packages: (/usr/lib/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

local packages:

@ionic/app-scripts : 3.1.6
Ionic Framework    : ionic-angular 3.9.2

System:

Node : v9.3.0
npm  : 5.5.1 
OS   : Linux 4.13

Misc:

backend : pro

I remove ws folder from node_modules. After that, I execute npm install --save ws and version 3.3.3 was installed. Last release is 4.0.0, but with 3.3.3 my problem was fixed.

can u plzz tell me command that should be typed

For remove ws module just navigate to it (node_modules/ws) trought the filesystem and delete it. After that, open your Command Line Interface and type npm install --save ws@3.3.3, or just npm install ws if your packaje.json have the right configuration for ws package.