Quarto book preview: "WARN: connection closed before message completed" any clue? #9933
Replies: 5 comments 15 replies
-
I have just discovered that "quarto preview --render html" creates yet another scenario:
|
Beta Was this translation helpful? Give feedback.
-
@mcanouil I opened the GitHub repo for the project and prepared a GitHub Pages version as well, so the full source is available:
In terms of workflow, I am running Quarto 1.5.43 within VScode 1.90.0 on MacOS 14.4.1 Please note that the behaviour started happening more or less a week ago. I have only used Quarto for a few weeks now and it used to work properly. I am not aware on any change and/or update in the system in the meanwhile. Reproducing the issueHere is how (at least) I ended up with the WARN issue:
The only way I found to avoid the behaviour above is to:
I hope the above can be considered a reproducible example. At least, that is the behaviour on my machine (I have the same behaviour with Chrome, Safari and Firefox). Thank you for any help! |
Beta Was this translation helpful? Give feedback.
-
The same also happens to me for some time now (~O(weeks)) when previewing revealjs slides. Even though in terminal it looks normal and reloads, the VSCode preview (Simple browser) is not updated. Note, there is a possibly related (closed by @cscheid on Nov 2022) issue: #3045 |
Beta Was this translation helpful? Give feedback.
-
The whole navigation of previews seems to be fundamentally broken if book chapters have long render times. (This issue has also annoyed me a lot over the last months of writing my thesis...) The problem seems to be connected to the quarto-cli/src/webui/quarto-preview/src/server/navigation.ts Lines 26 to 30 in a496e0e If I change the if (target && (target !== normalizeTarget(window.location.pathname))) {
window.location.replace(target);
} else if (target) {
window.location.reload();
} However, I have a really hard time to understand how the previewer messages are supposed to interact and what role the reload should play in there if Related to issue #11475. |
Beta Was this translation helpful? Give feedback.
-
Just wanted to chime in to say that I too am experiencing this issue and agree with @winniehell that the size of the document seems to be a key variable. In my experience, the preview works fine until the project grows to a certain size after which this error happens constantly and makes the preview server functionality very frustrating to attempt to use. I am suspicious that @benkeks is on the right track with long render times being the culprit. |
Beta Was this translation helpful? Give feedback.
-
Description
Dear all,
I am experiencing a frustrating situation. I am on MacOS Sonoma 14.4.1, Quarto 1.5.45, and the same behaviour happens with Chrome, Sarafi and Firefox.
This is the issue. After a while (and I cannot reproduce exactly when), when I launch "quarto preview" (options do not change the behaviour), I start getting a "WARN: connection closed before message completed" when navigating the website, and I am stuck on the original page. The behaviour seems to hit after several pages are added to the YAML file. All pages are just Markdown (no code).
I have tried building the site from scratch several times, the last one keeping the preview running with the --watch-inputs. It worked properly until I killed the process. Running the process again brought back the warning and got me stuck again.
Even more strangely, repeatedly hitting the link gets me to the desired page at some point. Moreover, if I open different pages of the website (e.g. http://localhost:3604/index.html and http://localhost:3604/preface.html) on different tabs, once I reach three open pages, I can see in the STDOUT of the terminal that they reload in a cycle without stopping.
I am completely puzzled.
Thank you for any suggestions.
best,
Simone
Beta Was this translation helpful? Give feedback.
All reactions