Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 250 Vote(s) - 3.73 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Puppeteer Error: Chromium revision is not downloaded

#11
After couple of hours googling and reading many comments and discussions, trying several approach finally I resolved the problem with this solution.

```
OS: Windows 10
node: 14.16.1
puppeteer: 7.0.1
```
I saw in the `node_modules/puppeteer/` folder and found that there isn't any `.local-chromium` folder so I created this path manually
```
node_modules/puppeteer/.local-chromium/win64-<your_chrome_version>/chrome-win
```
Then I downloaded the chromium browser from [this link][1] (your_chrome_version) and so copied it to the path so that you need to see the chrome.exe in this url
```
node_modules/puppeteer/.local-chromium/win64-<your_chrome_version>/chrome-win/chrome.exe
```

That's it. it worked for me.



[1]:

[To see links please register here]

Reply

#12
On Windows works installing as global

npm i puppeteer --g
Reply

#13
**Here is how I solved it**

```
const browser = await puppeteer.launch({
headless: true,
ignoreDefaultArgs: ['--disable-extensions'], // this made it work for now
});
```

By simply having ``ignoreDefaultArgs: ['--disable-extensions']`` done the trick

**Source:** [Troubleshoot][1]


[1]:

[To see links please register here]

Reply

#14
I just delete the `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD` variable from the Dockerfile and that worked for me
Reply

#15
The 3rd point in [Amr Hussein][1]'s answer helped me to solve a similar Problem where I got the following error, whenever I executed my script outside the project directory:

~~~shell
throw new Error(`Could not find Chromium (rev. ${this.puppeteer.browserRevision})
Error: Could not find Chromium (rev. 1083080).
~~~

I will use that in my last step.

But let's start at the very beginning:

If you install `puppeteer`, Chrome will be automatically downloaded. But it is recommended that you change the default location of Chrome with a Configuration file.

1. Create your project directory where `puppeteer` should be installed
2. Go inside this directory.

If you are `root`, change to the normal user of the system.
3. As recommended in the [documentation][2], create a file named `.puppeteerrc.cjs` and paste in the following code:

~~~js
const {join} = require('path');

/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
// Changes the cache location for Puppeteer.
cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
};
~~~
This will change the default location of Chrome to your project directory.

Now Chrome will be stored inside the project directory in the `.cache` directory.
4. Install `puppeteer`:

Here you can basically hit `enter` until the init is done.
~~~bash
npm init
~~~

~~~bash
npm i puppeteer
~~~
5. On Unix, make sure all the necessary dependencies are installed.

You can find the list on the [Troubleshooting][3] page.
6. Find `Chrome` inside the `.cache` directory of your project directory and figure out the full path.

Add the `executablePath:` of the Chrome executable to your script:
~~~js
const browser = await puppeteer.launch({
executablePath: '/home/drake/my_puppeteer_project/.cache/puppeteer/chrome/linux-1083080/chrome-linux/chrome'
});
~~~


[1]:

[To see links please register here]

[2]:

[To see links please register here]

[3]:

[To see links please register here]

Reply

#16
Use `executablePath()`



import { executablePath } from "puppeteer";


const options: PuppeteerLaunchOptions = {
...
executablePath: executablePath(),
};

await puppeteer.launch(options);

Remove from Dockerfile

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
Reply

#17
None of the other answers worked for me.

It turns out that the Chromium download URL (

[To see links please register here]

) can be blocked if you are sitting on a VPN. If this is the case, the installation script (`node_modules/puppeteer/install.js`) will say that it successfully downloaded to `~/.cache/puppeteer/chrome/<version>` but all it does it create an empty folder.

**The solution for me was to switch to a different location with my VPN.**

Here is the status for this issue in the Puppeteer repository:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through