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

Testing Ionic 4 - Error: listen EADDRINUSE 127.0.0.1:8200 #3052

Closed
peterennis opened this issue Mar 31, 2018 · 4 comments
Closed

Testing Ionic 4 - Error: listen EADDRINUSE 127.0.0.1:8200 #3052

peterennis opened this issue Mar 31, 2018 · 4 comments
Labels

Comments

@peterennis
Copy link

peterennis commented Mar 31, 2018

Windows 10, x64

Description:
Running ionic serve multiple times increments the browser session. Good.

capture260

Running lab fails after the first session.
There are no phantom node process running.

Steps to Reproduce:

Output:

C:\ae\adaept.com\aeion4>ionic serve --lab --browser chrome
> ng serve --host=0.0.0.0 --port=8108 --progress=false
> ionic-lab http://localhost:8108 --host localhost --port 8200 --app-name aeion4 --app-version 0.0.1
[lab] events.js:183
[lab]       throw er; // Unhandled 'error' event
[lab]       ^
[lab]
[lab] Error: listen EADDRINUSE 127.0.0.1:8200
[lab]     at Object._errnoException (util.js:1022:11)
[lab]     at _exceptionWithHostPort (util.js:1044:20)
[lab]     at Server.setupListenHandle [as _listen2] (net.js:1351:14)
[lab]     at listenInCluster (net.js:1392:12)
[lab]     at GetAddrInfoReqWrap.doListen [as callback] (net.js:1501:7)
[lab]     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)
[ng] Date: 2018-03-31T06:05:04.062Z
[ng] Hash: d2961f4a7dcbb624d21d
[ng] Time: 12207ms
[ng] chunk {inline} inline.bundle.js (inline) 3.85 kB [entry] [rendered]
[ng] chunk {main} main.bundle.js (main) 23.9 kB [initial] [rendered]
[ng] chunk {polyfills} polyfills.bundle.js (polyfills) 548 kB [initial] [rendered]
[ng] chunk {styles} styles.bundle.js (styles) 47.8 kB [initial] [rendered]
[ng] chunk {vendor} vendor.bundle.js (vendor) 9.53 MB [initial] [rendered]
[ng] webpack: Compiled successfully.

My ionic info:

C:\ae\adaept.com\aeion4>ionic info
cli packages: (C:\Users\peter\AppData\Roaming\npm\node_modules)

   @ionic/cli-utils  : 2.0.0-rc.1
   ionic (Ionic CLI) : 4.0.0-rc.1

global packages:

   cordova (Cordova CLI) : 8.0.0

local packages:

   @angular-devkit/core       : 0.4.6
   @angular-devkit/schematics : 0.4.6
   @angular/cli               : 1.7.3
   @ionic/core                : 0.1.3
   Cordova Platforms          : none
   Ionic Framework            : @ionic/angular 0.0.2-29

System:

   NodeJS : v8.9.4
   npm    : 5.6.0
   OS     : Windows 10

Environment Variables:

   ANDROID_HOME : not set


C:\ae\adaept.com\aeion4>

Other Information:

@peterennis
Copy link
Author

gif screen loop:

address-in-use2

@peterennis
Copy link
Author

Exit the app with Ctrl-C in the command window and run again causes the error.
It requires closing the command processor and restarting to get lab to work again.

@JayDz3
Copy link

JayDz3 commented Mar 31, 2018

Same issue here, with slightly different syntax. Same process to fix the issue. Must close out my ide (Visual Studio Code) and restart to get serve working once again.

[app-scripts] [13:22:42]  watch started ...
[app-scripts] [13:22:42]  build dev started ...
[app-scripts] events.js:183
[app-scripts]       throw er; // Unhandled 'error' event
[app-scripts]       ^
[app-scripts]
[app-scripts] Error: listen EADDRINUSE :::53703
[app-scripts]     at Object._errnoException (util.js:1024:11)
[app-scripts]     at _exceptionWithHostPort (util.js:1046:20)
[app-scripts]     at Server.setupListenHandle [as _listen2] (net.js:1351:14)
[app-scripts]     at listenInCluster (net.js:1392:12)
[app-scripts]     at Server.listen (net.js:1476:7)
[app-scripts]     at new WebSocketServer (C:\apps\contactgenerator\node_modules\ws\lib\WebSocketServer.js:77:20)
[app-scripts]     at Object.createNotificationServer (C:\apps\contactgenerator\node_modules\@ionic\app-scripts\dist\dev-server\notification-server.js:66:15)
[app-scripts]     at C:\apps\contactgenerator\node_modules\@ionic\app-scripts\dist\serve.js:47:31
[app-scripts]     at <anonymous>
[app-scripts]     at process._tickCallback (internal/process/next_tick.js:188:7)

@imhoffd imhoffd added the bug label Apr 2, 2018
@imhoffd
Copy link
Contributor

imhoffd commented Apr 2, 2018

@JayDz3 That's a slightly different issue, even if it's a similar-looking error. Should be fixed with the next RC release (today or tomorrow). More info: #3022 (comment)

@peterennis I am able to reproduce the issue. Will fix this soon!

Exit the app with Ctrl-C in the command window and run again causes the error.
It requires closing the command processor and restarting to get lab to work again.

Yeah, I've seen this with Windows. Ctrl-C should definitely kill the processes/servers of the command that was just killed, but for some reason it doesn't. Haven't been able to reproduce on my Windows machine yet. It's why I opened this issue: #3022

@imhoffd imhoffd closed this as completed in 532c227 Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants