tauri-apps/tauri · error
error while running native webdriver
Error message
error while running native webdriver
What it means
Panic in tauri-driver's main: spawning the platform's native webdriver binary (via `webdriver::native(&args).spawn()`) failed. This is the `std::process::Command::spawn` error — the driver executable (e.g. msedgedriver, geckodriver equivalent bundled per-OS) could not be launched, typically because the binary is missing, not installed, or cannot be executed on this platform.
Solutions
- Install the native webdriver for your platform (e.g. `msedgedriver` on Windows, `safaridriver` via xcode tools on macOS, `geckodriver`/`chromedriver` as appropriate).
- Ensure the driver binary is on PATH and executable (`chmod +x`).
- Verify you downloaded the tauri-driver build matching your OS/arch.
- Run tauri-driver on a supported platform — native webdriver support differs per OS.
Example fix
// before: spawn fails because binary missing on PATH
let mut driver = webdriver::native(&args);
// after: ensure it exists first (or install msedgedriver/geckodriver)
assert!(Command::new("where msedgedriver").output().is_ok());
let driver = webdriver::native(&args).spawn().expect("install native webdriver first"); Defensive patterns
Strategy: validation
Validate before calling
const { execSync } = require('child_process');
// verify the native webdriver is installed before running tauri-driver
const drivers = process.platform === 'win32' ? ['msedgedriver'] : process.platform === 'darwin' ? ['safaridriver'] : ['geckodriver', 'chromedriver'];
for (const d of drivers) {
try { execSync(`${d} --version`, { stdio: 'ignore' }); console.log(`${d} OK`); }
catch { console.error(`${d} missing — install it before running tauri-driver`); }
} Prevention
- Install the platform webdriver (msedgedriver/safaridriver/geckodriver) as part of test setup
- Keep webdriver and browser/WebView versions in sync
- Ensure the driver binary is on PATH and executable
- Use matching-arch tauri-driver builds for your OS
When it happens
Trigger: Running `tauri-driver` on a platform where the required native webdriver binary is not installed or not on PATH (e.g. running the Linux build on a Mac, or missing msedgedriver on Windows), or the binary lacks execute permission.
Common situations: Using tauri-driver without the OS-specific webdriver installed; wrong architecture binary; Windows without the appropriate WebView2/Edge driver; PATH not including the driver location.
Related errors
AI-assisted analysis of tauri-apps/tauri@460ec35447 (2026-09-18).
Data as JSON: /api/errors/c482320a40f7c892.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tauri-driver/src/main.rs:45
#[cfg(any(target_os = "linux", windows))]
fn main() {
let args = pico_args::Arguments::from_env().into();
#[cfg(windows)]
let _job_handle = {
let job = win32job::Job::create().unwrap();
let mut info = job.query_extended_limit_info().unwrap();
info.limit_kill_on_job_close();
job.set_extended_limit_info(&info).unwrap();
job.assign_current_process().unwrap();
job
};
// start the native webdriver on the port specified in args
let mut driver = webdriver::native(&args);
let driver = driver
.spawn()
.expect("error while running native webdriver");
// start our webdriver intermediary node
if let Err(e) = server::run(args, driver) {
eprintln!("error while running server: {e}");
std::process::exit(1);
}
}
View on GitHub (pinned to 460ec35447)