Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

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

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

Comments

@peterpeterparker
Copy link

peterpeterparker 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
Copy link

FazioNico 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 [email protected]

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

@yankedev
Copy link

I can confirm the issue is fixxed with [email protected]

@villarres
Copy link

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 [email protected] resoud only for myApp tabs

@mhartington
Copy link
Contributor

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
Copy link
Contributor

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

@bernardlau92
Copy link

3.1.6 solves the issue. Thank you.

@peterpeterparker
Copy link
Author

@mhartington thx, the fix works perfectly

@EugeneSnihovsky
Copy link

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

@newsof1111
Copy link

have you try adding --local to your cmd?

@SimonBrazell
Copy link

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
Copy link

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
Copy link

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
Copy link

+1

@cquezpro
Copy link

I got same issue.

@smallg
Copy link

smallg commented Dec 5, 2018

thanks FazioNico, it fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests