{"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":"critical","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/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-driver/src/main.rs#L27-L53","documentation":"tauri-driver (the WebDriver intermediary used by WebdriverIO/Selenium to test Tauri apps) spawns the platform-native WebDriver binary — WebKitWebDriver on Linux, msedgedriver.exe on Windows, or the path from --native-driver — and .spawn().expect(\"error while running native webdriver\") panics when the process cannot be exec'd: broken binary path, missing executable bit, missing shared libraries, or OS process limits.","triggerScenarios":"tauri-driver starting while the native driver cannot exec: a --native-driver path that exists but is not executable, WebKitWebDriver found on PATH but failing to load (missing libwebkit2gtk), or fork/exec refused under CI process limits. (A binary entirely missing fails earlier in webdriver.rs with its own PATH error.)","commonSituations":"Linux CI with a broken webkit2gtk-driver installation; custom --native-driver paths from config variables that are empty/wrong on other machines; Windows without msedgedriver available; minimal container images lacking WebKitGTK runtime libs.","solutions":["Install/repair the native driver: `sudo apt install webkit2gtk-driver` on Linux; ensure msedgedriver.exe is on PATH or passed via --native-driver on Windows","Run the binary by hand to see the real exec error: `WebKitWebDriver --version` / `msedgedriver --version`; fix permissions (chmod +x) or missing libs (`ldd $(which WebKitWebDriver)`)","Pass an explicit path: `tauri-driver --native-driver /usr/bin/WebKitWebDriver`","Check CI process/thread limits if exec is refused despite a healthy binary"],"exampleFix":"# before: tauri-driver → panic: error while running native webdriver\n\n# after\nsudo apt install -y webkit2gtk-driver\nldd \"$(command -v WebKitWebDriver)\" | grep 'not found' && sudo apt install -y libwebkit2gtk-4.1-0\ntauri-driver","handlingStrategy":"validation","validationCode":"# bootstrap check before starting tauri-driver\ncommand -v WebKitWebDriver >/dev/null || sudo apt install -y webkit2gtk-driver\nWebKitWebDriver --version >/dev/null 2>&1 || { echo \"native driver broken\" >&2; ldd \"$(command -v WebKitWebDriver)\" | grep 'not found'; exit 1; }\ntauri-driver","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Bake the native WebDriver into the CI image (webkit2gtk-driver on Linux, msedgedriver on Windows)","Pass --native-driver explicitly instead of relying on PATH","Verify the driver executes (—version) in the test bootstrap, not during the test run"],"tags":["webdriver","testing","process","tauri-driver"],"backgroundTag":"webdriver-executable-not-found","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","contentChangedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}