Error: Unable to set correct viewport size.

Support
  • Getting Error: Unable to set correct viewport size. while using puppeteer with fingerprints.

    and idea on why?

  • @debster said in Error: Unable to set correct viewport size.:

    Getting Error: Unable to set correct viewport size. while using puppeteer with fingerprints.

    and idea on why?

    This forum is dedicated to BAS, have you tried asking these questions on the library page in github?

  • Hello we found a way to fix this issue by adding error handling code

    file: node_modules\browser-with-fingerprints\src\plugin\index.js

    `
    async #run(spawn, options = {}) {
    const { proxy, fingerprint } = this.setProxyFromArguments(options.args);

    const { id, pid, pwd, path, bounds } = await setup(proxy, fingerprint);

    await cleaner.run(path).ignore(pid, id);

    mutex.create(BASProcess${pid});

    const browser = await (spawn ? launcher : options.launcher ?? this.launcher).launch({
    ...options,
    headless: false,
    defaultViewport: null,
    executablePath: ${path}/worker.exe,
    args: [--parent-process-id=${pid}, --unique-process-id=${id}, ...defaultArgs(options)],
    });

    try{
    await (spawn ? configure : this.configure.bind(this))(
    (target) => target === browser && cleaner.include(pid, id),
    browser,
    bounds,
    synchronize.bind(null, id, pwd, bounds)
    );
    } catch (error){
    await browser.close();
    throw new Error(BASProcess${pid} ${error});
    }

    return browser;
    }
    `
    this will stop the error from leaving the browser open

    Thank you for this wonderful project

  • 0 Votes
    4 Posts
    874 Views
  • 0 Votes
    1 Posts
    613 Views
  • Fingerprint error: Key not found

    Support
    0 Votes
    2 Posts
    1036 Views
  • I got error getting FINGERPRINT

    Support
    0 Votes
    12 Posts
    2104 Views
  • IP Not Allowed Error

    Support
    0 Votes
    1 Posts
    1194 Views