playwright-rust icon indicating copy to clipboard operation
playwright-rust copied to clipboard

"No such file or directory" error when calling Playwright::initialize()

Open randall-coding opened this issue 3 years ago • 1 comments

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 an Err value: 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.

randall-coding avatar Jan 17 '22 23:01 randall-coding

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.

randall-coding avatar Jan 19 '22 00:01 randall-coding

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.

octaltree avatar Sep 19 '22 06:09 octaltree

Thanks, this looks like an issue I forgot to update. I believe I fixed it with clearing the cache as you mention.

randall-coding avatar Sep 19 '22 23:09 randall-coding