Skip to content
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

[ionic serve] Error ECONNRESET - Reload and websocket error breaks server #1345

Closed
peterpeterparker opened this issue Dec 17, 2017 · 15 comments

Comments

Projects
None yet
@peterpeterparker
Copy link

commented Dec 17, 2017

Short description of the problem:

With the last update of Google Chrome, when I refresh a page, the local server (ionic server) breaks.

According @DeMoorJasper in the parcel project, the problem comes when disconnecting the client websocket from the server, which resulted in ECONNRESET, which was ignored in WS 3.3.2 but now triggers an unmatched error

According @iMediaSolutions downgrading the ws dependency of ionic-app-scripts solve the issue (see ionic forum)

What behavior are you expecting?

It should be possible to refresh or reload an app or page etc.

Steps to reproduce:

  1. ionic serve
  2. access http://localhost:8100 in Google Chrome (or Opera)
  3. click refresh (in the browser)
    => server stops/breaks

Log

[17:47:51] sass finished in 1.92 s
[17:47:51] postprocess started ...
[17:47:51] postprocess finished in 235 ms
[17:47:51] lint started ...
[17:47:51] build dev finished in 30.50 s
[17:47:51] watch ready in 30.75 s
[17:47:51] dev server running: http://localhost:8100/

[OK] Development server running!

 Local: http://localhost:8100
 External: http://192.168.43.103:8100, http://169.254.143.79:8100
 DevApp: myapp@8100 on MyMacbook

[17:48:01] lint finished in 9.88 s
events.js:136
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at _errnoException (util.js:999:13)
at TCP.onread (net.js:629:25)

Other information:

Ionic forum: https://forum.ionicframework.com/t/ionic-serve-crash-on-save/115615
Parcel: parcel-bundler/parcel#315

** Duplicate **

ionic-team/ionic-cli#2921
#1344

@FazioNico

This comment has been minimized.

Copy link

commented Dec 18, 2017

Hi! got the same issue from yesterday.
and finaly find solution.
Bug is cause by the latest ionic-app-script pkg using as dependecies ws v.3.3.3 and this version do not working with the latest version of google chrome.

To fix:
remove ./node_modules/ws folder and run $npm install ws@3.3.2

Now we waiting an ionic-app-script update to fix it.
Enjoy

@yankedev

This comment has been minimized.

Copy link

commented Dec 18, 2017

I can confirm the issue is fixxed with ws@3.3.2

@villarres

This comment has been minimized.

Copy link

commented Dec 18, 2017

this solution works for myApp tabs but does not work with myApp blank and myApp sidemenu.
You can try them to see because npm install ws@3.3.2 resoud only for myApp tabs

@mhartington

This comment has been minimized.

Copy link
Member

commented Dec 18, 2017

Hey there! Can you please install the nightly version of app-scripts to verify that all is fixed.

npm install @ionic/app-scripts@nightly --save-dev

This just pins the version to 3.3.2 for now until we properly update ws.

@mhartington

This comment has been minimized.

Copy link
Member

commented Dec 18, 2017

3.1.6 is out now, which has the fix. Please upgrade your app-scripts version

@bernardlau92

This comment has been minimized.

Copy link

commented Dec 19, 2017

3.1.6 solves the issue. Thank you.

@peterpeterparker

This comment has been minimized.

Copy link
Author

commented Dec 19, 2017

@mhartington thx, the fix works perfectly

@EugeneSnihovsky

This comment has been minimized.

Copy link

commented Jan 10, 2018

@mhartington It may be useful to update ionic change log (version of ionic-app-script is hardcoded on 3.1.0 there)

@newsof1111

This comment has been minimized.

Copy link

commented Feb 15, 2018

have you try adding --local to your cmd?

@SimonBrazell

This comment has been minimized.

Copy link

commented Mar 7, 2018

I'm still experiencing this issue on my Windows 7 machine:

[Wed Mar  7 12:45:01 2018] λ ionic info

cli packages: (C:\Users\sbrazell\AppData\Roaming\nvm\v8.9.4\node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.9.4
    npm  : 5.6.0
    OS   : Windows 7

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro
@cccaballero

This comment has been minimized.

Copy link

commented Apr 2, 2018

Hi guys, I still have the issue with Chrome

Your system information:

Cordova CLI: 6.0.0 
Ionic Framework Version: 3.9.2
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 3.1.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v7.2.1
Xcode version: Not installed
@LucaColombi

This comment has been minimized.

Copy link

commented Jun 13, 2018

me too, ionic serve on chrome crash at first reload, ionic serve -w firefox works without problems, error with chrome:

events.js:160
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at exports._errnoException (util.js:1020:11)
at TCP.onread (net.js:568:26)

@maciejkoch

This comment has been minimized.

Copy link

commented Jun 29, 2018

+1

@sirius2013

This comment has been minimized.

Copy link

commented Aug 22, 2018

I got same issue.

@smallg

This comment has been minimized.

Copy link

commented Dec 5, 2018

thanks FazioNico, it fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.