playwright-rust
playwright-rust copied to clipboard
"No such file or directory" error when calling Playwright::initialize()
I started with this issue of a black browser display, then in an attempt to fix it I set up my dev environment on my new PC (also running Ubuntu 21). Now I'm running into this issue:
thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on anErrvalue: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })', src/bin/webview.rs:39:58
when I call initialize:
let playwright = Playwright::initialize().await.unwrap();
This is the same code that was previously able to launch the browser on my other PC (though it produced a black display, it was operable with javascript and didn't crash).
Does anyone have an idea of what might be happening here? I'm not specifying a file or directory, but the playwright-rust code apparently is. Though I can't see why it would it be a problem.
Still haven't fixed the issue on my new machine setup, but on my old machine I was able to use firefox (not chromium however) without a black screen by upgrading my rustc and playwright version.
If ubuntu. Delete /tmp/build-playwright-rust and ~/.cache/ms-playwright/playwright-rust/driver, run playwright with let playwright = Playwright::initialize().await.unwrap();, and verify that there is a driver in cache.
Thanks, this looks like an issue I forgot to update. I believe I fixed it with clearing the cache as you mention.