Search code examples
puppeteerpuppeteer-sharp

How to find or pick a suitable Chrome/Chromium revision number?


I couldn't figure out a nice way to determine a suitable revision number to use with Puppeteer Sharp.

What I did was use the version lookup feature on the "OmahaProxy - Google Chrome" site. I looked-up the version of Chrome I'm running on my computer. [That seems like a reasonable starting point.] I assumed (guessed) that the "Branch Base Position" shown in the version info was a revision number.

I then opened the Chromium continuous builds archive and looked for a build for the revision around the revision number I found from the "OmahaProxy" site.

Is there a better way to find or pick a suitable revision number?


Solution

  • Puppeteer is always bundled with a specific revision of a specific version. I usually check the release information on Github where the expected Chromium version and revision is specified. For example:

    v1.17.0

    Big Changes

    • Chromium 76.0.3803.0 (r662092)

    Then to download the right one,

    1. Go to Chromium browser snapshots

    2. Choose the directory of your platform (e.g., Linux_x64)

    3. Copy the revision number into the "Filter:" field without the "r" (e.g., 662092)

    4. Download the .zip file you need.


    Additional info

    1. The URL template below can be just plugged in with the right information:

      https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=<platform>/<revision>/

      For example: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/662092/

    2. The most common issue on Linux is missing dependencies, and the Puppeteer "Troubleshooting" document specifies all the Linux dependencies. (See apt instructions for Ubuntu.)

    3. curl needs -L when downloading on the console. See Stackoverflow thread.

    4. When one is using puppeteer-core,

      you will then need to call puppeteer.connect(\[options\]) or puppeteer.launch(\[options\]) with an explicit executablePath option.

      (from puppeteer vs puppeteer-core)