Git Product home page Git Product logo

browser-with-fingerprints's Introduction

Anurag's GitHub stats

browser-with-fingerprints's People

Contributors

cheshirecaat avatar sergerdn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

browser-with-fingerprints's Issues

Issues running multiple instances

When trying to launch multiple instances (nodejs files) I get

Error: Lock is not acquired/owned by you at C:\Users\username\Desktop\foldername\node_modules\proper-lockfile\lib\lockfile.js:285:43 at LOOP (node:fs:2701:14) at process.processTicksAndRejections (node:internal/process/task_queues:77:11) { code: 'ENOTACQUIRED' }

any idea why?

error: listen EADDRINUSE: address already in use 127.0.0.1:29815

It occurs when:

  • I have one or more running BAS instances on the same machine.
  • I execute multiple scripts on the same machine at the same time.
  • I execute multiple tests on the same machine at the same time.

I believe that the port is hardcoded in this line of code:

Is there any way to select a random port for each start to avoid these errors?

Note that I have used https://github.com/CheshireCaat/selenium-with-fingerprints.

read ECONNRESET

image
An error occurs when working with a proxy, previously everything worked fine, literally, 2 days ago problems with the connection started, I tried the proxy on a naked playwright, everything works fine

C# is not supported.

Извиняюсь, если я должен был задать этот вопрос в другом месте.

Я очень люблю эту библиотеку, но мне также очень нравится многофункциональная среда, такая как общий языковой среды выполнения (CLR) и C#.

Меня интересует, возможно ли мне портировать следующие библиотеки на C#:
browser-with-fingerprints
playwright-with-fingerprints

Или это невозможно из-за необходимости портировать дополнительный код?

Буду признателен за вашу помощь и ответ на этот вопрос.

Can't use setWorkingFolder along with userDataDir on multiple instances

The code executes just fine when launching the first instance, the error seems to occur with subsequent instances, and also does not happen 100% of the time but appears to occur in the majority of cases. When I comment out the setWorkingFolder line or the userDataDir one, the code executes without this error.

Error: Failed to launch the browser process!

TROUBLESHOOTING: https://pptr.dev/troubleshooting

    at Interface.onClose (C:\Users\Administrator\Desktop\test-bot\node_modules\@puppeteer\browsers\lib\cjs\launch.js:262:24)
    at Interface.emit (node:events:525:35)
    at Interface.close (node:internal/readline/interface:533:10)
    at Socket.onend (node:internal/readline/interface:259:10)
    at Socket.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
import path from 'path';
import PQueue from 'p-queue';
import { plugin } from 'puppeteer-with-fingerprints';

const queue = new PQueue({ concurrency: 5 });
const launchQueue = new PQueue({ concurrency: 1 });

async function launchPuppeteer(instanceId) {
  plugin.setWorkingFolder(`./engines/instance_${instanceId}`);

  const fingerprint = await plugin.fetch('', {
    tags: ['Microsoft Windows', 'Chrome'],
  });

  plugin.useFingerprint(fingerprint);

  const browser = await plugin.launch({
    headless: false,
    userDataDir: path.resolve(`./sessions/${instanceId}`),
  });

  const page = await browser.newPage();

  return { browser, page };
}

(async () => {
  const instancesIds = ['1', '2', '3', '4', '5'];

  instancesIds.forEach((instancesId) => {
    queue.add(async () => {
      const { browser, page } = await launchQueue.add(() => launchPuppeteer(instancesId));

      await page.goto('https://browserleaks.com/');

      await new Promise((resolve) => browser.on('disconnected', resolve));
    });
  });
})();

Override width and height

I was searching for a way to override width and height, I know that it's a way to improve fingerpriting but I really need to override that

Error: Unable to start engine process (code: 3221225781)

\node_modules\bas-remote-node\src\services\engine.js:114
throw new Error(Unable to start engine process (code: ${error.code})\n${INVALID_ENGINE_ERROR});
^

Error: Unable to start engine process (code: 3221225781)
This could be due to the fact that the engine was not downloaded or unpacked correctly.
Try completely deleting the engine folder and restarting the code until it completes.
If this does not help, open an issue with a detailed description of the problem.

Occasionally stuck in mutex.create(`BASProcess${pid}`);

Script runs few browsers in parallel. Script occasionally stucks forever in synchronous call mutex.create(BASProcess${pid}); I am sure about this point because of added debug message right before and after. It looks like deadlock with mutex. It usually happens after an hours of running. I suspect that issue won't be investigated in any close future due missing code to reproduce issue. So I wonder

  • Is there any graceful workaround here?
  • May be it is possible to rewrite mutex.create() into async code or add timeout?
  • Is there mutex source code?
  • Can mutex.node be replaced with another library?

Update:
Looks that mutex is created and locked but seemed never released until script is stopped. Windows re-uses same process IDs. And long running script(s) will stuck trying to acquire mutex with re-used PID sooner or later. Multiple scripts affect each other also even if they use different workingFolders/instances because use same mutex namespace.
So proper solution should be to release mutex.

Why browser is zoomed x2?

All window seems zoomed 2 times (not a website, the browser too).
The console says "Unable to set correct viewport size." not sure if its related because not only website is zoomed.

browser takes forever to launch!

Hey,
Any idea on how I can make a browser to launch faster? it takes about 40 seconds

fingerprint = await readFile(./fingerprints/${await getRandomFileNameFromFolder('./fingerprints')}, 'utf8')
await plugin.useFingerprint(fingerprint);
await plugin.useProxy(${ip}:${port}@${username}:${password}, {
detectExternalIP: true,
changeGeolocation: true,
changeBrowserLanguage: true,
changeTimezone: true,
changeWebRTC: true,
});
console.log('Proxy Loaded')
browser = await plugin.launch({
headless: true,
args: [--profile-directory=${chromeProfile}],
userDataDir: path.join(process.env.LOCALAPPDATA, 'Google', 'Chrome', User Data${instanceNumber})
});

[Suggestion] Use options as alternative to FINGERPRINT_CWD

For now, we have to use cluster or worker_threads to use multiple browser with different FINGERPRINT_CWD.
I think, that it will be easiest to use some argument to control the workingDir so we will be able to use multiple browsers with different FINGERPRINT_CWD in one NodeJS script so the RAM usage will be less.
I don't know if this is possible but I initially checked and there should be no problems.
Of course, FINGERPRINT_CWD may still be supported.

docs: Technical details about plugin's behavior during first and subsequent launches

Can you please update the documentation for browser-with-fingerprints to include more information on how the plugin works during the first launch and subsequent launches?

It would be great if you could add a new section called "Technical Details" after the Architecture section that explains the following:

  • During the first launch of browser-with-fingerprints, the plugin will download the necessary dependencies to the FINGERPRINT_CWD folder via the independent bas-remote-node project.
  • The dependencies that are downloaded during the first launch include browser, scripts, and some other files that are needed for the plugin to function properly.
  • The specific dependencies that are downloaded may vary depending on the version of browser-with-fingerprints that is being used, as well as the specific browser being used to run your script.
  • Subsequent launches of the plugin will not download any additional dependencies unless the remote script FingerprintPlugin has been updated. In this case, the plugin will download and update its dependencies as needed.
  • It is important to note that the FINGERPRINT_CWD folder should not be deleted between script runs, as this could result in the need to redownload dependencies and slow down execution time.
  • Each of your scripts should run with a different FINGERPRINT_CWD folder because each copy of your script can update dependencies at the same time and it may break the functionality of your script.

Of course, I provided just an example because I do not completely understand how it works. It would be great if you could provide more detailed information on this topic.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.