Skip to content

Panic when using SsrMode::Async or SsrMode::InOrder #406

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
fayalalebrun opened this issue Apr 27, 2025 · 1 comment
Open

Panic when using SsrMode::Async or SsrMode::InOrder #406

fayalalebrun opened this issue Apr 27, 2025 · 1 comment
Labels
question Further information is requested

Comments

@fayalalebrun
Copy link

fayalalebrun commented Apr 27, 2025

When using this library with a route set to SsrMode::Async or SsrMode::InOrder, tokio worker threads panic with the given message:

thread 'tokio-runtime-worker' panicked at ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thaw_utils-0.1.1/src/dom/ssr_mount_style.rs:157:18:
you are using SSRMountStyleProvider without a <head> tag

This can be reproduced by using the demo and setting one of the routes to either of these modes.

This is a shame, since only these modes work reliably for SSR (see leptos-rs/leptos#3048).

@lizidev
Copy link
Collaborator

lizidev commented May 3, 2025

I added ssr=leptos_router::SsrMode::InOrder here

<Route path=path!("/") view=Home />
, and then executed the cargo leptos watch command in the examples/ssr_axum directory but the problem did not reappear. Can you provide more information?

@lizidev lizidev added the question Further information is requested label May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants