Document ready state and image onload may precede actual image load |
||||||
Issue descriptionThis bug gives details on how to reproduce the situation involved: https://github.com/jugglinmike/chrome-screenshot-race/issues/1
,
Apr 5 2017
In particular, it's really important for web-platform-test ref tests that webdriver can reliably take a screenshot including loaded images. But this presumably also affects anyone else using WebDriver to do image-based testing of their website, so we don't want to rely on the WPT-specific workaround indefinitely. If the right fix is to add some synchronization logic of some sort to ChromeDriver, we can always do that. Chris mentions that there's a related bug that may have the same underlying issue, and that he's doing a bisect for that. Chris, can you link to the related bug please? Thanks for digging into this!
,
Apr 5 2017
The related bug is not in Chromium. I'll forward it to you offline.
,
Apr 6 2017
Rick, could you find someone to perform a manual bisect using tools/bisect-builds.py and ChromeDriver? The current instructions at https://github.com/jugglinmike/chrome-screenshot-race/ worked for me to set things up and reproduce.
,
Jul 3 2017
,
Jul 19 2017
I have this issue when taking captures in chrome 58 in electron. I update the DOM and tried taking a screenshot after a mutation observer fires. However the screenshot does not always contain the update DOM. As suggested in this thread: https://github.com/jugglinmike/chrome-screenshot-race/issues/1#issuecomment-291667054 We tried adding 2 requestAnimationFrame after the DOM mutation event fires as a fix. This works as a fix in most cases, however under high CPU load the issue is still prevalent. We use this method to take captures of POS receipts that we then print on a thermal printer, and this issue causes the previous receipt painted to be printed instead of the current one. It occurs for our customers when they run virus scans that increase the CPU load in the background. Just writing this so that you know that this issue is not only affecting QA/testing purposes.
,
Jul 20 2017
I thought this issue was fixed, maybe. https://bugs.chromium.org/p/chromium/issues/detail?id=382170 That would be in M-60 and will not be merged back. So going to Stable soon.
,
Jul 20 2017
Ok thanks. Do not have access to that bug report, but will keep an eye out for the next release then!
,
Jul 24 2017
@schenney: what commit did you think fixed this?
,
Jul 24 2017
I thought the fixes for the issue in crbug.com/382170 addressed all image loading event timing issues. I may well be wrong, however.
,
Sep 28 2017
I took a quick look at this without luck a few months ago. I am going to take another look when I get a chance and see if it's still reproducible.
,
Dec 6 2017
rbyers@, any update on this? (It came up as a 60 day P2.)
,
Feb 13 2018
,
Feb 14 2018
How are we supposed to reliably take actual screenshots of an android web view or electron window without this bug fixed? Even without images on the page (meaning only HTML), you're sometimes screenshotting a previous state. The same issue exists when using the screenshot APIs in electron and android. Both the deprecated PictureListener, capturePicture and the "recommended" onDraw method has the same flaw. https://developer.android.com/reference/android/webkit/WebView.html#capturePicture() |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by schenney@chromium.org
, Apr 5 2017