{"record":{"id":"182bfd1eff5a39e5","repo":"DioxusLabs/dioxus","slug":"index-route-does-not-exist-use-liveviewhistor","errorCode":null,"errorMessage":"index route does not exist:\n{}\n use LiveviewHistory::new_with_initial_path to set a custom path","messagePattern":"index route does not exist:\n(.+?)\n use LiveviewHistory::new_with_initial_path to set a custom path","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/liveview/src/history.rs","lineNumber":129,"sourceCode":"    fn session(&self) -> Session {\n        Session {\n            routes: self.routes.clone(),\n            last_visited: self.current_index,\n        }\n    }\n}\n\nimpl LiveviewHistory {\n    /// Create a [`LiveviewHistory`] in the given scope.\n    /// When using a [`LiveviewHistory`] in combination with use_eval, history must be untampered with.\n    ///\n    /// # Panics\n    ///\n    /// Panics if the function is not called in a dioxus runtime with a Liveview context.\n    pub(crate) fn new(eval: Rc<dyn Fn(&str) -> Eval>) -> Self {\n        Self::new_with_initial_path(\n            \"/\".parse().unwrap_or_else(|err| {\n                panic!(\"index route does not exist:\\n{}\\n use LiveviewHistory::new_with_initial_path to set a custom path\", err)\n            }),\n            eval\n        )\n    }\n\n    /// Create a [`LiveviewHistory`] in the given scope, starting at `initial_path`.\n    /// When using a [`LiveviewHistory`] in combination with use_eval, history must be untampered with.\n    ///\n    /// # Panics\n    ///\n    /// Panics if the function is not called in a dioxus runtime with a Liveview context.\n    fn new_with_initial_path(initial_path: String, eval: Rc<dyn Fn(&str) -> Eval>) -> Self {\n        let (action_tx, mut action_rx) = tokio::sync::mpsc::unbounded_channel::<Action>();\n\n        let timeline = Arc::new(Mutex::new(Timeline::new(initial_path)));\n        let updater_callback: Arc<RwLock<Arc<dyn Fn() + Send + Sync>>> =\n            Arc::new(RwLock::new(Arc::new(|| {})));\n","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/liveview/src/history.rs#L111-L147","documentation":"LiveviewHistory's default constructor failed to parse the \"/\" index route against the user's Routable enum, which defines no matching index route. Construction requires a valid initial path; use new_with_initial_path to start somewhere valid.","triggerScenarios":"Thrown at packages/liveview/src/history.rs:129 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The initial path matches no index route. Use LiveviewHistory::new_with_initial_path to set an initial path that exists in the Routable enum."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}