Puppeteer pit under win2008 R2

Time:2019-10-5

Address: Puppeteer pit under Win2008 R2

Do not use the default Windows command handler (CMD.exe)

Use PowerShell or third-party command-line tools to execute Puppeteer, such as git bash that comes with Git.

Perform various errors under cmd, start Chromium page and crash directly…

Running Puppeteer under Win2008 is not only slow but also single-threaded.

Clearly run well under win7, the same code configuration under win2008 runs multi-threaded but single-threaded, and the running speed is relatively slow. Preliminary judgment should be related to the operation of Chromium under win2008. Google found that there are really similar cases. It is estimated that it should be related to the default network security configuration of win2008. The solution is also simple, adding two-line parameters. 。

const browser = await puppeteer.launch({
    args: [
        "--proxy-server='direct://'", 
        '--proxy-bypass-list=*',
    ]
})

Reference resources:
Puppeteer with headless:true is extremely slow