question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] A specific test not running on Docker (mobile safari)

See original GitHub issue

Context:

  • Playwright Version: 1.19.2
  • Operating System: Mac
  • Node.js version: 12.22
  • Browser: Mobile Safari [iPhone 12]
  • Extra: Docker image PW v1.19.2

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and that we can run and debug locally. For example:

// foo.spec.js
test('test', async ({ page }) => {
    await page.goto(<MY_URL>);
});

// config.js
projects: [
 {
    name: 'Mobile Safari',
    use: devices['iPhone 12'],
 },
],

Describe the bug The above test is passing locally when I run it using npx playwright test. Ran it 100 times and it worked 100 times. The test is simple which is navigating to an URL and waiting for the load event.

Running the same test on Playwright focal image 1.19.2, it fails. The logs:

Timeout of 30000ms exceeded.
....
    page.goto: Navigation failed because page was closed!
    =========================== logs ===========================
    navigating to "<MY_URL>", waiting until "load"

The same tests runs fine locally and on docker using projects like “Desktop Chrome”, “Desktop Safari”, and “Mobile Chrome” (Pixel 5)

Note: Shared MY_URL with @pavelfeldman privately

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nhe23commented, Mar 16, 2022

After some investigation I found out that Mobile Safari tests are working inside the Docker container but they are much more likely to timeout and fail compared to for example Mobile Chrome tests. This paired with the not so great performance of AzurePipelines lead to all Mobile Safari tests failing inside the pipeline.

0reactions
pavelfeldmancommented, Mar 17, 2022

Closing as per above

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix and Debug Docker Containers Like a Superhero
Container errors are tricky to diagnose, but some investigative magic works wonders. Read along to learn how to debug Docker containers.
Read more >
Test runner never began executing … | Apple Developer Forums
Test runner never began executing tests after launching​​ If we use any iOS 12 emulator then it works. anyone have the same issue...
Read more >
Browsers - Sitespeed.io
The following browsers are supported: Firefox, Safari, Edge, Chrome, Chrome and Firefox on Android and Safari on iOS. If you run our Docker...
Read more >
What is the difference between testing on Safari vs Webkit?
Stock browsers like Google Chrome, Apple Safari embed rendering engines (Chromium, WebKit) and add stuff on top of them. In particular ...
Read more >
How To Run End-to-End Tests Using Playwright and Docker
Since Webkit is the core of the Safari browser, Playwright's cross-browser functionality makes it a good option for testing web apps. Playwright ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found