Open
Description
Describe the bug
Using Leptos with SSR/Hydrate, I have used the default Cargo Leptos Axum starter template and modified it with the bug.
The bug can be seen here
https://github.com/sangelxyz/leptos_bug_serverfn
This will compile fine, but clicking next page will cause 500 internal server error in the Browser Console.
The Error seems to be caused by a blank Vec in my Filter struct. Putting a value say 1 will now have no errors.
Leptos Dependencies
Default cargo leptos axum starter template
Please copy and paste the Leptos dependencies and features from your Cargo.toml
.
[dependencies]
leptos = { version = "0.7.0" }
leptos_router = { version = "0.7.0" }
axum = { version = "0.7", optional = true }
console_error_panic_hook = { version = "0.1", optional = true}
leptos_axum = { version = "0.7.0", optional = true }
leptos_meta = { version = "0.7.0" }
tokio = { version = "1", features = ["rt-multi-thread"], optional = true }
wasm-bindgen = { version = "=0.2.100", optional = true }
serde = { version = "1.0.219", features = ["derive"] }
[features]
hydrate = [
"leptos/hydrate",
"dep:console_error_panic_hook",
"dep:wasm-bindgen",
]
ssr = [
"dep:axum",
"dep:tokio",
"dep:leptos_axum",
"leptos/ssr",
"leptos_meta/ssr",
"leptos_router/ssr",
]
To Reproduce
Steps to reproduce the behavior:
- Go to Clone my repo above
- run cargo leptos watch
- open your browser console and click next.
- under network tabs you will see a 500 internal server error.
- Line 85 of app.rs change countries to include a number inside the vec. vec![1] This application then will work with no errors.