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
fix(page): fix race condition in WaitTask #2739
Conversation
This patch eliminates a common race condition with WaitTask, that happens when predicate function gets resolved right before the execution context gets destroyed. This situation results in a "Cannot find context with specified id undefined" exception. Credits go to @jakub300 for his wonderful [investigation](puppeteer#1325 (comment)). Fixes puppeteer#1325.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Hello, I tried to edit |
@7starsone try installing |
Hello, if it helps I'm using this https://github.com/nesk/puphpeteer but the owner banned me from comments because of Cannot find context with specified id undefined 😆 because not about his work and he stated that I didn't provide all the details but I did it, a code example, the logger, the used software versions and so on... and still had some issues with crashing script (not about my php code but the try catch not working and sometimes even if the URLs are from the same website and the page structure is the same...) like this, then "... Thank you very much |
@7starsone Looks like you have multiple issues going on.
These all have nothing to do with "Cannot find context with specified id", which usually happens because page navigates away while you're trying to If you have a puppeteer script that reproduces the problem with current puppeteer tip-of-tree and which I can run locally, please file a bug and we'll try to see what's going on. |
@aslushnikov "error in javascript code" what javascript code? Something in the project from puppeteer or that one coming from the page content when goto URL? p.s.: but the funny thing is also that he himself on code comments of that file writes..."... |
Hello, please, can you explain how to change the used port? (on the /lib folder? where?) The problem is that on documentation of nesk/puphpeteer this is not explained and not even here. Unfortunately, p.s.: on CentOS 7 I did |
This patch eliminates a common race condition with WaitTask, that
happens when predicate function gets resolved right before the execution
context gets destroyed.
This situation results in a "Cannot find context with specified id undefined"
exception.
Credits go to @jakub300 for his wonderful investigation.
Fixes #1325.