Memory FS not updated on watch rebuild

Last day or so having issue where

  1. Launch “hugo server”
  2. Change some template or content
  3. Hugo Reports rending the pages without error
  4. Live reload refreshes the browser

but the last rendered changes do not appear.
manual browser refresh doesn’t help
using a different browser doesn’t help
clearing the browser cache and manual refresh doesn’t help

If I break out of the hugo server watch, and restart Hugo server and refresh the browser the changes then appear.

Seems like the watch is doing it’s job and the pages are being rebuilt but the memory FS is not actually being updated.
The memory FS is set correctly on the initial startup but not after any rebuild on changes forced by the watch code.

Any thoughts on why this is happing now but not a week ago. I have rebooted my machine (linux ubuntu) twice and the behavior persists.

What Hugoversion?

.18.1, ubuntu 16.04. Just realized it’s not up to date. I’ll put on .19 and try again.

Ok, that fixed it. Can’t say why it started doing that since it was fine. Could the binary had gotten corrupted. Guess we’ll never know why.

FYI with the version update it’s no longer taking painfully long to render and live refresh my build (elements were all loading slowly and thus my javascript window ready code was delayed and the page looking horrible while it was waiting).

So whatever was going on with my copy of .18.1 it’s much better now.

@bep Maybe my issue was related to this. It was my homepage that was not updating and I recently changed my partial code to .Site.RegularPages. Was this resolved from .18 to .19. That would explain why it went away with change in version.

@bep Nope still having memory FS issues.

Right now I am working a shortcode file in a theme.

I make a change to some html to be rendered while “hugo server” is running. The change is not reflected in the browser inspector

BUT if I then run Hugo and generate the corresponding public build and then look in the built file the change is there.

Even if I exit the hugo server/watcher and restart, refresh my browser, empty its cache the change is not reflected.

Bottom line…build to file system working…build to memory FS not working.

How can I track down what is happening.

Again using v0.19 on ubuntu 16.04

I have the same problem. I simply just save the changes to my source again and live reload refreshes the page.

  1. Make change.
  2. Save change to disk.
  3. Live reload should work, but it doesn’t.
  4. Save changes to disk again.
  5. Live reload magically refreshes the page it should have on the first save.

It’s rare that I have to re-run the hugo serve command again to see the changes, but sometimes that too.

This could be an underlying problem in the way Hugo implements live reload functionality.

The only times I have noticed this problem is when I make changes and save to disk too fast. For example, if I am working on a template file, I save my changes, live reload gets triggered, but then 1 second later I make another change and save again. Live reload triggers again.

I’m not sure but somewhere in multiple changes too fast and saving them causes this issue. Saving again makes it load again.

It may be this issue:

I discovered it while writing a blog post about Hugo 0.20 earlier today. I suspected that I had screwed up something in 0.20, but this has to be from Hugo 0.18 – I just haven’t bumped into this until now. I will fix it, but now today …

saving again for me does nothing. The change is not reflected by anything I do currently.

BUT it seems to be something to do with the template files maybe?? because if I change a content file the md gets rendered but the template file (the shortcode in this case) is unchanged. As I think of when this happens it seems never to be with rendering the md content but with with something changing in the layouts folder like a template or a static file.

I’m pulling my hair out now because some javascript I’m editing (in a static file) can’t get a tag attribute but maybe it’s because my edits for that file are not getting into memory because I can not see any syntax error in something I have done many times.

Time to reboot to really be sure the memory is clear. I am not sure Hugo doesn’t keep using the same memory location on restart. The live reload is probably not the issue since I can clear browser cache and reload manually and still no changes.

Well, let’s dig into the source and see what’s up.

Does Hugo server still have the original setup as an option to put build in regular folder and serve from there? I’d like to do that now while this is resolved so I can keep working.

disabled live reload, still happening.

I enabled a server on my public directory and I can keep going for now.

If I can provide some logging or other way to help track this down let me know.

not the issue. I am not using one.

Just to keep reporting on this. The issue comes and goes. Currently it’s gone. (after much more coding and reboots)

Sometimes I suspect it’s my javascript code but I don’t see how that could be the cause especially when it persists after disabling live reload.

Sometimes I suspect it’s some bad template or shortcode that isn’t throwing any error but is somehow keeping the build from going into the memory FS. Like I said was able to just build manually to a directory and then fire up a server on that directory and keep working so that kinda seems to dismiss this notion.

So I suppose it’s going to be impossible for now to track this down because I can’t find the conditions to reproduce the issue. If I do I’ll make a new post to bug section.

I personally despise the in memory change update browser thingamigger. It’s annoying.

I only wish to see changes when I save the file. Otherwise the page constantly keeps updating and refreshing after EVERY SINGLE KEYSTROKE…

Good googa mooga that’s annoying.

I wonder if we can disable the in memory browser update thing on my end with a user setting? Can we already do this and I’m ignorant?