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]: Mobile webkit tests on Ubuntu works 4x slower in comparison with macOS #34119

Closed
Ihor123166 opened this issue Dec 20, 2024 · 3 comments
Closed

Comments

@Ihor123166
Copy link

Version

1.49.1

Steps to reproduce

  1. git clone https://github.com/Ihor123166/mobile-safari-bug-on-ubuntu.git
  2. cd mobile-safari-bug-on-ubuntu
  3. Install yarn if needed npm install -g yarn
  4. Install dependencies yarn && yarn playwright install --with-deps
  5. Install docker if needed
  6. Run tests on ubuntu docker run -it --rm --ipc=host -v ./:/tests mcr.microsoft.com/playwright:v1.49.1 /bin/bash -c "cd /tests && yarn playwright test tests/slow.spec.ts"

Expected behavior

Expect mobile WebKit tests on Ubuntu to pass at approximately the same speed as on macOS

Image from macOS run

Actual behavior

Mobile webkit tests on Ubuntu passed 4-5x slower in comparison with macOS. But other projects doesn't have such big difference in speed

Image from Ubuntu docker run

Additional context

No response

Environment

System:
    OS: macOS 15.2
    CPU: (10) arm64 Apple M1 Pro
    Memory: 100.48 MB / 16.00 GB
  Binaries:
    Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: ^1.49.1 => 1.49.1
@pavelfeldman
Copy link
Member

I can repro, unclear what is going on, looks like dedicated WebKit headless implementation on Linux (WPE) is hammered with rendering.

As a workaround, you can run your tests in a headed mode under xvfb:

    {
      name: "Mobile Safari",
      use: {
        ...devices["iPhone 12"],
        headless: false,
      },
    },

Image

@pavelfeldman
Copy link
Member

Also, ToT seems to be working fine:

npm i @playwright/test@1.50.0-alpha-2024-12-20

@Ihor123166
Copy link
Author

@pavelfeldman Thank you, the workaround helped me, and it's working fine on version 1.50.0-alpha-2024-12-20 for me too

@Skn0tt Skn0tt closed this as completed Dec 23, 2024
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