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

[Bug]: playwright is launching the chrome x86_64 version on the Mac book M3 #34154

Closed
jagadish1010 opened this issue Dec 28, 2024 · 7 comments
Closed

Comments

@jagadish1010
Copy link

jagadish1010 commented Dec 28, 2024

Version

v1.49.1

Steps to reproduce

  1. Install the chrome on Mac M3
  2. file "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
    /Applications/Google Chrome.app/Contents/MacOS/Google Chrome: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
    /Applications/Google Chrome.app/Contents/MacOS/Google Chrome (for architecture x86_64): Mach-O 64-bit executable x86_64
    /Applications/Google Chrome.app/Contents/MacOS/Google Chrome (for architecture arm64): Mach-O 64-bit executable arm64

It has binary with 2 architectures.
3. When we launch the browser using playwright it is picking the intel chip chrome instead of the Mach-O 64-bit executable arm64.
4. Using the java code to launch
5. Sample code :
6. case "chrome":
browserType = playwright.chromium();
launchOptions.setChannel("chrome");
break;

Expected behavior

Expected to launch the browser with architecture arm64

Actual behavior

Launching the browser with architecture x86_64

Additional context

No response

Environment

Mac Book Pro 3
Chip : Apple M3 chip pro
@jagadish1010 jagadish1010 changed the title [Bug]: playwright is launching the chrome arm64 version on the Mac book M3 [Bug]: playwright is launching the chrome x86_64 version on the Mac book M3 Dec 28, 2024
@mxschmitt
Copy link
Member

Could you try if the steps in #23914 (comment) help? Looks similar to #23914

@jagadish1010
Copy link
Author

@mxschmitt : I tried these steps

Rosetta emulated is not enabled.

Emulate using Rosetta I don't see this option in the chrome.

@mxschmitt
Copy link
Member

What's the output of file $(which java)?

@jagadish1010
Copy link
Author

/Users/jhatti/.sdkman/candidates/java/current/bin/java: Mach-O 64-bit executable arm64

@dgozman
Copy link
Contributor

dgozman commented Jan 2, 2025

@jagadish1010 Unfortunately, the problem is most likely in your setup. Even if you share a repro, running it on our hardware probably won't reproduce the issue. Try looking around for the executable properties of your java, node that is bundled with Playwright and/or any settings. How do you know that Playwright is launching the x86_64 version of the browser? Share any insights here, and try your luck at our Discord server.

@jagadish1010
Copy link
Author

@dgozman : When I see the version of the browser launched using the playwright

Browser version launched with Playwright
Image

Browser version in normal :
Image

@Skn0tt
Copy link
Member

Skn0tt commented Jan 3, 2025

This is most definitely something specific to your setup, so i'll go ahead and mark it closed for housekeeping purposes. Feel free to continue sharing your findings here, it might help others with the same problem! As Dmitry noted, try looking at the executable properties of java and node. If one of them is started in x86 compatibility mode, there's a good chance that that also influences what mode Chrome is started in.

@Skn0tt Skn0tt closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2025
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

4 participants