[Question] `context.waitForEvent('page')` not working on Github Actions
See original GitHub issueI have Playwright tests that perform an action that opens a new tab, and then assert on the properties of the new tab.
The test waits for context.waitForEvent('page'), and is getting a timeout on Github Actions.
The code is the head of this repo: https://github.com/canopy-js/canopy-js
The tests that are failing are eg https://github.com/canopy-js/canopy-js/blob/main/playwright/navigation.spec.js#L62
Here is an example of a failing build: https://github.com/canopy-js/canopy-js/actions/runs/2835914632
However, when I run these same tests locally (npx playwright test), there are no errors.
Any ideas what might be happening?
Thanks
Issue Analytics
- State:
- Created a year ago
- Comments:17 (6 by maintainers)
Top Results From Across the Web
[BUG] waitForEvent 'page' seems to be unstable #5948 - GitHub
Context : I'm trying to get the new window tab when run automation by ... ('page') run normally in local, it just has...
Read more >[Handling new pages] getting Context closed error when trying ...
await context.waitForEvent("page"), // this is where I get the context closed error await page.locator('#submit').click(); ]);
Read more >[Question] waitForEvent why not working headless mode
From a frame opening a new page working always with headed mode, but never with headless mode. const frame = page.
Read more >Got timeout in context.waitForEvent("page"), in POM Playwright.
Hi, I got timeout in context.waitForEvent("page"), in POM Playwright. The new page was loaded but test stop, like waiting for something, ...
Read more >[BUG] page.waitForEvent('dialog') is not working #4737 - GitHub
Context : Playwright Version: 1.6 Operating System: windows Node.js version: 15.x Browser: chromium Code Snippet const [dialog] = await ...
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

Hey guys. I stumbled upon this thread trying to solve the same issue. The thread didn’t solve it for me, but it pointed me in the right direction. Here is my solution to the problem. Now my tests run fine in mac and CI (linux).
@nico-olivares Good point, will edit for future readers