0

I have a piece of code which uses Puppeteer to scrape for some data off google. The problem is that sometimes the code works without any problem but sometimes stops working even when there is virtually no change in the code of the puppeteer script.

Sometimes the code works after restarting VS Code but it seems completely non intuitive for me why a piece of code stops working for some time and again stars working.

The problem is that sometimes I get an error where the the function page.click() raises an error which is as follows:

Node is either not clickable or not an HTML Element although in the headless=false setting I can see the link getting clicked and I can even the see it doing what it should do but for some reason puppeteer thinks there has been some exception and stops the execution of the code.

  • You probably have a race condition. Please share your code to get help. BTW, keep in mind that when debugging by setting headless to false, the way the browser and your site interact may [completely change](https://stackoverflow.com/questions/63818869/why-does-headless-need-to-be-false-for-puppeteer-to-work). – ggorlen Dec 17 '22 at 19:26

0 Answers0