Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

134
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda