New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Error: New navigation request was received #8811
Comments
@shtse8 could you please provide a minimal script to reproduce? Thanks! |
It typed the keywords, and redirected after pressing Enter. |
it's hard to reproduce, may need some time to find a best case. |
@shtse8 the problem why it fails is that event is not expected from the Puppeteer's perspective and it indicates a bug in Chromium or some unexpected scenario that we don't cover yet. Basically, the crash happens when Puppeteer receives two navigation requests instead of a single expected request. Since it all happens asynchronously there is no error handler for that exception. So a repro would be really helpful here. |
Understandable. Since the error goes out of scope so it's hard to be covered by the logic, we also need to catch all uncaught exceptions to prevent app crash. Mostly, evaluating something when the target page is being redirected, which I thought the exception should be thrown from the |
There is no repro but it looks like sometimes the backend reports two navigation requests. This PR changes the logic to allow that instead of failing as it seems that failing is a bigger issue than handling multiple navigation requests. Closes #8811
There is no repro but it looks like sometimes the backend reports two navigation requests. This PR changes the logic to allow that instead of failing as it seems that failing is a bigger issue than handling multiple navigation requests. Closes #8811
Bug description
I can't catch this error and crash my application
puppeteer/src/common/LifecycleWatcher.ts
Line 183 in 2a0eefb
I am awaiting
goBack
while the page is trying to redirect through js with some delay. this error was thrown and crash my application even the catch is wrapped the whole function.example url: https://healow.com/apps/healow/download.jsp
goback
action executes before it redirectsPuppeteer version
puppeteer@16.1.1
Node.js version
18.7
npm version
18.7
What operating system are you seeing the problem on?
Windows
Relevant log output
No response
The text was updated successfully, but these errors were encountered: