Skip to content

Common stealth issues

berstend̡̲̫̹̠̖͚͓̔̄̓̐̄͛̀͘ edited this page Nov 28, 2019 · 4 revisions

Viewport: Inner and outer width/height inconsistency

Problem:

If you you modify the viewport (e.g. page.setViewport({ width: 1920, height: 1080 })) you need to launch puppeteer with defaultViewport: null.

Example:

const browser = await puppeteer.launch({ defaultViewport: null })

Reason:

Puppeteer emulates viewport by default, so window resizing doesn't affect viewport.

Also:

I've managed to solve this issue by adding the '--window-size=1920,1080' argument to puppeteer.launch.

Issue: #3688