[BUG] browser._newContextForReuse: Navigation failed because page was closed

See original GitHub issue

Context:

  • Playwright Version: 1.24.0 and above
  • Operating System: Linux and Mac
  • Node.js version: 16
  • Browser: All

Code Snippet

2) [webkit] › components/testComponent/testComponent.test.tsx:17:1 › TestComponent is accessible

Test timeout of 10000ms exceeded while setting up "context".

  Pending operations:
  - browser._newContextForReuse

browser._newContextForReuse: Navigation failed because page was closed!
=========================== logs ===========================
navigating to "about:blank", waiting until "load"
============================================================

Describe the bug There seem to have been introduced a race condition in version 1.24.0. (This bug is not present in version 1.23.4)

When I run a significant amount of component tests (over 100), some of them fail with the above error. It is always a random test. If I run the given test in isolation, it works fine.

I have looked through the commits in the 1.24.0 release, and I think that the issue might have been introduced in this PR https://github.com/microsoft/playwright/pull/15432

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
pavelfeldmancommented, Oct 19, 2022

I confused this issue with another one, I now remember that you shared the repro offline with me.

1reaction
pavelfeldmancommented, Oct 20, 2022

@theisgroenbech pinging you for a hidden module on Slack

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is your opinion of Python's indentation method of ... - Quora
I legit have never ever had a problem with white space in Python. If you read code in other languages where white space...
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