ionic-framework: The app serving listener (ionic serve) stops working after making any code change
Ionic version: (check one with “x”) (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x] 3.x [ ] 4.x
I’m submitting a … (check one with “x”) [x] bug report [ ] feature request
Please do not submit support requests or “How to” questions here. Instead, please use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
I have created a new blank ionic app, and then served it through browser. The app showed in browser correctly, however when I perform any code change, the live reload stops working triggering an error, and the app stops working, forcing me to reserving it again.
The following are JavaScript errors that I see in the browser console:
GET http://localhost:8100/build/main.js net::ERR_CONNECTION_REFUSED ?ionicplatform=ios&ionicstatusbarpadding=true:52 GET http://localhost:8100/build/vendor.js net::ERR_CONNECTION_REFUSED ?ionicplatform=ios&ionicstatusbarpadding=true:48 GET http://localhost:8100/build/polyfills.js net::ERR_CONNECTION_REFUSED ?ionicplatform=ios&ionicstatusbarpadding=true:28 GET http://localhost:8100/cordova.js net::ERR_CONNECTION_REFUSED ?ionicplatform=ios&ionicstatusbarpadding=true:58 GET http://localhost:35729/livereload.js?snipver=1 net::ERR_CONNECTION_REFUSED VM342:164 WebSocket connection to 'ws://localhost:53703/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED WrappedWebSocket @ VM342:164 WrappedWebSocket @ VM361:164 openConnection @ ion-dev.js?v=3.1.5:101 start @ ion-dev.js?v=3.1.5:18 (anonymous) @ ion-dev.js?v=3.1.5:467 ?ionicplatform=windows:28 GET http://localhost:8100/cordova.js net::ERR_CONNECTION_REFUSED ?ionicplatform=windows:39 GET http://localhost:8100/build/main.css net::ERR_CONNECTION_REFUSED ?ionicplatform=windows:48 GET http://localhost:8100/build/polyfills.js net::ERR_CONNECTION_REFUSED ?ionicplatform=windows:52 GET http://localhost:8100/build/vendor.js net::ERR_CONNECTION_REFUSED ?ionicplatform=windows:55 GET http://localhost:8100/build/main.js net::ERR_CONNECTION_REFUSED ?ionicplatform=windows:58 GET http://localhost:35729/livereload.js?snipver=1 net::ERR_CONNECTION_REFUSED VM385:164 WebSocket connection to 'ws://localhost:53703/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED WrappedWebSocket @ VM385:164 WrappedWebSocket @ VM404:164 openConnection @ ion-dev.js?v=3.1.5:101 start @ ion-dev.js?v=3.1.5:18 (anonymous) @ ion-dev.js?v=3.1.5:467 ?ionicplatform=android&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab:28 GET http://localhost:8100/cordova.js net::ERR_CONNECTION_REFUSED ?ionicplatform=android&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab:39 GET http://localhost:8100/build/main.css net::ERR_CONNECTION_REFUSED ?ionicplatform=android&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab:48 GET http://localhost:8100/build/polyfills.js net::ERR_CONNECTION_REFUSED ?ionicplatform=android&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab:52 GET http://localhost:8100/build/vendor.js net::ERR_CONNECTION_REFUSED ?ionicplatform=android&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab:55 GET http://localhost:8100/build/main.js net::ERR_CONNECTION_REFUSED ?ionicplatform=android&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab&http://localhost:8100/ionic-lab:58 GET http://localhost:35729/livereload.js?snipver=1 net::ERR_CONNECTION_REFUSED VM428:164 WebSocket connection to 'ws://localhost:53703/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED WrappedWebSocket @ VM428:164 WrappedWebSocket @ VM447:164 openConnection @ ion-dev.js?v=3.1.5:101 start @ ion-dev.js?v=3.1.5:18 (anonymous) @ ion-dev.js?v=3.1.5:467
The following are the errors that I get through the shell console:
[OK] Development server running!
Local: http://localhost:8100
External: http://192.168.1.3:8100
DevApp: ionic2-app-base@8100 on MacBook-Pro-de-David-2.local
[13:14:40] lint finished in 5.99 s
[13:14:54] build started ...
[13:14:54] deeplinks update started ...
[13:14:54] deeplinks update finished in 14 ms
[13:14:54] template update started ...
[13:14:54] template update finished in 4 ms
[13:14:54] build finished in 26 ms
events.js:160
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at exports._errnoException (util.js:1036:11)
at TCP.onread (net.js:564:26)
Expected behavior:
The ionic serve
command should reload the app with the new changes applied to the code, however it stops working.
Steps to reproduce:
ionic start myApp blank
ionic serve -l
Make code change.
Related code:
Other information:
Ionic info: (run ionic info
from a terminal/cmd prompt and paste output below):
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 6.4.0
local packages:
@ionic/app-scripts : 3.1.5
Cordova Platforms : ios 4.3.1
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.1
ios-sim : 5.0.8
Node : v6.7.0
npm : 5.6.0
OS : macOS Sierra
Xcode : Xcode 9.1 Build version 9B55
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : legacy
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 7
- Comments: 15 (4 by maintainers)
You can run
npm install ws@3.3.2
for a temporary fix as suggested by @professphysics“update”
Alright guys I’ve tried this simple solution which works perfectly for me…, the problem seems to be in the new update for ws version 3.3.3. check it out in package-lock.json where
you can replace that with the previous version 3.3.2 and run
npm install --save
from the console…,npm install --save
from the console…, that’s it until they fix the bug with ws v3.3.4.
For anyone following this, I suggest following one of these issues where this is being worked on:
https://github.com/ionic-team/ionic-app-scripts/issues/1345 https://github.com/ionic-team/ionic-cli/issues/2921