Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
Puppeteer - Cannot read property 'executablePath' of undefined

Regardless what i tried , i'm always getting executablePath is undefined. Unfortunately there's not much info on this on google. It would be great anyone could let me know where to dig into deeper to solve this error. revisionInfo is returning undefined.

Error

BrowserFetcher {
  _product: 'chrome',
  _downloadsFolder: '/var/www/node_modules/puppeteer/.local-chromium',
  _downloadHost: 'https://storage.googleapis.com',
  _platform: 'linux' }
TypeError: Cannot read property 'executablePath' of undefined
    at demo1 (/var/www/filename.js:10:36)

Source Code

const puppeteer = require('puppeteer');

const demo1 = async () => {
  try {
    const browserFetcher = puppeteer.createBrowserFetcher();
    console.log(browserFetcher);
    const revisionInfo = await browserFetcher.download('970485');
    const browser = await puppeteer.launch({
      headless: false,
      executablePath: revisionInfo.executablePath,
      args: ['--window-size=1920,1080', '--disable-notifications'],
    });
    const page = await browser.newPage();
    await page.setViewport({
      width: 1080,
      height: 1080,
    });
    await page.goto('https://example.com', {
      waitUntil: 'networkidle0',
    });

    await page.close();
    await browser.close();
  } catch (e) {
    console.error(e);
  }
};

demo1();
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Based on your error message, the problem is with this line

      executablePath: revisionInfo.executablePath,

where revisionInfo is undefined, meaning this does not give you the data you want:

    const revisionInfo = await browserFetcher.download('970485');

If you really need a specific executablePath, you need to make sure that revisionInfo gets the value you want.

Otherwise, you can just remove the line executablePath: revisionInfo.executablePath, and let puppeteer use its default chromium browser.

about 4 years ago · Juan Pablo Isaza Report

0

Look into two things

  1. If you did a apt install chromium-browser , remove that
  2. Try run and install using a x86 server instead of ARM based Server (t4g instance by aws)

Either one of those solved my issue. The code was still the same.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!