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

[Docs]: trouble with the mvn exec install webkit command #1542

Closed
hbrls opened this issue Apr 7, 2024 · 4 comments
Closed

[Docs]: trouble with the mvn exec install webkit command #1542

hbrls opened this issue Apr 7, 2024 · 4 comments

Comments

@hbrls
Copy link

hbrls commented Apr 7, 2024

Page(s)

https://playwright.dev/java/docs/browsers

Description

The docs recommends to use mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install webkit". It doesn't work for me. The console throws: error: unknown command ''install webkit'', which from the node.js commander.

After a line by line debug, I suppose the problem is: the argv install webkit is passed as aString -> "install webkit" to node.js, not String[] -> ["install", "webkit"].

And the modified command works: mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.arguments=install,webkit.

I'm on a Mac / IDEA, Java 11 / Maven 3.

I'm not sure if it's a bug. Could anyone help to figure out?

@yury-s
Copy link
Member

yury-s commented Apr 10, 2024

Hm, works fine for me, which playwright version do you use?

I just tried with our examples and playwright, 1.43.0:

$ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install webkit"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------< org.example:examples >------------------------
[INFO] Building Playwright Client Examples 1.43.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- exec-maven-plugin:3.1.1:java (default-cli) @ examples ---
Downloading Webkit 17.4 (playwright build v1992) from https://playwright.azureedge.net/builds/webkit/1992/webkit-mac-13-arm64.zip
66.2 MiB [====================] 100% 0.0s
Webkit 17.4 (playwright build v1992) downloaded to /Users/user/Library/Caches/ms-playwright/webkit-1992

@hbrls
Copy link
Author

hbrls commented Apr 14, 2024

I've tried 1.20 -> 1.43. None of them worked.

....../corretto-11.0.22/Contents/Home/bin/java ...... exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install webkit"
......
[INFO] --- exec:3.2.0:java (default-cli) @ playwrightx ---
error: unknown command 'install webkit'

@yury-s
Copy link
Member

yury-s commented Apr 16, 2024

....../corretto-11.0.22/Contents/Home/bin/java ...... exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install webkit"

This command is different from mvn exec:java ..., you may need to adjust arguments list for it. What is the exact command you are running?

@mxschmitt
Copy link
Member

Closing as part of the triage process since it seemed stale. Please create a new issue with a detailed reproducible or feature request if you still face issues.

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

No branches or pull requests

3 participants