-
Notifications
You must be signed in to change notification settings - Fork 9k
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
TypeError: Cannot read property 'call' of null #4197
Comments
(Edit: forgot to mention I work with @weworkwithzoh, though that may have been implied :-)) Adding some more context: the flow in question is a well-known 3rd party login provider, that is supposed to close the popup and redirect the originating window. We're using the normal
Chromium flags as generated by Puppeteer (redacted):
Hope this adds some context, we'd be more than happy to produce more logs, run experiments, basically anything short of sharing the codebase :-) |
Another info byte: apparently these flows run locally just fine (with Puppeteer 1.13.0 as well) in |
Welp, this appears to have been resolved by 1.14.0... Guess we can close this. |
it's still happening for me and 1.14 |
Jeremy, are you hitting this with a redirect/early termination like we were. or something else? |
My tests start failing today with the exact same errors (early termination). I'm using puppeteer with browserless
|
In that case, I'll go ahead and reopen this issue so we can get more visibility into it. |
@jeremymarc can you reproduce the failure reliably? If you can, a log of protocol messages (puppeteer ran with |
also experiencing this (1.13) EDIT: Just upgraded to version 1.14 - Error still the same |
Hey, i believe that i'm seeing that error too.
It's occuring randomly and for me at least it's seems unrelated to any action in particular in fact it's happening before any of my calls for page.goto. @aslushnikov I did manage to log an instance where it happened here : https://gist.github.com/xse/029eda0c2204799313b1b1a5c6d35249 (line 276) I still cannot reliably reproduce it i just know that if i keep killing and relaunching my application it'll come out at some point. (screenshot) EDIT: i can push the actual code if you guys need a way to reproduce it, however be aware that it's really random like i can launch that thing 100x without getting any errors and two days later i might get 5 in a row. |
I can confirm it's happening randomly as well inside of browserless. Randomly seeing it on 1.13.0, haven't tried 1.14.0 yet. For me, it happens when listening to Here's a dump of protocol messages:
EDITED: Smaller example |
Yep, can confirm we're still seeing it intermittently on 1.14. |
Seems like a potential race condition. I'm mucking with newly created pages, but since this callback isn't blocking then downstream consumers of a |
Looking at the logs it appears that My current case is where two instances of puppeteer are talking with the same browser. |
Can be reliably reproduced by the following:
Kind of an edgecase here where there's two debuggers connected to the same browser. But I'm not certain that's entirely rare... |
Think I have a fix here: #4269 |
hi @joelgriffith, just tried your pull request myself however it doesnt look like that has fixed anything for me. still seeing
|
In case of multiple sessions to the same target, there's a race between sessions to create a secondary isolated world. As a result, we might end up having 2 execution contexts created for the needs of the secondary isolated world. This patch starts handling this race gracefully: instead of crashing, we can use either of the execution contexts and ignore the rest. Notably, the same race condition might happen if page reloads itself in-between the calls to `page.addEvaluateOnNewDocument` and `page.createIsolatedWorld`. Fixes puppeteer#4197.
In case of multiple sessions to the same target, there's a race between sessions to create a secondary isolated world. As a result, we might end up having 2 execution contexts created for the needs of the secondary isolated world. This patch starts handling this race gracefully: instead of crashing, we can use either of the execution contexts and ignore the rest. Notably, the same race condition might happen if page reloads itself in-between the calls to `page.addEvaluateOnNewDocument` and `page.createIsolatedWorld`. Fixes #4197.
This gets tricky since I can't really provide you the best steps to reproduce.
We have a flow that opens in a popup. Once you click the final "Done" button, it dismisses the popup. In the latest versions of Puppeteer (1.12.0+) this seems to also close the page that opened the popup (This should not be happening. This page should redirect.)
This issue does NOT occur on Puppeteer 1.10.0. (I suspect the issue may actually lie in Chromium, but figured I'd start here.)
Tell us about your environment:
What steps will reproduce the problem?
I can't really provide a code snippet, but essentially we perform a
page.click(doneButton);
, the click is successful, then after a second or two both the popup, and the original page are torn down (the entire browser, actually) and this error is thrown:I'm aware this is probably not enough to go on, so if there are additional logs that I can grab (and you can provide me with instructions on how to grab them) I'd be happy to provide some more logging.
What is the expected result?
Original page should remain and redirect.
What happens instead?
Original page is destroyed and the entire browser instance is closed.
The text was updated successfully, but these errors were encountered: