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] Assertions took very long in headless mode

See original GitHub issue

Context:

  • Playwright Version: 1.21.1
  • Operating System: Linux 5.13 Ubuntu 20.04.4 LTS (Focal Fossa)
  • Browser: WebKit …devices[“iPhone 12”]

System:

  • Memory: 6.38 GB / 11.53 GB
  • Container: Yes

Binaries:

  • Node: 14.18.3 - /usr/local/bin/node
  • npm: 8.1.4 - /usr/local/bin/npm

Languages:

  • Bash: 5.0.17 - /usr/bin/bash

Repo Link

Code Snippet

import { test, expect } from "@playwright/test";

test("test checkboxes and Radio buttons without placements", async ({ page }) => {
  const newSignUrl = "https://staging.scrive.com/s/9221714692412077704/9221932570715111975/e2d6e750aba8283a";

  await page.goto(newSignUrl, { waitUntil: "networkidle" });
  await expect(page).toHaveURL(/new\/sign/);
});

Describe the bug

It took extra long time to pass the test in headless mode. The test report video is very confusing, look like UI is shaking all the time.

Comparison

For headed mode assertion timeout is 5s without any issue. For headless mode assertion timeout it has to change to at least 10s for test to pass.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
yury-scommented, Jul 9, 2022

I cannot reproduce it on Ubuntu (neither in docker nor on a native hardware).

@hex0cter @loxinchi could you please check if it is still reproducible with playwright 1.23.2 ?

1reaction
pavelfeldmancommented, Jun 6, 2022

I can reproduce it, only in headless mode, the viewport is shaking.

Read more comments on GitHub >

github_iconTop Results From Across the Web

selenium tests fail against headless chrome - Stack Overflow
When I run it, Chrome does appear to run headlessly (no browser pops up), but I get a NoSuchElementException . The automation works...
Read more >
Troubleshooting | Cypress Documentation
In some cases the Command Log, responsible for displaying test commands, assertions, and statuses in the Cypress Test Runner, may cause performance issues ......
Read more >
Support WebGL in headless mode - Bugzilla@Mozilla
I got a lead this morning that there's a console log that webgl gets preffed off in headless mode. I will setup remote...
Read more >
Headful tests should not be run in headless mode
Backport - A issue that is required to port a Bug or Feature into another product JDK-8251688 Headful tests should not be run...
Read more >
Command Line Interface | API | Docs - TestCafe
Specify this option to run tests in debug mode. In this mode, TestCafe pauses test execution before the first action or assertion, so...
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