CheshireCaat / puppeteer-with-fingerprints

Anonymous automation via puppeteer with fingerprint replacement technology.
MIT License
298 stars 36 forks source link

Puppeteer with fingerprint failed to start #3

Closed push-common closed 1 year ago

push-common commented 1 year ago

Hi i tried to use puppeteer with fingerprint but after run it throws those errors ->

C:\Users\???\WebstormProjects\pup\node_modules\bas-remote-node\src\services\socket.js:55
          reject(new Error('Cannot connect to the WebSocket server'));
                 ^

Error: Cannot connect to the WebSocket server
    at C:\Users\???\WebstormProjects\pup\node_modules\bas-remote-node\src\services\socket.js:55:18
    at Timeout._onTimeout (C:\Users\???\WebstormProjects\pup\node_modules\chnl\dist\channel.cjs.js:2:4848)
    at listOnTimeout (node:internal/timers:568:17)
    at process.processTimers (node:internal/timers:511:7)

here is my code ->

const { plugin } = require('puppeteer-with-fingerprints');
(async () => {
  const fingerprint = await plugin.fetch('', {
    tags: ['Microsoft Windows', 'Chrome'],
  });
  plugin.useFingerprint(fingerprint);
  const browser = await plugin.launch();
  const page = await browser.newPage();
  await page.goto('https://www.google.com', { waitUntil: 'networkidle0' });
  await browser.close();
})();

but simple Puppeteer works perfectly with that code ->

const puppeteer = require('puppeteer');
(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto('https://www.google.com', { waitUntil: 'networkidle0' });
  await browser.close();
})();

what shoud i do to fix it ? Thank you.

sergerdn commented 1 year ago

Have you taken a look at the other issue on this repository: https://github.com/CheshireCaat/puppeteer-with-fingerprints/issues/2 ?