octaltree / playwright-rust

Playwright port to Rust
298 stars 31 forks source link

Add mac arm support by upgrading playwright's version to 1.25.1 #36

Open zexa opened 1 year ago

zexa commented 1 year ago

Tested locally by running cargo run -- install firefox and cargo run -- ff google.com.

Installing the driver would fail on 1.11.0-1620331022000 because the m1 platform wasn't supported back then.

Let me know if there's something else you'd like done to get this merged to master.

Solves https://github.com/octaltree/playwright-rust/issues/27.

zexa commented 1 year ago

Make sure to delete all cache locations before testing:

rm -rf /tmp/build-playwright-rust
rm -rf $HOME/Library/Caches/ms-playwright
rm -rf target

Otherwise, the build script will likely use the last installed version, which in my case was 1.11.0-1620331022000.

octaltree commented 1 year ago

I'm working on 1.25 in the dev branch, so please wait.

matthiasdebernardini commented 1 year ago

if this could get merged that would be swell, am happy to contribute testing anything if you need

21st-centuryman commented 1 year ago

Any updates on this PR? I would love to see it supported.

zexa commented 1 year ago

Any updates on this PR? I would love to see it supported.

Judging from the fact that the PR has been posted a few months ago, @octaltree is probs bussy with life. No one really knows when 1.25.1 or later will be released if ever.

In the mean time, feel free to use my branch.

ghost commented 1 year ago

Had an issue where it would tell me that mac12 is not supported (old Playwright), tried using this branch with 1.25.1 and even a newer version 1.30 but keep getting InitializationError when calling Playwright::initialize() now. Tried to poke around the code without any success unfortunately, am I the only one having problems calling initialization?

zexa commented 1 year ago

Had an issue where it would tell me that mac12 is not supported (old Playwright), tried using this branch with 1.25.1 and even a newer version 1.30 but keep getting InitializationError when calling Playwright::initialize() now. Tried to poke around the code without any success unfortunately, am I the only one having problems calling initialization?

Make sure to read the above comment https://github.com/octaltree/playwright-rust/pull/36#issuecomment-1236907831

It's likely that you're actually still using an older version under the hood.

ghost commented 1 year ago

Make sure to read the above comment https://github.com/octaltree/playwright-rust/pull/36#issuecomment-1236907831

It's likely that you're actually still using an older version under the hood.

Thanks for the reply, I did run the remove commands still had the same result. Although it seems for my use case playwright is not necessary after more research.

daniel-abramov commented 1 year ago

Just as a note: same error on my side, even after running the commands, so something seems to be broken.