tauri-apps/tauri · warning
Error dialog is not implemented for this platform
Error message
Error dialog is not implemented for this platform
What it means
tauri-runtime-wry's dialog::error shows a native error message box. Only the Windows backend is implemented; on any other platform the function panics via unimplemented!. This is an internal runtime helper used to surface fatal initialization errors (e.g. Wry creation failures) as a dialog.
Solutions
- On Linux install the required WebKitGTK packages (libwebkit2gtk-4.1-dev) so the failing initialization path is never hit
- Log the error with eprintln/log crate instead of calling dialog::error on non-Windows
- Gate the call with #[cfg(windows)] and use an OS-appropriate fallback
Example fix
// before
dialog::error("failed to create webview");
// after
#[cfg(windows)]
dialog::error("failed to create webview");
#[cfg(not(windows))]
eprintln!("failed to create webview"); Defensive patterns
Strategy: fallback
Validate before calling
#[cfg(not(windows))]
fn can_show_error_dialog() -> bool { false } Type guard
fn supports_error_dialog() -> bool { cfg!(windows) } Try / catch
if cfg!(windows) { dialog::error(msg); } else { eprintln!("{msg}"); } Prevention
- Install WebKitGTK dev packages on Linux so fatal init paths don't trigger
- Never call platform-gated helpers without cfg guards
- Provide a logging fallback for user-facing fatal errors on all platforms
When it happens
Trigger: Calling tauri_runtime_wry::dialog::error directly on Linux/macOS, or hitting a fatal runtime initialization path on non-Windows that funnels into it.
Common situations: Wry failing to initialize (missing WebKitGTK on Linux) and the runtime attempting to show the error dialog; porting code that used the Windows-only helper to another OS.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
AI-assisted analysis of tauri-apps/tauri@460ec35447 (2026-09-18).
Data as JSON: /api/errors/b5c964e99ea7bbb7.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tauri-runtime-wry/src/dialog/mod.rs:17
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
#[cfg(windows)]
mod windows;
// Takes a `&'static str` here since we convert clickable hyperlinks,
// DO NOT pass in untrusted input
#[cfg_attr(not(windows), allow(unused))]
pub fn error(err: &'static str) {
#[cfg(windows)]
windows::error(err);
#[cfg(not(windows))]
{
unimplemented!("Error dialog is not implemented for this platform");
}
}
View on GitHub (pinned to 460ec35447)