Xetera / ghost-cursor

🖱️ Generate human-like mouse movements with puppeteer or on any 2D plane
MIT License
1.03k stars 120 forks source link

cursor.click("#login") error #91

Closed TonyChen-SH closed 1 year ago

TonyChen-SH commented 1 year ago

env: nodejs v19.0.0 "ghost-cursor": "^1.1.16",
 "puppeteer": "^19.7.1",
 "puppeteer-extra": "^3.3.4",
 "puppeteer-extra-plugin-click-and-wait": "^2.3.2"



C:\Users\test\WebstormProjects\xxxxxx\node_modules\ghost-cursor\lib\math.js:95
 return new (bezier_js_1.Bezier.bind.apply(bezier_js_1.Bezier, __spreadArray(__spreadArray([void 0, start], __read(anchors), false), [finish], false)))();
                                   ^
TypeError: Cannot read properties of undefined (reading 'bind')
    at bezierCurve (C:\Users\test\WebstormProjects\xxxxxx\node_modules\ghost-cursor\lib\math.js:95:36)
    at path (C:\Users\test\WebstormProjects\xxxxxx\node_modules\ghost-cursor\lib\spoof.js:229:40)
    at Object.<anonymous> (C:\Users\test\WebstormProjects\xxxxxx\node_modules\ghost-cursor\lib\spoof.js:506:66)
    at step (C:\Users\test\WebstormProjects\xxxxxx\node_modules\ghost-cursor\lib\spoof.js:44:23)
    at Object.next (C:\Users\test\WebstormProjects\xxxxxx\node_modules\ghost-cursor\lib\spoof.js:25:53)
    at fulfilled (C:\Users\test\WebstormProjects\xxxxxx\node_modules\ghost-cursor\lib\spoof.js:16:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)```
Niek commented 1 year ago

Can you share some sample code? This looks very strange.

Niek commented 1 year ago

I see something broke in bezier-js@6.1.2 that was released 2 days ago. I have pinned the bezier-js dependency to 6.1.0 now and released this as ghost-cursor@1.1.17.

TonyChen-SH commented 1 year ago

I see something broke in bezier-js@6.1.2 that was released 2 days ago. I have pinned the bezier-js dependency to 6.1.0 now and released this as ghost-cursor@1.1.17.

thank u very much.

Niek commented 1 year ago

Reference: https://github.com/Pomax/bezierjs/issues/193

visgotti commented 1 year ago

I'm getting this issue on ghost-cursor@1.1.18 any ideas why?

Niek commented 1 year ago

I'm getting this issue on ghost-cursor@1.1.18 any ideas why?

Check your version of bezier-js, it should be v6.1.3.

visgotti commented 1 year ago

It is, node v14.16.1

visgotti commented 1 year ago

bumping my node version fixed it but I rather not have to change it everywhere