waitForNavigation Error: Execution context was destroyed, most likely because of a navigation.
See original GitHub issueI have the following test:
it("Should not have to open Knhb when logging in again whilst still being logged in in SSO", async () => {
await page.goto("http://localhost:3000");
await expect(await page.evaluate(() => {
localStorage.clear();
return localStorage.getItem("id_token");
})).toBe(null);
await Promise.all([
page.waitForNavigation(),
page.goto("http://localhost:3000/matches")
]);
await expect(await page.title()).toBe("Digitaal Wedstrijd Formulier");
});
It opens a page which redirects a few times, after all the redirects are done it should continue. Instead of waiting it throws the following error:
Error: Execution context was destroyed, most likely because of a navigation.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Execution context was destroyed, most likely because of a ...
goto, then I get a "Execution context was destroyed, most likely because of a navigation" error. If I add. currentPage.waitForNavigation({ ...
Read more >Puppeteer Execution context was destroyed, most likely ...
Problem. The error means that you are accessing data which has become obsolete/invalid because of navigation. In your script the error ...
Read more >Puppeteer: "Execution context was destroyed, most likely ...
To fix the “execution context was destroyed, most likely because of a navigation” error, use the page.waitForNavigation() function: const ...
Read more >playwright._impl._api_types.error: execution context was ...
To fix the “execution context was destroyed, most likely because of a navigation” error, use the page.waitForNavigation () function: The page.waitForNavigation ...
Read more >Puppeteer – Execution context was destroyed, most likely ...
Puppeteer – Execution context was destroyed, most likely because of a navigation – Daily IT Help.
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
@stoplion please file a separate issue with details so that we can repro this. I’ll close this since it’s not actionable.
@best-coupon-codes please do, but make sure to include a good reproduction script so that we can reproduce it locally. Otherwise it would not be actionable.