Problem: After installing Ionic 2.0.0rc, livereload is no longer triggering after modifications to src files. It sometimes works with ionic serve but not with "ionic run android -c -s -l".
Expected behavior: After running "ionic run android -c -s -l" and making modifications to .html or .ts files, there should be a build triggered.
Steps:
1) npm uninstall ionic -g
2) npm install ionic -g
3) ionic start testProject --v2
4) cd testproject
5) npm install
6) ionic platform add android
7) ionic run android -c -s -l
8) Make modifications in .html such as changing the title of Home to "Home001"
9) No rebuild is triggered.
ionic info
Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS:
Node Version: v4.5.0
npm -v: 3.10.8
ionic -v: 2.1.0
I'm having the same problem. Live reload may or not refresh the page. I usually end up with a white screen and I have manually refresh the page.
Same problem here. Temporary workaround is start npm run watch in another window
Same problem guys!
Hello all! Thanks for opening an issue with us! Just to be clear, this does not happen with ionic-serve but is instead happening when using live-reload on a device, is that correct?
For me it happens with ionic serve. I haven't tried anything else yet.
Ionic Serve it's work. Running on device do not work livereload.
Ionic serve works, live reload does not. May also be noted that the watch timeout is really large (10 s), and not to stable. Sometimes ends with a blank screen.
In ionic run it happens 100% of the time for me.
What I find alarming about this is that I temporarily reverted to 2.0.0-beta.13 to keep working on my project with a livereload that works and I'm getting the same behavior!
Alright, thanks for clarifying everyone! LiveReload with devices may not work on newer Android devices and iOS devices because of security restrictions on these devices, but with older devices it should still work. We will look into this.
Just a clarification, I am using a Samsung Galaxy S7 and it used to work just fin with 2.0.0-beta.13.
More specifically, I get two different reactions.
When running "run android" and then modifying code, I get no reaction to recompile in my ide console.
On the other hand, when I run ionic serve, I do get a reaction in the console every time I make modifications/save but I sometimes get a blank page.
When getting a blank page from ionic serve, here is my console:
_JS changed: D:\temp\ionic\newProject1\www\build\main.js
serve / (www\index.html)
serve /build/main.css
serve /cordova.js (mocked)
serve /build/polyfills.js
serve /build/main.js
[14:46:48] templateUpdate started ...
[14:46:48] bundle dev update started ...
[14:46:51] bundle dev update finished in 31.09 s
[14:46:51] sass started ...
[14:46:51] sass finished in 25 ms
[14:46:51] templateUpdate finished in 31.12 s
JS changed: D:\temp\ionic\newProject1\www\build\main.js
serve / (www\index.html)
serve /build/main.css
serve /cordova.js (mocked)
serve /build/polyfills.js
serve /build/main.js
[14:47:00] bundle dev update finished in 12.16 s
[14:47:00] templateUpdate finished in 12.17 s_
Then it just hangs there. Chrome shows nothing in the console.
If I do a refresh in Chrome, my changes show up and my IDE console shows:
_serve / (www\index.html)
serve /build/main.css
serve /cordova.js (mocked)
serve /build/polyfills.js
serve /build/main.js
0 049239 log Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
serve /build/main.js.map
serve /assets/fonts/ionicons.woff2?v=3.0.0-alpha.3
1 049323 warn Native: tried calling StatusBar.styleDefault, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator_
Hope that helps! :)
As I mentioned in my ionic-cli issue about this https://github.com/driftyco/ionic-cli/issues/1425, it's watching for changes in the www folders, not the source folders. So it's 'working' in a sense, but it's watching the wrong place for changes.
Running npm run watch in a separate terminal works as a temporary workaround because it watches the source folders and triggers a rebuild on changes that'll update the www folder.
Same problem on browser
Hi all,
same issue here with Galaxy S6 : it watches only the files in /www
@jgw96 , were you able to reproduce this issue? This is a show stopper for me in my current project since I can no longer get quick feedback from my app changes. This is definitely a high priority issue for me. Are there other devs who installed RC0 and are still getting livereload on Android? If so, what's your setup, I'd like to compare.
Hello all! Thanks for using Ionic! I am going to be closing this issue as a duplicate of https://github.com/driftyco/ionic-cli/issues/1436. We will be tracking this issue over there. Thanks!
Any progress on this?
driftyco/ionic-cli#1436 has a similar work around but does seem like a different problem while this one is very specific.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
@jgw96 , were you able to reproduce this issue? This is a show stopper for me in my current project since I can no longer get quick feedback from my app changes. This is definitely a high priority issue for me. Are there other devs who installed RC0 and are still getting livereload on Android? If so, what's your setup, I'd like to compare.