Hi !
I’ve got a serious problem about my livereload since I upgraded Ionic CLI to the latest version (3.5) with the latest Cordova CLI (7.0).
The said problem is the one described by the title of this topic: I can’t manage to get the livereload.js
script to get loaded when using this command:
$ ionic cordova run android -l
This not only occurs in my own project, but it also occurs with a completely fresh demo app (the tabs one).
This is exactly what I did:
$ ionic start myproject --type ionic1
Then, after selecting the tab template and all the components had been fetched:
$ ionic cordova run android -l
The CLI asks me to install the @ionic/cli-plugin-cordova
plugin, which I did. It then automatically added the platform (cordova platform add --save android
), starts the server and run the app on my Android device.
The app bundles itself with no error, and launched correctly on the device.
But I’ve got this error in my Chrome console:
Failed to load resource: net::ERR_CONNECTION_REFUSED (livereload.js)
And that prevents the livereload feature to behave as expected: the server detects that a file changed, but the app on the device doesn’t autoreload ; I have to manually hit Ctrl+R from the console for it to reflect the actual changes.
Doing so reloads the app all right, and I see the modifications, but the previous error is now:
GET http://localhost:35730/livereload.js?snipver=1 net::ERR_CONNECTION_REFUSED (10.192.114.17/:52)
FYI, I’ve posted a StackOverflow question directly related to this problem.
Finally some misc information:
- My device is connected to my computer via USB
- My device is connected to internet
- Both my computer and my device are on the same network
I’ve seen many topics on this forum related to connection problems or net::ERR_CONNECTION_REFUSED
, but they were either too old (and so not using the latest CLI), or related to CORS problem with some external API calls, which it not the case here, since the tabs app is completely offline.
Thanks for any help !