Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"zola serve" doesn't detect any change #2551

Closed
arkydon opened this issue Jun 26, 2024 · 18 comments
Closed

"zola serve" doesn't detect any change #2551

arkydon opened this issue Jun 26, 2024 · 18 comments
Labels
bug Need Windows help We need someone using Windows to help us with this issue

Comments

@arkydon
Copy link

arkydon commented Jun 26, 2024

Bug Report

Environment

Zola version: 0.19.1, 0.19.0
Windows 11 22H2, Build version: 22621.3737

Expected Behavior

Using "zola serve" command, it should detect changes to a website and reflect it.

Current Behavior

In both 0.19.0 and 0.19.1 it can't detect any changes anymore, so I have to rerun "zola serve" every time I make any changes in my website code. In the terminal it's always at the initial "Listening for changes".

Step to reproduce

  1. Run command "zola serve"
  2. Make any change to templates or sass or content.

Note

I tried it in Windows Terminal, Powershell and the old command prompt. I tried running as admin too.

@Keats
Copy link
Collaborator

Keats commented Jun 26, 2024

We've fixed it for Linux but for Windows I'd need someone with a Windows machine to check what's happening. See #2542 for the linux PR

@Keats Keats added bug Need Windows help We need someone using Windows to help us with this issue labels Jun 27, 2024
@knzai
Copy link

knzai commented Jul 2, 2024

I'm seeing this in Mac as well (no changes result in a reload, even to templates or pages or anything), but maybe the linux fix will also fix that.

@Keats
Copy link
Collaborator

Keats commented Jul 2, 2024

Have you tried 0.19.1? It has always worked for me on Mac

@myfonj
Copy link

myfonj commented Jul 9, 2024

Tried zola 0.19.1 on Windows 10 Version 10.0.19045 Build 19045 (With latest Firefox and Edge) and watcher still does not seem to catch any change :(.

According to devtools the websocket is being established (ws://127.0.0.1:1024/livereload) but never sends any message.

Most recent release with working live reload on my system seems to be 0.18.0.

@knzai
Copy link

knzai commented Jul 11, 2024

I was already on 0.19.1, but it started working with no changes, so idek. I've historically seen mac's do weird things with reloading dev server file detection before, so probably not anything on your end. Just following up to confirm I am not seeing this behavior on Mac, so ignore my earlier comment I guess.

Maybe a permissioning hiccup or something on one of my installs.

@Snowdrama
Copy link

Snowdrama commented Jul 14, 2024

I also ran into this issue, I just installed it yesterday. Not that I'm 100% sure if it's related but it's showing the path and I'm curious if it's maybe related to the issue.

I'm using 0.19.1

D:\Workspace\Rust\snowdrama_net_zola>zola.exe -V
zola 0.19.1

For me it's not catching any changes, templates, content anything.

My path:
D:\Workspace\Rust\snowdrama_dot_net_zola\

But it's listing the path as:
\\?\D:\Workspace\Rust\snowdrama_net_zola\

The full output:

D:\Workspace\Rust\snowdrama_net_zola>zola.exe serve 
Building site...
Checking all internal links with anchors.
> Successfully checked 10 internal link(s) with anchors.
-> Creating 6 pages (0 orphan) and 12 sections
Done in 1.3s.

Web server is available at http://127.0.0.1:1025 (bound to 127.0.0.1:1025)

Listening for changes in \\?\D:\Workspace\Rust\snowdrama_net_zola\{config.toml,content,sass,static,templates,themes}
Press Ctrl+C to stop

Edit: Nevermind, I checked 0.18.0 and path is the same in and it does work, so it's not related to the path.

@iamorphen
Copy link
Contributor

I happened across this issue when browsing for something else. I set up a build environment in Windows 10, built c20b336, and can reproduce the issue. I'm not currently working on this but can go deeper when I have some free time next after #2441.

@chipotle
Copy link

I'm seeing this in Mac as well (no changes result in a reload, even to templates or pages or anything), but maybe the linux fix will also fix that.

I'm also seeing this with Zola 0.19.1 currently.

@Keats
Copy link
Collaborator

Keats commented Jul 18, 2024

Can you try #2575 ?

@Snowdrama
Copy link

@Keats That seems to work for me.

Version shows me using 0.19.1

PS D:\Workspace\Rust\snowdrama_dot_net_zola> zola.exe -V    
zola 0.19.1

And this does correctly reload when an update is made

PS D:\Workspace\Rust\SnowdramaDotNetZola> zola.exe serve 
Building site...
Checking all internal links with anchors.
> Successfully checked 16 internal link(s) with anchors.
-> Creating 8 pages (1 orphan) and 12 sections
Done in 3.0s.

Web server is available at http://127.0.0.1:1111 (bound to 127.0.0.1:1111)

Listening for changes in \\?\D:\Workspace\Rust\snowdrama_dot_net_zola\{config.toml,content,sass,static,templates,themes}
Press Ctrl+C to stop

Change detected @ 2024-07-18 12:22:07
-> Content changed \\?\D:\Workspace\Rust\snowdrama_dot_net_zola\content\devlog\2024\07\test.md
Checking all internal links with anchors.
> Successfully checked 16 internal link(s) with anchors.
-> Creating 8 pages (1 orphan) and 12 sections
Done in 329ms.

@Keats
Copy link
Collaborator

Keats commented Jul 18, 2024

Nice, now let's see if it works for @chipotle as well. Which editor are you using?

@opeik
Copy link

opeik commented Jul 25, 2024

I'm using zola 0.19.1 on macOS 14.1.1, zola serve refuses to rebuild when changes occur in my theme. I suspect it's because I've symlinked it.

@iamorphen
Copy link
Contributor

@opeik , I can reproduce that on macOS. Did your workflow used to work for you using zola 0.18? I took a look at the watch options for what we're using and didn't see anything about symlinks. I also just debugged and didn't see any captured events when modifying files through a symlink even before event filtering.

@opeik
Copy link

opeik commented Jul 25, 2024

@iamorphen I don't think it's ever worked.

@iamorphen
Copy link
Contributor

@opeik , thanks for confirming. I couldn't find any special mention of symlinks in the older version of notify-rs (4.x) we used, either. I just confirmed that your use case works on Linux, so this behavior seems to be a quirk between macOS's FSEvents and the notify/debouncer crate.

@Keavon
Copy link

Keavon commented Jul 29, 2024

@Keats I've tested that PR and it fixes it when I save files in VS Code on Windows 10. I hope that can be merged and released ASAP. Thanks.

@arkydon arkydon closed this as completed Aug 18, 2024
@myfonj
Copy link

myfonj commented Aug 19, 2024

Confirming that zola serve with zola-v0.19.2-x86_64-pc-windows-msvc.zip does the live reload upon changes on Windows 10 again 🎉, thanks for the fix!

As mentioned in the #2575, while Ctrl+C terminated it writes Encountered an error: uncategorized error before exiting, but it does not seem like it prevents anything.

@Keats
Copy link
Collaborator

Keats commented Aug 19, 2024

Can you open another issue for that? I haven't seen it on Mac so it would helpful to have someone on Windows debug it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Need Windows help We need someone using Windows to help us with this issue
Projects
None yet
Development

No branches or pull requests

9 participants