apify-sdk-js icon indicating copy to clipboard operation
apify-sdk-js copied to clipboard

Double initialization of `DevToolsServer` leads to error in `web-scraper`

Open barjin opened this issue 3 weeks ago • 0 comments

The preLaunchHook in Web Scraper initializes DevToolsServer:

https://github.com/apify/apify-sdk-js/blob/48e4c51241b45ca1e526e0ad45edef2127616650/packages/actor-scraper/web-scraper/src/internals/crawler_setup.ts#L318-L326

In case the page / browser crash (see highlighted section in the screenshot below), the dev tools server doesn't exit correctly and all subsequent initialization attempts will fail with port error.

Image

barjin avatar Dec 12 '25 13:12 barjin