Xetera / ghost-cursor

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

Falling back to JS scroll method TypeError: page._client.send is not a function #61

Closed robinmordasiewicz closed 2 years ago

robinmordasiewicz commented 2 years ago

Running Puppeteer inside a docker container, under Docker I have no problems, but running under Kubernetes I see this debug output. There is no error, just debug output and the script does finish.

Falling back to JS scroll method TypeError: page._client.send is not a function at Object. (/home/ubuntu/nginx/node_modules/ghost-cursor/lib/spoof.js:426:53) at step (/home/ubuntu/nginx/node_modules/ghost-cursor/lib/spoof.js:44:23) at Object.next (/home/ubuntu/nginx/node_modules/ghost-cursor/lib/spoof.js:25:53) at /home/ubuntu/nginx/node_modules/ghost-cursor/lib/spoof.js:19:71 at new Promise () at __awaiter (/home/ubuntu/nginx/node_modules/ghost-cursor/lib/spoof.js:15:12) at Object.move (/home/ubuntu/nginx/node_modules/ghost-cursor/lib/spoof.js:380:20) at Object. (/home/ubuntu/nginx/node_modules/ghost-cursor/lib/spoof.js:338:48) at step (/home/ubuntu/nginx/node_modules/ghost-cursor/lib/spoof.js:44:23) at Object.next (/home/ubuntu/nginx/node_modules/ghost-cursor/lib/spoof.js:25:53) Quads not found, trying regular boundingBox

------------------- puppeteer script const { createCursor } = require("ghost-cursor");

    const targetPage = page;
    const cursor = createCursor(targetPage);
    const promises = [];
    promises.push(targetPage.waitForNavigation());
    const element = await waitForSelectors([["aria/Sign in with Azure #new-zocial-azure-oidc > span"]], targetPage, { visible: true });
    await scrollIntoViewIfNeeded(element, timeout);
    await cursor.click(element);
    await Promise.all(promises);
Niek commented 2 years ago

I don't think this is related to ghost-cursor, your k8s cluster likely is blocked on the page because of the datacenter IP.

robinmordasiewicz commented 2 years ago

The script completes, is able to access the goto-URL and I am able to record the full output. It seems to be a debug warning, but it does not error out.

DaBossCoda commented 1 year ago

I'm having the same problem.