{"record":{"id":"33fa802742e48a11","repo":"tauri-apps/tauri","slug":"not-implemented-mod","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/tauri/src/webview/mod.rs","lineNumber":868,"sourceCode":"  /// Creates a new webview on the given window.\n  #[cfg(desktop)]\n  pub(crate) fn build(\n    self,\n    window: Window<R>,\n    position: Position,\n    size: Size,\n  ) -> crate::Result<Webview<R>> {\n    let app_manager = window.manager();\n\n    let mut pending = self.into_pending_webview(&window, window.label())?;\n\n    pending.webview_attributes.bounds = Some(tauri_runtime::dpi::Rect { size, position });\n\n    let use_https_scheme = pending.webview_attributes.use_https_scheme;\n\n    let webview = match &mut window.runtime() {\n      RuntimeOrDispatch::Dispatch(dispatcher) => dispatcher.create_webview(pending),\n      _ => unimplemented!(),\n    }\n    .map(|webview| {\n      app_manager\n        .webview\n        .attach_webview(window.clone(), webview, use_https_scheme)\n    })?;\n\n    Ok(webview)\n  }\n}\n\n/// Webview attributes.\nimpl<R: Runtime> WebviewBuilder<R> {\n  /// Sets whether clicking an inactive window also clicks through to the webview.\n  #[must_use]\n  pub fn accept_first_mouse(mut self, accept: bool) -> Self {\n    self.webview_attributes.accept_first_mouse = accept;\n    self","sourceCodeStart":850,"sourceCodeEnd":886,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri/src/webview/mod.rs#L850-L886","documentation":"In WebviewWindowBuilder::build, after creating a child webview the code dispatches to the runtime via `window.runtime()`, which is a RuntimeOrDispatch enum. Only the `Dispatch` variant supports `create_webview`, so every other variant (Application, Window) hits `unimplemented!()`. Panicking here means a child webview was requested in a context where the window handle holds something other than a runtime dispatcher.","triggerScenarios":"Calling WebviewWindowBuilder::add_child / build while the parent's runtime accessor resolves to RuntimeOrDispatch::Application or RuntimeOrDispatch::Window instead of Dispatch — e.g. creating a child webview from a context that is not a plain dispatchable window handle.","commonSituations":"Constructing multi-webview windows from an app handle rather than a window handle; mixing webview-window and window APIs on the wrong handle type; fork/custom runtime code returning a non-dispatch variant from runtime().","solutions":["Ensure add_child/build is called on a WebviewWindow whose runtime() yields RuntimeOrDispatch::Dispatch (a real window dispatcher), not the app-level handle","Use the correct builder API: create child webviews from the window (WebviewWindowBuilder on the window) rather than from the application handle","Update Tauri — newer versions route all create_webview calls through a dispatcher-compatible path","If maintaining a fork, handle the Application/Window variants explicitly (obtain a dispatcher from them) instead of `unimplemented!()`"],"exampleFix":"// before\n_ => unimplemented!(),\n// after\nRuntimeOrDispatch::Application(handle) => handle.create_webview(pending),\nRuntimeOrDispatch::Window(window) => window.dispatcher().create_webview(pending),","handlingStrategy":"validation","validationCode":"if !matches!(window.runtime(), RuntimeOrDispatch::Dispatch(_)) {\n  eprintln!(\"add_child requires a window dispatcher handle\");\n}","typeGuard":"fn is_dispatcher(rt: &RuntimeOrDispatch<W>) -> bool {\n  matches!(rt, RuntimeOrDispatch::Dispatch(_))\n}","tryCatchPattern":"// This is a panic, not a Result. Call build() only on WebviewWindow instances (window handles), and catch process-level panics:\nstd::panic::catch_unwind(|| builder.build(window.clone()));","preventionTips":["Create child webviews from a WebviewWindow handle, not from the AppHandle","Prefer WebviewWindowBuilder / window.add_child APIs over manual runtime calls","Pin and test with the Tauri version you target; multiwebview APIs evolved between releases"],"tags":["tauri","webview","panic","unimplemented","multiwebview"],"backgroundTag":"method-not-implemented","analyzedSha":"460ec35447493200d64290dd7f015d5a91d0fd58","analyzedAt":"2026-09-18T23:55:51.277Z","contentChangedAt":"2026-09-18T23:55:51.277Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}