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] Firefox Timeout while waiting for popup

See original GitHub issue

Context:

  • Playwright Version: 0.11.1
  • Operating System: Mac 10.13.6
  • Node.js version: 12.14.1
  • Browser: Firefox
  • Extra: We are using 0.11.1 Playwright for compatibility with Mac Sierra, as I understand newer Playwright versions do not accept Mac Sierra

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:

it.each(['chromium', 'firefox'])(`${testTitle} [%s]`, async browserType => {
    const playwright = new PlaywrightUtilStructure(browserType)
    await playwright.launchBrowser() // creates browser & context instances
    await playwright.launchApp() // goes to page
    try {
      const landingPage = new LandingPage(playwright.page) // util functions, not critical
      // .. other validation
      const [popup] = await Promise.all([
        playwright.page.waitForEvent('popup'),
        await landingPage.clickLoginItem(), // Click triggers a popup.
      ])
      // The promise resolves after 'domcontentloaded' event.
      await popup.waitForLoadState('domcontentloaded')
      console.log(await popup.title()) // Popup is ready to use.
    } catch (err) {
      await playwright.screenshotCloseBrowserThrow(testTitle, err)
    }
    // Close after finished test success
    await playwright.closeBrowser()
  })

Describe the bug

We have this code running for chromium & firefox (see above via it.each) and chromium passes fine. The log line prints the expected name of the popup, and when running in headless=false mode we can see the popup open and can confirm it matches the log. On firefox however, the code hangs during the Promise.all phase with the following:

TimeoutError: Timeout exceeded while waiting for popup

      18 |       const [popup] = await Promise.all([
    > 19 |         playwright.page.waitForEvent('popup'),
         |                         ^
      20 |         await landingPage.clickLoginItem(), // Click triggers a popup.
      21 |       ])
      22 |       // The promise resolves after 'domcontentloaded' event.

But I can confirm the popup is appearing (and not even slowly).

I recognize this might be a “get on the proper version of Playwright” kind of issue, considering we’re not using even the 1.0.0 version, but was hoping someone might have input.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mwallace72commented, Sep 24, 2020

@aslushnikov That is accurate, but on removal nothing changes. Thanks for spotting it though.

0reactions
mwallace72commented, Sep 25, 2020

I’m delighted to announce that even though my use of playwright@next earlier did not succeed, my use of the official playwright@1.4.2 did succeed, on both Chromium & Firefox (right in the middle of my trying to make a repro which also succeeded for both)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Request Timeout The server timed out while waiting for the ...
Chosen solution · Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance · Do NOT click the Reset button on the Safe...
Read more >
686626 - Timeout is not functioning in popup notification.
Your right. My problem is the 'timeout' isn't working. { timeout: Date.now() + 1000, persistWhileVisible: false } - the pop-up didn''t hide in...
Read more >
335058 - script timeout too small in firefox - Bugzilla@Mozilla
Just my 2 cents. The timeout happens only when Firefox is opened. I have no problems once the program is loaded. I believe...
Read more >
1687675 - setTimeout function stops working in tab, does not ...
It turned out that the tasks were no longer working because a call to setTimeout stopped setting a timeout – or the timeout...
Read more >
Warning Unresponsive script - What it means and how to fix it
This error is telling you that Firefox thinks that a script may be running out of control and would make Firefox hang if...
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