{"record":{"id":"c482320a40f7c892","repo":"tauri-apps/tauri","slug":"error-while-running-native-webdriver","errorCode":null,"errorMessage":"error while running native webdriver","messagePattern":"error while running native webdriver","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-driver/src/main.rs","lineNumber":45,"sourceCode":"#[cfg(any(target_os = \"linux\", windows))]\nfn main() {\n  let args = pico_args::Arguments::from_env().into();\n\n  #[cfg(windows)]\n  let _job_handle = {\n    let job = win32job::Job::create().unwrap();\n    let mut info = job.query_extended_limit_info().unwrap();\n    info.limit_kill_on_job_close();\n    job.set_extended_limit_info(&info).unwrap();\n    job.assign_current_process().unwrap();\n    job\n  };\n\n  // start the native webdriver on the port specified in args\n  let mut driver = webdriver::native(&args);\n  let driver = driver\n    .spawn()\n    .expect(\"error while running native webdriver\");\n\n  // start our webdriver intermediary node\n  if let Err(e) = server::run(args, driver) {\n    eprintln!(\"error while running server: {e}\");\n    std::process::exit(1);\n  }\n}\n","sourceCodeStart":27,"sourceCodeEnd":53,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-driver/src/main.rs#L27-L53","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: spawn fails because binary missing on PATH\nlet mut driver = webdriver::native(&args);\n// after: ensure it exists first (or install msedgedriver/geckodriver)\nassert!(Command::new(\"where msedgedriver\").output().is_ok());\nlet driver = webdriver::native(&args).spawn().expect(\"install native webdriver first\");","handlingStrategy":"validation","validationCode":"const { execSync } = require('child_process');\n// verify the native webdriver is installed before running tauri-driver\nconst drivers = process.platform === 'win32' ? ['msedgedriver'] : process.platform === 'darwin' ? ['safaridriver'] : ['geckodriver', 'chromedriver'];\nfor (const d of drivers) {\n  try { execSync(`${d} --version`, { stdio: 'ignore' }); console.log(`${d} OK`); }\n  catch { console.error(`${d} missing — install it before running tauri-driver`); }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["webdriver","process-spawn","tauri-driver","testing","missing-binary"],"backgroundTag":"command-not-found","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"}