[BUG] A specific test not running on Docker (mobile safari)
See original GitHub issueContext:
- 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:
- Created 2 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
Closing as per above