-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The app serving listener (ionic serve) stops working after making any code change #13668
Comments
Using ionic 2 and got the same error |
I've noticed that previous projects work just fine unlike the newly generated ones where I have got the same problem upon saving (vscode) or refreshing the page (browser)
|
"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
.., that's it until they fix the bug with ws v3.3.4. |
You can run |
This worked for me, I went crazy because of this most of yesterday. Thanks for saving me today! |
Hello! Thank you for opening an issue with us! I am going to close this as it is not an issue with the Ionic Framework. Thank you for using Ionic |
yup ws change.. websockets/ws#1256 |
@kensodemann there is no |
@lpinca - Thank-you, but that is not Ionic Framework code. This issue list is only for the Ionic Framework. There might be a CLI issue open on this same topic. If you would like to see something changed in the CLI related to this you should raise that on the CLI's issue list, or issue a PR against the CLI fixing it. |
Got it, sorry about that, I wrongly assumed that the CLI was part of the Ionic Framework. |
@lpinca - that's cool. It is confusing as to what is what, we are working on making things less confusing in the future... On the issue itself, though, I was just discussing this with someone internally, and we will likely pin the |
@kensodemann whatever is better for you, you could just log the errors as you do when JSON parsing fails and eventually ignore socket errors but that's up to you. |
Just keep in mind that there are other errors that can be emitted, also on |
For anyone following this, I suggest following one of these issues where this is being worked on: |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
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:
![Shell console errors](https://camo.githubusercontent.com/ad3948e60c4cd69950a5f248eca5f711f74e5086143e45c895ddef579b548a0d/68747470733a2f2f696d6167652e6962622e636f2f6b4e584c66522f696f6e69635f657272322e706e67)
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):The text was updated successfully, but these errors were encountered: