Puppeteer: History entry to navigate to not found.
The requested browser history entry does not exist.
The requested browser history entry does not exist.
Error message
History entry to navigate to not found.
How this error happens
On a fresh page, there is no earlier history entry. Requesting back navigation has nothing to navigate to.
The snippets use an open Puppeteer page named page.
await page.goBack();
How to fix
Only request history navigation after the page has navigated between documents, or navigate directly to the intended URL.
await page.goto(
"https://example.com"
);
await page.goto(
"about:blank"
);
await page.goBack();
Things to keep in mind
The snippet demonstrates the missing-history condition. Some page implementations return null when no entry exists instead of exposing this internal history error.