Skip to content

[Bug]: Puppeteer freezes if a bfcache eligible page is loaded using a page.goBack() function #8182

@giacomozecchini

Description

@giacomozecchini

Bug description

Steps to reproduce the problem:

When visiting a first_url and then moving to a second_url, then if the first_url is bfcache eligible, the page doesn't fire any PuppeteerLifeCycleEvent events, and Puppeteer freezes

await page.goto(first_url, {waitUntil: 'networkidle2'});
await page.goto(second_url, {waitUntil: 'networkidle2'});
await page.goBack({waitUntil: 'networkidle2'})

If first_url is bfcache eligible and you use a timeout in the page.goBack function, a TimeoutError is fired instantaneously.

Pages to test:
https://developer.google.com
https://www.google.com
https://en.wikipedia.org/wiki/Cat
https://en.wikipedia.org/wiki/Zombie

Puppeteer version

13.5.2

Node.js version

17.8.0

npm version

8.5.5

What operating system are you seeing the problem on?

macOS

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions