-
Notifications
You must be signed in to change notification settings - Fork 352
Quarto preview only loading homepage in Firefox #3045
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
Comments
I can reproduce this on OS X as well. |
This is going to have to do with how we subscribe/unsubscribe from socket messages in devserver-core.html (I made a change there recently to handle a behavior I saw in Electron (computer suspend causes websockets to get disconnected) but doesn't happen in Chrome: // if the socket closes for any reason (e.g. this occurs in electron apps
// when the computer suspends) then reload to reestablish the connection
devServerSocket.onclose = () => {
console.log('Socket connection closed. Reloading.');
window.location.reload(true);
} We definitely need to keep this behavior, but it may need some adaptation for Firefox. |
The issue seems to be "simply" that Firefox closes websockets on navigation events, and Chrome doesn't: https://stackoverflow.com/questions/10965720/should-websocket-onclose-be-triggered-by-user-navigation-or-refresh |
Since the workaround I put in is just for Electron, we could just scope
that code to Electron (or Chomium) only? (or not Firefox if that works
better)
…On Wed, Oct 26, 2022 at 11:27 AM Carlos Scheidegger < ***@***.***> wrote:
The issue seems to be "simply" that Firefox closes websockets on
navigation events, and Chrome doesn't:
https://stackoverflow.com/questions/10965720/should-websocket-onclose-be-triggered-by-user-navigation-or-refresh
—
Reply to this email directly, view it on GitHub
<#3045 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZPR6DQZWZ5VHTILFPPJDWFFEXXANCNFSM6AAAAAARO6UBD4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
WARNING: connection closed before message completed. I meet this problem again, quarto 1.3.450, windows 11, edge and chrome have been test. |
Uh oh!
There was an error while loading. Please reload this page.
Bug description
When previewing a website in Firefox using
quarto preview
, only the homepage loads; whenever clicking any other link in both the navbar or sidebar, the homepage reloads. Quarto gives the following output on clicking a link (but only sometimes):while Firefox shows the following in the developer tools:
I'm using Quarto v1.2.242 and see the result both running on Windows 11 in Powershell and in WSLv1.
Reproducing
quarto create project website
.quarto preview
.Checklist
The text was updated successfully, but these errors were encountered: