Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Quarto preview command don't show updated version of html document after autoreload #11475

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

Open
skyfroger opened this issue Nov 18, 2024 · 12 comments
Labels
bug Something isn't working preview issues related to the `preview` command
Milestone

Comments

@skyfroger
Copy link

Bug description

I tried to find reasonable explanation for such behaviour. But I can't find the source of this bug. Maybe it specific for my machine. But I don't know how to fix this problem.

I encountered this bug for website projects and standalone qmd files.

Steps to reproduce

Create website project:

quarto create project website mysite

Start website preview:

quarto preview mysite

Edit file index.qmd inside project folder and save changes.

Edit file about.qmd inside project folder and save changes.

Expected behavior

After saving changes to the qmd files browser reloads page and show updated html.

Actual behavior

Content of index.html page updated after saving changes to index.qmd file and browser page autoreloads. Content of about.html page stays the same after saving changes to about.qmd file and browser page autoreloads. But if I restart quarto preview command, I am seeing changes made to the about.qmd file.

Your environment

  • Typora ( I don't use any IDE to edit documents)
  • Windows 11

Quarto check output

Quarto 1.6.36
[>] Checking environment information...
      Quarto cache location: C:\Users\skyfr\AppData\Local\quarto
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.6.36
      Path: C:\Program Files\Quarto\bin
      CodePage: 1251

[>] Checking tools....................OK
      TinyTeX: v2024.11
      Chromium: (not installed)

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\skyfr\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2024

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.11.5
      Path: C:/Program Files/Python311/python.exe
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with py -m pip install jupyter

[>] Checking R installation...........OK
      Version: 4.4.1
      Path: C:/PROGRA~1/R/R-44~1.1
      LibPaths:
        - C:/Users/skyfr/AppData/Local/R/win-library/4.4
        - C:/Program Files/R/R-4.4.1/library
      knitr: (None)
      rmarkdown: (None)

      The knitr package is not available in this R installation.
      Install with install.packages("knitr")
      The rmarkdown package is not available in this R installation.
      Install with install.packages("rmarkdown")
@skyfroger skyfroger added the bug Something isn't working label Nov 18, 2024
@cscheid cscheid added the preview issues related to the `preview` command label Nov 18, 2024
@cscheid cscheid added this to the Future milestone Nov 18, 2024
@cderv
Copy link
Collaborator

cderv commented Nov 19, 2024

To confirm that I can reproduce. Thanks for reporting.

@mcanouil
Copy link
Collaborator

Seems related to:

@robertocarvajal
Copy link

yeah, happens for me too.. my solution is any time I want to preview I just run touch _quarto.yml and then the preview session will reload and show the changes, without that it will still reload but not show any changes, I'm also thinking into adding some file watch service and run the touch command for me to automate this until a proper fix reaches a future release.

@xiaoxl
Copy link

xiaoxl commented Jan 20, 2025

Is there any fix to this?

btw: it is strange that it seems to work in the past
at least I don't recall there was such an annoying thing
I guess some updates of vscode broke things?

@Shelmith-Kariuki
Copy link

Hi,

I've been experiencing this issue as well.

I updated RStudio (to version 2024.12.1+563) and Quarto (to version 1.6.42) on 7th March, 2025 and refreshing the browser no longer updates changes made to .qmd files. I have to manually re-render each time, which feels unusual.

@benkeks
Copy link
Contributor

benkeks commented Mar 14, 2025

My writing experience is also quite affected by this issue. It seems to be connected to reloads in the previewer killing off communication at the wrong time (or something like this) for book chapters with long render times.

I think the half-fix I posted in #9933 (comment) also addresses parts of the present issue. (In standalone browser, it works for me. Autoreloads in VS Code window on the other hand still show the old version. Manual reloads in VS Code then show the correct version, which is an improvement over previous behavior where it would just ignore my edits even though the renderer completed.)

I would really appreciate if somebody more familiar with the communication flow that is supposed to happen on rerenders could look more deeply into this!

@kchaz
Copy link

kchaz commented May 1, 2025

I am also having this issue. Would love for there to be a fix.

@mcanouil
Copy link
Collaborator

mcanouil commented May 1, 2025

@kchaz Thanks for your interest. Prefer using reactions, such as thumb up, on the original post rather than commenting.
Reactions can be used by maintainers to prioritise issues while mitigated noise caused by notifications.

@benkeks
Copy link
Contributor

benkeks commented May 4, 2025

@mcanouil My impression from this issue (and #9933, #10382, #10392, #12144 …) is that, for more than a year, the preview feature in Quarto has been fundamentally broken for everyone who is working on a big multi-page project. (Maybe I'm mistaken and it sometimes works for some setups? But nobody seems to say so.) I agree with your general statement about noise reduction, but, in the very case of this issue, I really wonder how many reactions it would need for the maintainers to consider the problem a priority. :/

Edit: Did a little more search and saw that there might be new hope for a fix on this front #2795 (comment) .🥳

@mcanouil
Copy link
Collaborator

mcanouil commented May 4, 2025

The team is very small. What you consider a priority is not necessarily one compared to other issues affecting Quarto in general and not only the preview command.
You can see the "preview" issues and responses from maintainers across them. They are aware but the manpower and time is limited.m (thus the importance of reducing noise).

There are 1.5k opened issues, three developers, more than 1k more issues opened each year, and almost the same amount fixed/closed by the team.

@cscheid
Copy link
Collaborator

cscheid commented May 5, 2025

I really wonder how many reactions it would need for the maintainers to consider the problem a priority. :/

@benkeks I will ask you, fairly directly, to stop casting these kinds of aspersions. We do consider this a priority. And we are fixing it. But it really does require pretty fundamental changes to the code base. The fundamental problem is that we need to collect centralized, accurate information about which files in the file system will affect the final page, when each page is ultimately composed by a large, complex process that involves at least two separate subsystems, each of which being Turing-complete in their own right: the execution engine and Pandoc itself.

We have been doing the work since at least early 2024. As @mcanouil said, there are three full-time software engineers in quarto-cli. Please: I am asking you to be more considerate when making these comments.

I'm going to be pretty frank here: You might not be aware, but these comments are really discouraging to people working in open source, and I will not let this discussion forum become a place where my colleagues feel discouraged to participate.

@benkeks
Copy link
Contributor

benkeks commented May 5, 2025

I appreciate frankness. That's the point.

I've been using Quarto for almost every day for a year, and I've been affected by this bug complex for most of it, every single day. As you see, I chose not to bother you about it.

I even spent a day out of my free time trying to figure out how the preview updater flow is supposed to work and whether there is an easy fix. But I arrived at the conclusion that this is the kind of thing that can only be resolved by original authors who understand their subsystem or core maintainers who have the authority to go into a major rewrite of it.

I think it's annoying, but okay that some features just don't work in an open source project (especially if the infinite-defects world of browsers/PDF/pandoc/LaTeX is involved). If they don't work for a year and fixing them is outside the time budgets, it might be fair to place some note on known limitations in the documentation or print warning messages. (So that people do not spend hours fiddling around with their document because they think it is their fault that the previewer fails — as I, at least, did last year.)

It's okay to say that this is hard to fix or that there's more pressing matters. My remark was supposed to answers to the subtext that the handling of the previewer bugs would be a question of how many reactions there are. As far as I get it, it's neither a nice-to-have-feature-voting issue nor a question of whether this affects a lot of people. Maybe, I got the subtext wrong.

Anyways, the remark was not supposed to tell you how to run your open source project or anything. Neither do I want to discourage you or anyone from participating in it. My apologies! ☮

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preview issues related to the `preview` command
Projects
None yet
Development

No branches or pull requests

9 participants