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

123
Vistas
Puppeteer does not evaluate web-app on heroku

I'm using puppeteer on my telegram bot to fetch stuff from the web. Locally, it's all work just fine, but here is the catch:

When trying to fetch the URL's HTML, the given response is not the HTML file, but the web app with all the js files. On my local machine - I'm getting the HTML file with all needed links.

That's my code:

return await puppeteer.launch({
  args: ['--no-sandbox', '--disable-setuid-sandbox'],
  headless: true,
}).then(async browser => {
  const page = await browser.newPage()
  page.setJavaScriptEnabled(true)

  await page.goto(targetUrl)

  await page.waitForTimeout(2000)
  const data = await page.$$eval(SELECTORS, (res) => {
      return res.map(r => {
        return r.getAttribute('ATRR')
      })
    }) as never as string[]

    .......
})

PS -------------- already added this repo to Heroku:

https://github.com/jontewks/puppeteer-heroku-buildpack
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Apparently, when you are using puppeteer-extra, you need to install puppeteer library too.

For some reason, they both depend BUT not auto-installed, so the Chromium engine didn't install on Heroku, and it does explain how it does on my local machine - which has it by default.

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