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

"Failed to load images" for Android Chrome results #4185

Open
wangxianzhu opened this issue Jan 2, 2025 · 5 comments
Open

"Failed to load images" for Android Chrome results #4185

wangxianzhu opened this issue Jan 2, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@wangxianzhu
Copy link

Example

Permalink to an example reftest:
https://wpt.fyi/results/css/css-transforms/2d-rotate-001.html?run_id=5165372401778688&run_id=5189990978158592

Link to the reftest analyzer:
https://wpt.fyi/analyzer?screenshot=sha1%3Ae2a9949841092970ba6df81d17e309892ec5d383&screenshot=sha1%3A3b5e44231f8dd829ec6571bf679349c49307bc85

Description

Failed to load images.

@KyleJu KyleJu added the bug Something isn't working label Jan 2, 2025
@jcscottiii
Copy link
Collaborator

Notes while debugging this:

For the before picture, it expects a screenshot at https://storage.googleapis.com/wptd-screenshots/sha1:e2a9949841092970ba6df81d17e309892ec5d383.png
image

For the after picture, it expects a screenshot at https://storage.googleapis.com/wptd-screenshots/sha1:3b5e44231f8dd829ec6571bf679349c49307bc85.png
image

Both of those do not exist. Verified that they indeed do not exist in GCP too:

image

image

Next step: See where the upload happens for the bucket

@jcscottiii
Copy link
Collaborator

Uploading of the screenshots is handled by this handler at the /api/screenshots/upload route

shared.AddRoute("/api/screenshots/upload", "api-screenshots-upload", uploadScreenshotHandler)

It's a private endpoint. And it used by the results-processor

config.project_baseurl() + '/api/screenshots/upload')

Each screenshot is uploaded during the results processor:

# ==== Beginning of tasks ====
# Tasks are supposed to be independent; exceptions are ignored (but logged).
# Each task is a function that takes a Processor.
def _upload_screenshots(processor: Processor) -> None:
for screenshot in processor.screenshots:
with WPTScreenshot(screenshot, processor.report.run_info,
auth=processor.auth) as s:
s.process()

Which happens in process report:

with Processor() as p:
p.update_status(run_id, 'WPTFYI_PROCESSING', None, callback_url)
if archives:
_log.info("Downloading %d archives", len(archives))
else:
_log.info("Downloading %d results & %d screenshots",
len(results), len(screenshots))
p.download(results, screenshots, archives)
if len(p.results) == 0:
_log.error("No results successfully downloaded")
p.update_status(run_id, 'EMPTY', None, callback_url)
return ''

@jcscottiii
Copy link
Collaborator

Not sure if it's related. When I look at the logs for the failed 2d-rotate-001.html test, I see a normal failure message. But in the test below, I see a message around failing to take a screenshot. Not sure if the test runner hides that exception if the test fails.

image

Next steps: We need to look at the archives / uploaded reports

@jcscottiii
Copy link
Collaborator

Comparing the processor logs

For the Chrome Android run id=5068299723603968
image (link to logs)

For Firefox Android run id=5100626969362432
image (link to logs)

You'll see that the results received by the results processor are missing screenshots for Chrome Android

@jcscottiii
Copy link
Collaborator

I wonder if it's because Chromium CI tests are not run with --log-wptscreenshot. https://github.com/web-platform-tests/wpt/blob/38c248da8df5530cb270138878987e08cee8d725/docs/running-tests/from-local-system.md?plain=1#L200 ( at least I didn't find anything at first glance in chromium code search).

@WeizhongX Thoughts on this?


On another note, I did find out that a chromium developer can see the diffs locally. Example:
image

@wangxianzhu I will add a comment on the issue to unblock you so you can take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants