[BUG] Firefox Timeout while waiting for popup
See original GitHub issueContext:
- 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:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top 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 >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 FreeTop 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
Top GitHub Comments
@aslushnikov That is accurate, but on removal nothing changes. Thanks for spotting it though.
I’m delighted to announce that even though my use of
playwright@next
earlier did not succeed, my use of the officialplaywright@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)