Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update playwright version to 1.13.0 #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eredotpkfr
Copy link

@eredotpkfr eredotpkfr commented May 4, 2024

Problem

Hey folks, I am currently using MacOS operating system and then playwright version 1.11 is not support browsers for apple silicon machines. I was getting following error when I try install browsers. Also this PR related with #27

foo@bar:~/playwright-rust$ target/debug/playwright install
Failed to install browsers
Error: Failed to download chromium, caused by
Error: ERROR: Playwright does not support chromium on mac14-arm64
    at Object.assert (/Users/foo/Library/Caches/ms-playwright/playwright-rust/driver/package/lib/utils/utils.js:86:15)
    at Registry.downloadURL (/Users/foo/Library/Caches/ms-playwright/playwright-rust/driver/package/lib/utils/registry.js:346:17)
    at Object.downloadBrowserWithProgressBar (/Users/foo/Library/Caches/ms-playwright/playwright-rust/driver/package/lib/install/browserFetcher.js:84:26)
    at async validateCache (/Users/foo/Library/Caches/ms-playwright/playwright-rust/driver/package/lib/install/installer.js:129:9)
    at async Object.installBrowsersWithProgressBar (/Users/foo/Library/Caches/ms-playwright/playwright-rust/driver/package/lib/install/installer.js:80:9)
    at async Object.installBrowsers (/Users/foo/Library/Caches/ms-playwright/playwright-rust/driver/package/lib/cli/driver.js:93:5)
    at async Command.<anonymous> (/Users/foo/Library/Caches/ms-playwright/playwright-rust/driver/package/lib/cli/cli.js:108:9)

PR

In this PR, I updated playwright version to 1.13.0, this version compatible with this project. I tried so many versions (like a latest version 1.43) but I could not solve the following error on tests

---- imp::browser_context::tests::storage_state stdout ----
thread 'imp::browser_context::tests::storage_state' panicked at src/imp/browser_context.rs:307:62:
called `Result::unwrap()` on an `Err` value: InitializationError

It seems, playwright-rust could not parse incoming json data from /Users/foo/Library/Caches/ms-playwright/playwright-rust/driver/package/cli.js run-driver. As I understand, new versions of playwright does not serve this data

Also I updated build.rs file cause of cargo: notation is not available on new rust versions, here is the reference

Tests

Following tests are fails, I got timeout error when I run tests

  • chromium_devices
  • chromium_page
  • connect_over_cdp
  • firefox_devices
  • firefox_page
thread 'chromium_devices' panicked at tests/devices/mod.rs:87:32:
called `Result::unwrap()` on an `Err` value: Timeout

Conclusion

I am still working on this PR, I will update this PR when tests are succeeded, maybe we can work on it together @octaltree

@i7solar
Copy link

i7solar commented Aug 11, 2024

bump pls merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants