Livereload for android on device; the connection to the server was unsuccessful

Sorry for so many messages, just wanted to share another problem I’ve encountered with RC.1 and a workaround.

Unfortunately the trick I posted before it’s not enough … the app does load, but without css at all (sigh …)

Really don’t know why (don’t want to dive into ionic’s core or angular’s core) but had to replace the content of main.prod.ts with that of main.dev.ts.

Now my app is working correcly, it takes that enormous 20-25 seconds to load but I’m not experiencing other problems

UPDATE

as for last problem mentioned (dev and prod code) my bad … CLI had a problem installing the plugins so my “only” problem is the long loading time mentioned before for which I can’t find a reason

1 Like

I have a similar issue to this, very frustrating as it used to work in RC0

I am seeing the same issue as you. Incorporating that timeout helped and I am not seeing too bad of startup times (maybe ~8s).

Same problem. The connection error is thrown a few seconds before the app is ready. Very close. Ionic should increase the time for this timeout by default. This behavior is only for the devmode. ionic cordova run android -lc So, why is the timeout time sooooo low? -.-

I have solved by adding thiese lines in the config.xml file:

<preference name="LoadUrlTimeoutValue" value="60000" />
<preference name="SplashScreenDelay" value="60000" />

same problem here. im running my mobile and my mac in the same wifi.
im trying to use the --livereload function, but it doesnt work. i can see a white screen with the error page not found ERR_INVALID_RESPONSE error.

I already got it works once, but as i develop the app after some days when i tried again it stoped working.

  • the code ionic cordova run android works fine!

cli packages: (/Users/ruddy/_apps/musicpro/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) 

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 6.3.0 browser 6.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2 
ios-sim           : 5.0.8 
Node              : v8.11.1
npm               : 5.6.0 
OS                : macOS High Sierra
Xcode             : Xcode 9.4.1 Build version 9F2000 

Environment Variables:

ANDROID_HOME : /Users/ruddy/Library/Android/sdk/