You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asyncfunctiongetEventListeners(selector,page){try{if(!client){client=awaitpage.target().createCDPSession();}const{result}=awaitclient.send('Runtime.evaluate',{expression:`document.querySelector("${selector}")`,objectGroup:'handler'});const{listeners}=awaitclient.send('DOMDebugger.getEventListeners',{objectId:result.objectId});awaitclient.send('Runtime.releaseObjectGroup',{objectGroup:'handler'});returnlisteners.map(listener=>listener.type);}catch(err){logger.error("Error occurred in getEventListeners "+err);return[];}}
Error string
Protocol error (DOMDebugger.getEventListeners): Invalid parameters Failed to deserialize params.objectId - BINDINGS: mandatory field missing at position 8
Bug behavior
Flaky
PDF
Background
I am trying to call this function on multiple elements in a document. And it starts throwing error sometimes.
Expectation
Please help me with this error, how can we fix it.?
Reality
It works most of the time, but only fails on few web pages.
Puppeteer configuration file (if used)
No response
Puppeteer version
19.7.0
Node version
16.20.1
Package manager
npm
Package manager version
8.11.0
Operating system
Windows
The text was updated successfully, but these errors were encountered:
This issue has an unsupported Node.js version: 16.20.1. Only versions satisfying >=18 are supported. Please verify the issue on a supported version of Node.js and update the form.
Minimal, reproducible example
Error string
Protocol error (DOMDebugger.getEventListeners): Invalid parameters Failed to deserialize params.objectId - BINDINGS: mandatory field missing at position 8
Bug behavior
Background
I am trying to call this function on multiple elements in a document. And it starts throwing error sometimes.
Expectation
Please help me with this error, how can we fix it.?
Reality
It works most of the time, but only fails on few web pages.
Puppeteer configuration file (if used)
No response
Puppeteer version
19.7.0
Node version
16.20.1
Package manager
npm
Package manager version
8.11.0
Operating system
Windows
The text was updated successfully, but these errors were encountered: