apify / browser-pool

A Node.js library to easily manage and rotate a pool of web browsers, using any of the popular browser automation libraries like Puppeteer, Playwright, or SecretAgent.
87 stars 14 forks source link

Randomly unfocused tab makes interaction halt #45

Open pocesar opened 3 years ago

pocesar commented 3 years ago

Sometimes the browser tab (using Chrome) will be in the background, and it seems that it's being throttled. This is a known issue with Chromium, but first tab, that is about:blank shouldn't be the one focused. It seems that both page.evaluate and page.on('response') freeze / stop calling the event listener when this happens

Might be a racing condition between loading and focusing the tab

image

mnmkng commented 2 years ago

Puppeteer or Playwright?