Closed firmart closed 2 years ago
Are you using the latest version? We have this fix in place to prevent this issue: https://github.com/Xetera/ghost-cursor/blob/7327dfa3215e6f2a9391af650ff2221c2e4dfe80/src/spoof.ts#L85
If you still experience this on the latest version, please provide a reproducible script.
I have seen this line but didn't update to the latest. Now, updated to the latest version (i.e. from 1.1.8
to 1.1.15
), I got another error:
TypeError: elem.remoteObject is not a function
at Object.<anonymous> (/node_modules/ghost-cursor/lib/spoof.js:458:61)
at step (/node_modules/ghost-cursor/lib/spoof.js:44:23)
at Object.next (/node_modules/ghost-cursor/lib/spoof.js:25:53)
at fulfilled (/node_modules/ghost-cursor/lib/spoof.js:16:58)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
BTW, any reason to access internal field like _client
instead of the aforementioned const client = await page.target().createCDPSession()
?
Can you share the snippet where you get the remoteObject
error @firmart?
The reason we don't use createCDPSession()
is that it opens an additional CDP session instead of using the existing session, i.e. extra overhead.
Closing for now - if you get the remoteObject
error, please open a new issue @firmart
Since puppeteer 13.6.0, the correct way to create a CDP session client is
Related: #61
See