CheshireCaat / puppeteer-with-fingerprints

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

[Bug]: syntaxError: .. is not valid JSON | The engine no longer downloads or starts #137

Closed shk100 closed 2 weeks ago

shk100 commented 3 weeks ago

Hello, Since today, on several of my projects, the plugin no longer works and I get a json error message when I try to launch a browser. And I've tried to start from scratch in an empty project with the default test code and the same problem with paid and free versions, I've also tried updating the plugin but no download , and always Json error.

Everything has been working for several weeks and without changing anything I've had this problem since this morning, thank you for your help.

Example code :

const { plugin } = require("puppeteer-with-fingerprints");

plugin.setServiceKey("");

(async () => {
  // Get a fingerprint from the server:
  const fingerprint = await plugin.fetch({
    tags: ["Microsoft Windows", "Chrome"],
  });

  // Apply fingerprint:
  plugin.useFingerprint(fingerprint);

  // Launch the browser instance:
  const browser = await plugin.launch({
    headless: false, // Garde l'interface visible
    args: ["--lang=fr-FR,fr", "--ignore-certificate-errors"], // Ignorer les erreurs de certificat
    timeout: 60000, // Temps d'attente maximal pour le lancement du navigateur
  });

  // The rest of the code is the same as for a standard `puppeteer` library:
  const page = await browser.newPage();
  await page.goto("https://google.com");
})();

Terminal output :

undefined:1
<himl>
syntaxError: Unexpected token '<, "«html> <h"... is not valid JSON
at JSON-parse (<anonymous»)
at IncomingMessage.<anonymous> (C: \xxxx\projet\node _modules \bas-remote-node\src\services\utils.js:15:22)
at IncomingMessage.emit (node:events:531:35)
at endReadableNT (node: internal/streams/readable:1696:12)
at process-processTicksAndRejections (node: internal/process/task_queues:82:21)

System

CheshireCaat commented 3 weeks ago

Hello, there are problems on the server side - you need to update the plugin to the latest version or wait for a solution (today or tomorrow everything should be fixed).

I recommend the first option, since in recent versions the dependence on the server has been significantly reduced.

singhaditya4 commented 3 weeks ago

+1

singhaditya4 commented 3 weeks ago

Hello, there are problems on the server side - you need to update the plugin to the latest version or wait for a solution (today or tomorrow everything should be fixed).

I recommend the first option, since in recent versions the dependence on the server has been significantly reduced.

update doesn't do anything

krais006 commented 3 weeks ago

I have the same error, everything worked yesterday, any solution?

bablosoft commented 3 weeks ago

I have the same error, everything worked yesterday, any solution?

You need to update your npm module

shk100 commented 3 weeks ago

Thanks to the dev for the quick response !!

In the end what worked was:

npm uninstall puppeteer-with-fingerprints

npm i puppeteer-with-fingerprints

krais006 commented 3 weeks ago

Thanks to the dev for the quick response !!

In the end what worked was:

npm uninstall puppeeter-with-fingerprints

npm i puppeeter-with-fingerprints

thanks I did it and I still have the same error ;/

bablosoft commented 3 weeks ago

thanks I did it and I still have the same error ;/

I don't think that it is possible to get same error.

krais006 commented 3 weeks ago

[20:40:34] Fetching Fingerprint... undefined:1

^ SyntaxError: Unexpected token '<', " ) at IncomingMessage. (C:\Users\krais\Desktop\acc\node_modules\bas-remote-node\src\services\utils.js:15:22) at IncomingMessage.emit (node:events:531:35) at endReadableNT (node:internal/streams/readable:1696:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) Node.js v20.17.0 PS C:\Users\krais\Desktop\acc>
bablosoft commented 3 weeks ago

In order to fix it, please update puppeteer-with-fingerprints

krais006 commented 3 weeks ago

I did it, I still have this error

bablosoft commented 3 weeks ago

Okay, you can provide access, I will check it out mail.to.twaego@gmail.com

krais006 commented 3 weeks ago

I managed to fix it, I uninstalled and installed it several times, now it works. Thanks

CheshireCaat commented 3 weeks ago

@OnlineTrackerWhatsApp you can increase timeout using the setRequestTimeout plugin method.

By default it’s 5 minutes, but sometimes engine download speed can be slow, so you need to change timeout (specify it in milliseconds).

silvestrodecaro commented 3 weeks ago

Updating the plugin worked for me, thanks for your work!

dr3adx commented 2 weeks ago

@CheshireCaat @bablosoft will this issue be fixed? its been 2 days now, upgrading to newest version is not a solution since all mobile fingerprints are flagged (>= 127)

CheshireCaat commented 2 weeks ago

@dr3adx how this ticket related to the pixelscan problem? Of course it will be fixed, I will let you know separately.

since all mobile fingerprints are flagged

Not all, I offered you options, even taking into account a small number of fingerprints of the required sizes.

dr3adx commented 2 weeks ago

@CheshireCaat I meant is the JSON error server issue gonna be fixed so we can use older engine versions?

bablosoft commented 2 weeks ago

Please always use latest version, it is much better than older in terms on authenticity.

bablosoft commented 2 weeks ago

Only English

CheshireCaat commented 2 weeks ago

The problem with the servers has been resolved at the moment, the scripts are available again, but I still recommend updating to the latest version so as not to depend on it.