DioxusLabs/docsite

Search bar is broken for 0.4

aidalgol opened this issue · 2 comments

Nothing happens when I click the search bar on https://dioxuslabs.com/learn/0.4/. There is a panic in the browser console log on initial page load.

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'attribution-reporting'.
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'run-ad-auction'.
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'join-ad-interest-group'.
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'browsing-topics'.
docsite.js:626 panicked at src/components/learn.rs:289:14:
internal error: entered unreachable code

Stack:

Error
    at https://dioxuslabs.com/assets/dioxus/docsite.js:613:21
    at logError (https://dioxuslabs.com/assets/dioxus/docsite.js:261:18)
    at imports.wbg.__wbg_new_abda76e883ba8a5f (https://dioxuslabs.com/assets/dioxus/docsite.js:612:66)
    at console_error_panic_hook::hook::h98bfead6a49be1a1 (https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[539]:0xe0f28)
    at core::ops::function::Fn::call::h08e20dc3b5d5843d (https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[3958]:0x145bf5)
    at std::panicking::rust_panic_with_hook::h1e6ac5d404b8e31b (https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[1119]:0x1140e0)
    at std::panicking::begin_panic_handler::{{closure}}::h24b0f4622f2766a5 (https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[1340]:0x11f128)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h19f35d272c126e7c (https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[3898]:0x145a0d)
    at rust_begin_unwind (https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[2171]:0x135c0a)
    at core::panicking::panic_fmt::h87755523850ece9e (https://dioxuslabs.com/assets/dioxus/docsite_bg.wasm:wasm-function[2333]:0x13851f)


(anonymous) @ docsite.js:626
logError @ docsite.js:261
imports.wbg.__wbg_error_f851667af71bcfc6 @ docsite.js:623
$console_error_panic_hook::hook::h98bfead6a49be1a1 @ docsite_bg.wasm:0xe0fda
$core::ops::function::Fn::call::h08e20dc3b5d5843d @ docsite_bg.wasm:0x145bf5
$std::panicking::rust_panic_with_hook::h1e6ac5d404b8e31b @ docsite_bg.wasm:0x1140e0
$std::panicking::begin_panic_handler::{{closure}}::h24b0f4622f2766a5 @ docsite_bg.wasm:0x11f128
$std::sys_common::backtrace::__rust_end_short_backtrace::h19f35d272c126e7c @ docsite_bg.wasm:0x145a0d
$rust_begin_unwind @ docsite_bg.wasm:0x135c0a
$core::panicking::panic_fmt::h87755523850ece9e @ docsite_bg.wasm:0x13851f
$core::panicking::panic::hf4ba1575e20e9f91 @ docsite_bg.wasm:0x1352b3
$dioxus_docs_site::components::learn::use_book::haedcf403c50f8bf4 @ docsite_bg.wasm:0x136791
$<dioxus_core::any_props::VProps<F,P,M> as dioxus_core::any_props::AnyProps>::render::h25d8d3ec66881eb3 @ docsite_bg.wasm:0x4f5b7
$dioxus_core::scope_arena::<impl dioxus_core::virtual_dom::VirtualDom>::run_scope::h6a40d0eb2a93a26f @ docsite_bg.wasm:0xe30e1
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113711
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa378d
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113721
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa3b7b
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113721
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa378d
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113721
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa3b7b
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113721
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa3b7b
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113721
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa3b7b
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_web::launch::launch_virtual_dom::{{closure}}::hd2b2e3b4661d5705 @ docsite_bg.wasm:0x7eec7
$wasm_bindgen_futures::queue::Queue::new::{{closure}}::hd45d1a20e85933c3 @ docsite_bg.wasm:0xf8e30
$wasm_bindgen::convert::closures::invoke1_mut::h22be30de02b1314d @ docsite_bg.wasm:0x140f0c
__wbg_adapter_51 @ docsite.js:283
real @ docsite.js:244
docsite_bg.wasm:0x145c3d Uncaught RuntimeError: unreachable
    at rust_panic (docsite_bg.wasm:0x145c3d)
    at std::panicking::rust_panic_with_hook::h1e6ac5d404b8e31b (docsite_bg.wasm:0x11410c)
    at std::panicking::begin_panic_handler::{{closure}}::h24b0f4622f2766a5 (docsite_bg.wasm:0x11f128)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h19f35d272c126e7c (docsite_bg.wasm:0x145a0d)
    at rust_begin_unwind (docsite_bg.wasm:0x135c0a)
    at core::panicking::panic_fmt::h87755523850ece9e (docsite_bg.wasm:0x13851f)
    at core::panicking::panic::hf4ba1575e20e9f91 (docsite_bg.wasm:0x1352b3)
    at dioxus_docs_site::components::learn::use_book::haedcf403c50f8bf4 (docsite_bg.wasm:0x136791)
    at <dioxus_core::any_props::VProps<F,P,M> as dioxus_core::any_props::AnyProps>::render::h25d8d3ec66881eb3 (docsite_bg.wasm:0x4f5b7)
    at dioxus_core::scope_arena::<impl dioxus_core::virtual_dom::VirtualDom>::run_scope::h6a40d0eb2a93a26f (docsite_bg.wasm:0xe30e1)
$rust_panic @ docsite_bg.wasm:0x145c3d
$std::panicking::rust_panic_with_hook::h1e6ac5d404b8e31b @ docsite_bg.wasm:0x11410c
$std::panicking::begin_panic_handler::{{closure}}::h24b0f4622f2766a5 @ docsite_bg.wasm:0x11f128
$std::sys_common::backtrace::__rust_end_short_backtrace::h19f35d272c126e7c @ docsite_bg.wasm:0x145a0d
$rust_begin_unwind @ docsite_bg.wasm:0x135c0a
$core::panicking::panic_fmt::h87755523850ece9e @ docsite_bg.wasm:0x13851f
$core::panicking::panic::hf4ba1575e20e9f91 @ docsite_bg.wasm:0x1352b3
$dioxus_docs_site::components::learn::use_book::haedcf403c50f8bf4 @ docsite_bg.wasm:0x136791
$<dioxus_core::any_props::VProps<F,P,M> as dioxus_core::any_props::AnyProps>::render::h25d8d3ec66881eb3 @ docsite_bg.wasm:0x4f5b7
$dioxus_core::scope_arena::<impl dioxus_core::virtual_dom::VirtualDom>::run_scope::h6a40d0eb2a93a26f @ docsite_bg.wasm:0xe30e1
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113711
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa378d
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113721
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa3b7b
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113721
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa378d
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113721
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa3b7b
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113721
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa3b7b
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_core::diff::component::<impl dioxus_core::nodes::VNode>::create_component_node::hcf58d3d5033e9ad4 @ docsite_bg.wasm:0x113721
$dioxus_core::diff::node::<impl dioxus_core::nodes::VNode>::create::hefbb3494d5cb371e @ docsite_bg.wasm:0xa3b7b
$dioxus_core::diff::component::<impl dioxus_core::virtual_dom::VirtualDom>::create_scope::h879b3a740174e321 @ docsite_bg.wasm:0x112c0a
$dioxus_web::launch::launch_virtual_dom::{{closure}}::hd2b2e3b4661d5705 @ docsite_bg.wasm:0x7eec7
$wasm_bindgen_futures::queue::Queue::new::{{closure}}::hd45d1a20e85933c3 @ docsite_bg.wasm:0xf8e30
$wasm_bindgen::convert::closures::invoke1_mut::h22be30de02b1314d @ docsite_bg.wasm:0x140f0c
__wbg_adapter_51 @ docsite.js:283
real @ docsite.js:244

Possibly the same root cause: clicking on any of the buttons in the 0.4 hooks examples also does nothing.

I think the issue is the old 0.4 version of the docsite is trying to load the JS/WASM for the new 0.5 version of the docsite. We need to rebuild the old docs with a base_path of learn/0.4 so that it searches for the JS/WASM files on that route