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

182
Views
I get this error when running my index.js file... throw new Error('Execution context was destroyed, most likely because of a navigation.');

I've provided the code below, can you tell me why I would get this error ? I am trying to web-scrape some information from one website to put on a website I am creating, I already have permission to do so. The information I am trying to web-scrape is the name of the event, the time of the event, the location of the event, and the description of the event... I seen this tutorial on YouTube, but for some reason I get this error running ming.

sync function scrapeProduct(url){
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  page.goto(url);

  const [el] = await page.$x('//*[@id="calendar-events-day"]/ul/li[1]/h3/a');
  const txt = await el.getProperty('textContent')
  const rawTxt = await txt.jsonValue();

  const [el1] = await page.$x('//*[@id="calendar-events-day"]/ul/li[1]/time[1]/span[2]');
  const txt1 = await el1.getProperty('textContent')
  const rawTxt1 = await txt1.jsonValue();

  console.log({rawTxt, rawTxt1});

  browser.close();
}

scrapeProduct('https://events.ucf.edu');
about 4 years ago · Santiago Gelvez
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!