Event.js:182 Getting error from ionic serve immediately


#1

I am getting this exception all of a sudden with the starter project installing all of the latest stuff.

Setup

 ionic start great blank

/Users/pbrack/dev/temp/great:ionic info

cli packages: (/Users/pbrack/.nvm/versions/node/v8.2.1/lib/node_modules)

    @ionic/cli-utils  : 1.10.1
    ionic (Ionic CLI) : 3.10.1

local packages:

    @ionic/app-scripts : 2.1.4
    Ionic Framework    : ionic-angular 3.6.1

System:

    Node : v8.2.1
    npm  : 5.3.0
    OS   : macOS Sierra

/Users/pbrack/dev/temp/great:

Error I am getting


[18:46:37]  sass finished in 961 ms
[18:46:37]  postprocess started ...
[18:46:37]  postprocess finished in 5 ms
[18:46:37]  lint started ...
[18:46:37]  build dev finished in 8.75 s
[18:46:37]  watch ready in 8.79 s
[18:46:37]  dev server running: http://localhost:8100/

[INFO] Development server running!
       Local: http://localhost:8100
       External: http://10.210.108.20:8100, http://169.254.53.88:8100

[18:46:39]  lint finished in 1.73 s
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: send EHOSTUNREACH 169.254.255.255:41234
    at Object.exports._errnoException (util.js:1024:11)
    at exports._exceptionWithHostPort (util.js:1047:20)
    at SendWrap.afterSend [as oncomplete] (dgram.js:474:11)
/Users/pbrack/dev/temp/great:

#2

I am having this issue when running ionic lab. Here is my info, just updated, not sure if that is related.

cli packages: 

    @ionic/cli-utils  : 1.10.1
    ionic (Ionic CLI) : 3.10.1

global packages:

    Cordova CLI : 7.0.1

local packages:

    @ionic/app-scripts : 1.3.7
    Cordova Platforms  : android 6.1.2 ios 4.3.1 windows 4.4.3
    Ionic Framework    : ionic-angular 3.3.0

System:

    ios-deploy : 1.9.1
    ios-sim    : 6.0.0
    Node       : v6.11.0
    npm        : 3.10.10
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.2 Build version 8E2002

EDIT: and the error

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

Error: send EHOSTUNREACH 169.254.255.255:41234
    at Object.exports._errnoException (util.js:1018:11)
    at exports._exceptionWithHostPort (util.js:1041:20)
    at SendWrap.afterSend [as oncomplete] (dgram.js:405:11)

#3

Also getting the same error.

[14:23:22]  build dev finished in 8.57 s 
[14:23:22]  watch ready in 8.61 s 
[14:23:22]  dev server running: http://localhost:8100/ 

[INFO] Development server running!
       Local: http://localhost:8100
       
[14:23:24]  lint finished in 2.64 s 
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: send EHOSTUNREACH 169.254.255.255:41234
    at Object._errnoException (util.js:1041:11)
    at _exceptionWithHostPort (util.js:1064:20)
    at SendWrap.afterSend [as oncomplete] (dgram.js:474:11)


`ionic info`


cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.10.1
ionic (Ionic CLI) : 3.10.1

local packages:

@ionic/app-scripts : 2.1.4
Ionic Framework    : ionic-angular 3.6.1

System:

Node : v8.4.0
npm  : 5.3.0 
OS   : macOS Sierra

#4

Fixed… at least for me

By simply unplugging my iPhone from my Mac and then running ionic serve again fixed the problem.

It appears that ionic serve listens on all network interfaces which was causing a problem when my iPhone was plugged into my Mac. Mac uses the en5 interface to access the internet when tethered to your iPhone via a USB cable).

Type ifconfig from bash and look for interface en5. Specifically the ‘broadcast’ address.

en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 72:81:eb:20:92:8c 
	inet6 fe80::1cd2:9644:4838:322%en5 prefixlen 64 secured scopeid 0xd 
	inet 169.254.116.231 netmask 0xffff0000 broadcast 169.254.255.255
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect (100baseTX <full-duplex>)
	status: active

Hope this helps.


#5

Do you know anything about that IP?

Can you run ionic serve --verbose and post the complete output please?

Same for you @codemax999

Ionic CLI added some new functionality with a discovery protocol thingie for an upcoming development feature I think which might be causing this.


#6

Yeah, this is the solution. Unplug your iPhone. Many thanks!


3.10.1 Ionic Cli crashes ionic serve
#7

I create an issue for Ionic CLI about this:


#8

I’m having the same problem.


#9

Unplugging the iPhone didn’t help?


#10

Yes, but I need to connect my iPhone. I rollback to 3.9.2


#11

I spend 8 hours of my time to discover that this was the Problem! Fixed by simply unplugging my iPhone from my MacBook and than run ionic serve again…

Thank you!


#12

(Giving Github issues :+1: is like voting for getting something fixed by the way. For now only 3 people have done that.)


#13

this definitely works for me as well… wonder what the real issue is.


#14

This was fixed (actually the error was just hidden as this feature is not used yet and the app didn’t crash, it only output this useless error in the console…) in Ionic CLI 3.10.3 and should not be a problem any more.


#15

Excellent! It worked for me too.