Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: different screenshot quality with and without plugged power source #8009

Closed
Kreeg opened this issue Feb 13, 2022 · 7 comments
Closed
Labels

Comments

@Kreeg
Copy link

Kreeg commented Feb 13, 2022

Bug description

Steps to reproduce the problem:

  1. Plug the power source
  2. Save screenshot
  3. Unplug the power source.
  4. Save screenshot
  5. Consider the difference

I am using Apple M1 Macbook Pro (and Macbook Pro 13" late 2013) and I've tried to run test (we're using screenshot testing) with notebook in my bed and magically they all stopped working. The next day on the same docked notebook they magically became green (tests succeded). Then i've tried to plug/unplug the power source.

First file (plugged) 20.65KB 200x407, 192dpi, RGB with Alpha, Noninterlaced
изображение

Second file (unplugged) 20.64KB 200x407, 192dpi, RGB with Alpha, Noninterlaced
изображение

I consider that result may differ from OS to OS, but I think getting different quality screenshots on the same machine from time to time is 100% inappropriate.

Puppeteer version

13.3.1

Node.js version

16.13.0

npm version

8.3.0

What operating system are you seeing the problem on?

macOS

Relevant log output

No response

@OrKoN
Copy link
Collaborator

OrKoN commented Feb 15, 2022

That's an interesting case. I wonder what happens when you unplug the power source? Does the laptop (or just chrome) switch to some different GPU or CPU rendering? Do you run the browser in the headless or headful mode? Is there any difference if you run with --disable-gpu flag?

@Kreeg
Copy link
Author

Kreeg commented Feb 16, 2022

@OrKoN I used headless mode. I can't tell if laptop switches between GPU and CPU renderer. I'll try with that flag, thank you!

@OrKoN
Copy link
Collaborator

OrKoN commented Feb 18, 2022

Another thought: are there any animations on the page or is it completely static?

@Kreeg
Copy link
Author

Kreeg commented Feb 19, 2022

@OrKoN hello!
I've tried with --disable-gpu mode but the results are the same.
The page is static, there is no animations.

@stale
Copy link

stale bot commented Jun 23, 2022

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale stale bot added the unconfirmed label Jun 23, 2022
@OrKoN
Copy link
Collaborator

OrKoN commented Jun 23, 2022

@Kreeg did you end up using playwright? do you have the same issue with screenshots there? I imagine it should affect all Chromium browsers.

@stale stale bot removed the unconfirmed label Jun 23, 2022
@Kreeg
Copy link
Author

Kreeg commented Jun 23, 2022

@OrKoN yes, we switched to playwright. It was OK until the recent update. Now I need to test different chromium versions, I just need some time. I'm closing this issue, but if you want, you can follow updates on this issue microsoft/playwright#14460 (I'll link new issue there)

@Kreeg Kreeg closed this as completed Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants