TypeError: Cannot read property 'call' of null
See original GitHub issueThis 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:
- Puppeteer version: 1.13.0
- Platform / OS version: macOS 10.14.2
- Node.js version: 10.15.0
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:
TypeError: Cannot read property 'call' of null
at DOMWorld._setContext (../../node_modules/puppeteer/lib/DOMWorld.js:61:36)
at FrameManager._onExecutionContextCreated (../../node_modules/puppeteer/lib/FrameManager.js:303:13)
at CDPSession.FrameManager._client.on.event (../../node_modules/puppeteer/lib/FrameManager.js:52:70)
at CDPSession._onMessage (../../node_modules/puppeteer/lib/Connection.js:200:12)
at Connection._onMessage (../../node_modules/puppeteer/lib/Connection.js:112:17)
at WebSocketTransport._ws.addEventListener.event (../../node_modules/puppeteer/lib/WebSocketTransport.js:41:24)
at WebSocket.onMessage (../../node_modules/ws/lib/event-target.js:120:16)
at Receiver.receiverOnMessage (../../node_modules/ws/lib/websocket.js:741:20)
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.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:17 (6 by maintainers)
Top GitHub Comments
My tests start failing today with the exact same errors (early termination). I’m using puppeteer with browserless
it’s still happening for me and 1.14