-
Notifications
You must be signed in to change notification settings - Fork 302
Live reload does not working as expected, have to save several times the file to get it work #1132
Comments
From @mburger81 on July 19, 2017 15:11 OMG: I'm testing now again the demo app I shared here, and at the moment I can't reproduce the issue anymore. 😭 Does anyone have a similar issue, or see this in the last time? |
From @Sampath-Lokuge on July 19, 2017 15:37 Me too have this issue.I'm using latest |
Hi, same problem here. Short description of the problem:Live reload not update children template (parent templates works fine), this only update if stop the live reload and start again. What behavior are you expecting?When save a file, update the template with the changes. Steps to reproduce:
Which @ionic/app-scripts version are you using? ionic info
package.json
|
@AlanAlbuquerque yes this is exactly what I'm seeing on my side! Other information: Edit: Ok something in the console I see rebuilding the app and something I don't see, but also if I see rebuilding it it does not always change! Stop ionic serve and lunch it again works fine. |
After the last update for me it does not care it just does not work, I have tried to remove the global ionic and cordova, removed the node_modules, removed the browser platform, and installed everything back, live reload still does not work. In the console I get the the message that it is rebuilding but it does not update the app in the browser. Command used ionic cordova run browser -l |
@mburger81 You don't need to stop the ionic serve.Just change the |
@Sampath-Lokuge yes, if we change any |
@AlanAlbuquerque Yes, Anyoying.But better than the relaunch the server :D |
Yes I saw it this morning two. First save html file then save ts file is working. :) |
Every time I save something it just gets stuck at build finished (printscreen below), the app does not refresh. The command I am using ionic cordova run browser -l
Any suggestions ? |
@virgil-av you already tried to use only the command: |
@virgil-av Why can't you use |
@AlanAlbuquerque @Sampath-Lokuge I am using cordova plugins that are not available in ionic serve. Also Ionic serve seems to be throwing an error now that cordova is not available go figure |
@virgil-av you must add a conditional statement to check if cordova is available:
See more: https://ionicframework.com/docs/api/platform/Platform/ |
yeah same issue here and I reported it here too : Here |
It needs a bit of work to find why is not doing what it should do. Because testing with a blank app it seems that the ionic cordova browser run -l works on a blank, this command worked before but at some point it stopped doing the job. In the terminal it says that the build has finished but the problem is that the files are not updated in the platform folder basically it fails to copy and refresh. |
Complete novice here, same thing has literally just started with my setup in the last 30 minutes, ionic serve is recognising the saves and reloading the browser, but none of my changes are being reflected. And I've lost use of the console, my training wheels are gone! Tried restarting the server multiple times, tried saving in the order suggested by others in this thread, tried restarting both browsers and Visual Studio....only thing that worked for me was restarting my laptop. Changes to the files are being reflected in the CLI though, for example commenting out a log which has the only use of a variable:
results in a warning being posted in the server terminal: Unused variable: 'searchTerm' Watching this thread with interest..... EDIT: It seems to be working fine again now, for a solid 40 minutes it wouldn't update, now it's acting normally :/ I didn't change anything, and no unusual events have occurred on my system....that I can find anyways.... |
@Diefenbaker Always use |
Same issue here. |
Same issue, was working and "just" stop working. Maybe after the upload to 3.7, but I have downgraded to 3.6 and problem persist. |
I have the same issue with ionic 3.9! live reload doesn't work as expected. |
i have the same issue... my partner run the same project in another dev environment and works fine, my partner output
my own output
|
This bug is still alive for me, not very often but sometimes. |
This issue is still happening in ionic 3.12.0. I created a new app using the command Every time I make a change in an html template, I have to save it twice to see the changes. I'm using node 8.6.0 on Mac High Sierra. I noticed that it only happened on the html template I modified. I changed the login.html
login.ts
|
+1 situation like @davidpestana described |
Hi same issue on:
News??? |
I noticed the bug is much more complicated if you have a PopOver Page! Today we are in the situation that sometimes even stopping and starting again the ionic server doesn't resolve the problem so at the moment we have big problems to develop the PopOver. Old frustrating bug IMO. thx |
Hi, |
is it possible related to Lazy Load pages? Live reload feature was in an unstable way on my local too. |
+1 situation like @raykin described |
Can you people check if its happening when you update scss and HTML files or even for ts files? My project doesn't get updated when I change something in scss and HTML files, but it does work when I change something in typescript files(even adding an empty line will do). |
In my case what happens is quite specific: I do not have to save "multiple times". I have to save precisely twice. The first time webpack does not run according to the terminal output. The second time it does. |
I had the same issue last few days, needed to save twice every file if I want changes to reflect in a browser. |
We have the problem only on html files, saving multiple times does not help, saving ts works always. @kensodemann Hi Ken, can you perhaps jump into this issue, this is a very very old and annoying issue still present for many of us. Thx a lot |
I have the same issue , I have to save 2x for html to reflect changes something it tells me my function is not there while clearly it's been defined in ts file. Super Annoying, I temporarily solved the issue by clearing cache and storage and everything in chrome for this page... hopefully it stays clean |
I experience this once a day. I will ionic serve, make some changes and live reload will pick them up, make more changes and live reload doesn't grab them. I have to save multiple times for it to work. I also have an issue where I will ionic serve, make changes and it applies, make more changes and it will revert to an earlier build. Only way to fix is to stop and re serve. |
I've been noticing this frequently, lately. For me, it seems to be if I have any linter errors (unused imports, etc) that the rebuild will choke, and I'll have to fix and re-serve. |
I had the same issue too were old code was suddenly being served again. |
Possibly related #1322 |
I got the same behavior with html templates and lazyloading. A workaround is to add those 2 lines :
into this file :
|
So with the change above, can the whole if block not be removed and just always do the full compile? |
@stephanebouget - thanks worked for me. @jgw96 - please note ^^. Agree could probably refactor the whole condition, but this was an effective workaround for me. You have saved several minutes an hour of pointless resaves! |
For me the issue was because I un-commented the service worker script in index.html to test the output as a PWA. Changes weren't reflecting because of the service worker caching. I had to unregister the service worker from Chrome dev tools -> Application |
@virgil-av Did you get any solution? |
@mukesh14149 me too |
I´m having the same problems as everyone here. But also I mantain an Ionicv1/AngularJS app, and I have to save several times as well in order to reflect my changes.
|
Hi hot everyone, we think this bug would be never resolved, because the team is working all on the new IMO, you have to wait for new release and then make the upgrade process to |
Please delete browsing data for Chrome as follows:
I noticed that it failed in Chrome (V.68) but worked in Safari and even Chrome Canary (V.70) After deleting cache, everything appears to be working. |
I was having the same issue, then opened ionic serve in another browser (M Edge) and the issue didn't persist. After uninstalling and reinstalling Chrome the issue is now resolved. |
Hi everyone, This has been merged and released with ionic-app-scripts Thanks! |
From @mburger81 on July 19, 2017 14:59
Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
The sample app I created for you, is using your sidemenu starter template. I changed the pages to
IonicPage's
and use them forlazyloading
. Also theHomePage
has a Button to open a ModalPage which is also lazy loaded.The current behavior is, if we change anyhting in the for example
home.html
like button color, the framework is reloading the app in the chrome browser, but the changes are not applied. We have to save several times the file to get the livereload work and see the changes in browser.We are not sure what is the reason for that, but at our normal production app where we had this bug after upgrade ionic-angular, it looked like this problem is only on lazy loaded
ModaPages
, for that reason this demo app has a ModalPage included. But on this example I'm sharing here we have the problem also on the simplehome.html
file.Sometimes we also get a old old page in the browser, for example the file as it was 5 or 6 save events earlier. 🤙
Steps to reproduce:
I created a simple repository to reproduce the error:
https://github.com/mburger81/modal-page-live-reload
(please test it 👍)
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):Edit
I'm using latest chrome:
Version 59.0.3071.115 (Official Build) (64-bit)
Copied from original issue: ionic-team/ionic-framework#12409
The text was updated successfully, but these errors were encountered: