DioxusLabs / dioxus

Fullstack GUI library for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
19.33k stars 736 forks source link

Option None Element crash the Renderer on Fullstack Serve direct access #2190

Closed gusinacio closed 3 months ago

gusinacio commented 3 months ago

Problem

When you return a rsx!{} or a None as an Element, the renderer crashes with the following logs:

[INFO] dioxus_fullstack::render - Suspense resolved
thread 'tokio-runtime-worker' panicked at /Users/gustavoinacio/.cargo/git/checkouts/dioxus-5df58c476196bcfb/55d1f83/packages/ssr/src/renderer.rs:129:38:
not yet implemented: generally, scopes should be sync, only if being traversed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at /Users/gustavoinacio/.cargo/git/checkouts/dioxus-5df58c476196bcfb/55d1f83/packages/fullstack/src/render.rs:97:60:
called `Result::unwrap()` on an `Err` value: RecvError(())

If you access another page, then the page with None element, it renders correctly.

Steps To Reproduce

Steps to reproduce the behavior:

Expected behavior

When accessing a None element, it should not display anything and it should not crash.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment:

Questionnaire

XavDesbordes commented 3 months ago

I just came across the same issue, +1 Except I am on Linux