0

I am trying to open Chromium with extensions, but I cannot figure out how to do this. When chromium opens there are no extensions installed.

I tried to open with '--enable-remote-extensions', --load-extension=`, I tried to drag and drop the .crx into chromium extensions panel, but nothing worked.

I've got "An error has occurred Installation is not enabled" and "Package is invalid: 'CRX_REQUIRED_PROOF_MISSING'

Could you help me with a working example ? Thanks!

ABC
  • 537
  • 6
  • 17
  • Does this answer your question? [chrome extension says CRX\_REQUIRED\_PROOF\_MISSING while installing](https://stackoverflow.com/questions/57425449/chrome-extension-says-crx-required-proof-missing-while-installing) – Asesh Feb 19 '21 at 13:18

1 Answers1

0

After lots of trial and error, I've solved this issue.

Below is the working code and I hope it will help someone else.

const puppeteer = require('puppeteer');
const extentionPath = "C:\\Users\\<YOUR_USERNAME>\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 1\\Extensions\\<LONG_STRING_EXTENTION_ID>\\<EXTENTION_VERSION>"


(async () => {
    const customArgs = [
        `--start-maximized`,
        `--load-extension=${extentionPath}`
    ];
    const browser = await puppeteer.launch({
        defaultViewport: null,
        headless: false,
        ignoreDefaultArgs: ["--disable-extensions", "--enable-automation"],
        args: customArgs,
    });
    const page = await browser.newPage();
    await page.goto(`https://google.com/`);
    await page.waitForNavigation();
    await page.close();
    await browser.close();
})();

ABC
  • 537
  • 6
  • 17