-
Notifications
You must be signed in to change notification settings - Fork 310
Bug: Ionic serve showing old content #825
Comments
any chance you're using a custom webpack config file? |
We are seeing the exact same thing. Typically:
It does not seem to be browser caching, as cache reset / browser switch does not change this. The only way to workaround issue is to stop and rerun ionic serve. We do not have local changes to webpack. Ionic version 2.2.1. Package.json:
|
I have exactly the same problem which @ihadeed described and I tried the same things 'Ionic serve' worked fine and suddenly this started to happen. |
Hi @duydao |
@Charlie-Hua ionic uses filename from the webpack config to update the file on changes. Ionic supports multiple entry points in our custom webpack.config.js:
but if we're trying to use a dynamic filename config, it won't update the bundle in ionic serve:
We can get around this fact by inlining the workers instead of generating separate files. |
same issue |
This is fixed in Thanks, |
Thanks @danbucholtz ! |
This does not appear to be fixed after installing app-scripts@nightly for me. Same issue as before - old content is served, sometimes very old content (from several revisions ago). Edit: Doh, ran the install command in the wrong terminal! |
Thanks! Should we update to @ionic/app-scripts@nightly or wait for next week release, @danbucholtz ? |
So this bug is fixed in @nightly but it has introduced a new one, where sometimes SASS compilation fails completely and the app after rebuild displays without any style at all until a SASS file is saved again. |
@brettdorrans you should open a new issue for that. I can confirm it's a bug. |
Fixed in Thanks, |
This issue persists in 1.2.2 |
How can I reproduce it? Thanks, |
Isn't easily reproducible. Seems to get worse with increasing app complexity (i.e. as you begin editing more pages/scss the effect is more noticeable). The steps to produce on my setup are:
Downgrading to 1.1.4 fixes the issue. |
Have narrowed it down to this: I am using a custom ionic:serve in package.json so I can serve cordova in the browser. "ionic:serve": "ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build", This fails to update properly on save because ionic-app-scripts isn't running ionic build for the browser platform (perhaps it did this in an earlier version?) I'm unable to use the standard ionic serve because it causes cordova related errors throughout the application. |
Having same problem, I've noticed that I can save a blank space to the file that is cached to force it back into the build.... |
Same problem here. Even if i restart ionic serve an old version of the page shows up Actually i found out that, when i run "ionic serve" two node processes shows up, one takes about 30mb and the other 700mb. If i go to "localhost:8100" my old page shows up, i dont even know where those files are cached because this is from a newly cloned project. However if i go to "192.168.10.101:8100" which is my local ip, my updated project shows up. |
Same problem here, suddently a bug appears because Ionic it's serving a old version of a file. I have to go to the file where de error is present, press save and sometimes it's gone. This has begin happening quite often since the last CLI update. It's becoming very annoying to be honest. Some times I have to save around 4 different files to somehow get the latest version of the document. Ionic Framework: 3.7.1 |
For me this only happens on Mac. Not windows. |
I can confirm that this issue occurs on both Mac and Windows. I can tell it's happening when things stop making sense 😄 (I edit views/typescript and start seeing reverse progress). The solution that works 100% of the time is to clear cache & restart |
same issue here. Exactly as described on main post. @ionic/cli-utils : 1.18.0 |
I have the same issue. running on Linux UB16.04LTS: |
Yep happens om both Windows and Mac for me now |
Same problem. This has a huge impact on productivity. |
If this is the same issue I think it is..
The work around is to specify a new port and restart. --port=8888
Paul.
…On Wed, Jun 6, 2018 at 10:41 AM, Victor Nascimento ***@***.*** > wrote:
Same problem. This has a huge impact on productivity.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#825 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZxiD48U700c_mRWs3Ka_Y_oweut0Yrks5t5-oTgaJpZM4Mhihl>
.
|
@pdescham49 So you do this each time or just doing it once fixes the problem? |
When I notice the content is cached.. I'll stop it restart it on a new port
and it will work again.. sometimes for days, sometimes for hours.
…On Wed, Jun 6, 2018 at 12:05 PM, Raschid J.F. Rafeally < ***@***.***> wrote:
The work around is to specify a new port and restart. --port=8888
@pdescham49 <https://github.com/pdescham49> So you do this each time or
just doing it once fixes the problem?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#825 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZxiCaoO39dClZ1L0U8MZMvIxpb9nn4ks5t5_3agaJpZM4Mhihl>
.
|
Ok so it's basically the same :( |
In my experience you don't even need to delete the www folder. But yes that
will do as well.
…On Wed, Jun 6, 2018 at 12:10 PM, Raschid J.F. Rafeally < ***@***.***> wrote:
Ok so it's basically the same :(
What I do is stop, delete folder www and restart.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#825 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZxiPhbDah9fKx3eVD3SyzQFfYkcT84ks5t5_7wgaJpZM4Mhihl>
.
|
Same problem here. 1-Ionic serve |
Solved it: I don't use Ionic anymore. |
It might be helpful to post to this issue thread as well (since this bug is officially closed). |
I experienced the same issue, it keeps building the last 3rd iteration. Is running ionic-serve the only work around for this? |
I need to reload the server every time...
|
upgrade to ionic 4 if you can, the problem will go away as you won't be using ionic-app-scripts =] |
So, anyone can handle browser to clear cache? It is usefull if there is new version of the app bumped but older content still present... |
I have found that in my case, this happens when I use a templateUrl to an html which is in another folder. |
Just upgraded to ionic4 and created a sidemenu app - same problem. Only solution is to manually clear the cache in chrome and reload ... arghhh 👎 👎 👎 |
Solved - just use Opera - tt works 👍 |
Its Ok I just re-run |
If you're using custom webpack.config (as i were), following these steps worked for me: https://github.com/gshigeto/ionic-environment-variables I just recreated my whole webpack.config based on this tutorial, and it worked fine and sweet. EDIT Actually, i started having it again. Then i noticed livereload suddenly started to work when i update my custom webpack file, and served the app again. Somehow, this are being cached. Updating webpack file (like putting a empty line behind everything) worked for me. Also, Chrome will just send us back in time, but Safari will show errors. |
UPDATE Using anonymous window on Chrome seems to be the easiest way to work. Problem still exists on Ionic 3.9.2 |
@EdgarSalazar I had abandoned Ionic last year after 6 months of time wasting on numerous issues. I come back a year later, giving another chance to this framework, but I'm already starting to regret... |
For those coming here having issues w/ Ionic 3+ and iOS/Android build showing old views... This was happening when I would build/run for iOS and Android. My latest code would show up on first load and each subsequent load (after killing the app) on both platforms would show old component views. I updated all npm/ionic/cordova packages, plugins, cli + confirmed all updates, cleared all cache that I could find, removed all build and plugin folders, rebuilt everything and still had no luck. I finally had to go in to Ionic Dashboard > Personal Apps and delete my Ionic Pro link/app. I'm not sure how my builds were accessing my old code via Ionic Pro during the build phase, but deleting the link/app appears to have fixed the problem for me. FWIW, I think I could've fixed the problem without deleting the Pro link by pushing each build to the Channel/branch that was connected to my Ionic Pro repo. Maybe one of the Ionic guys can confirm this. |
I deleted Pro and problem persists |
Short description of the problem:
Ionic serve/livereload displays old content after refreshing. When I make changes to my app, the build completes and browser refreshes, then I see old content. Sometimes the changes do not apply, and sometimes I see an old page that I already changed multiple times.
What I do to resolve this is restart
ionic serve
or runnpm run build
and refresh the page manually. Clearing browser cache and refreshing page solves this issue some times, but not all the time. So I don't think it's a browser cache issue.What behavior are you expecting?
When the browser refreshes after a new build, it should display new updates.
Steps to reproduce:
This issue is really random.
ionic serve
orionic run <platform> -l
Which @ionic/app-scripts version are you using?
1.1.4
The text was updated successfully, but these errors were encountered: