Page MenuHomePhabricator

Images missing in Android and iOS applications
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • iOS app and/or Android app
  • Users report that the first image in the article is present but subsequent images are missing and only their caption is shown.
  • Reports on wiki and on Discord
  • Was able to reproduce, but not sure if it reproduces consistently

What happens?:
No image is shown

What should have happened instead?:
Image should be shown

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

IMG_7421.PNG (2×1 px, 424 KB)

Event Timeline

Dbrant triaged this task as High priority.Apr 17 2023, 11:03 AM
Dbrant added a project: Content-Transform-Team.

I think the problem is because of inconsistency in the output between the pregenerated content on the restbase level and the JS we serve from PCS.
More specifically for this broken page on PCS:

Here is an example:
The working HTML for a given image is:

<span>
 <a href="./File:Cat_August_2010-4.jpg" class="mw-file-description">
  <img alt="" resource="./File:Cat_August_2010-4.jpg" src="//upload.wikimedia.org/wikipedia/commons/thumb/1/15/Cat_August_2010-4.jpg/181px-Cat_August_2010-4.jpg" decoding="async" data-file-width="3640" data-file-height="2226" data-file-type="bitmap" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/1/15/Cat_August_2010-4.jpg/272px-Cat_August_2010-4.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/1/15/Cat_August_2010-4.jpg/362px-Cat_August_2010-4.jpg 2x" loading="lazy" width="181" height="111">
 </a>
</span>

And the broken state for the same image:

<span>
 <a href="./File:Cat_August_2010-4.jpg" class="mw-file-description">
  <span class="pcs-lazy-load-placeholder pcs-lazy-load-placeholder-pending" style="width: 181px;" data-src="//upload.wikimedia.org/wikipedia/commons/thumb/1/15/Cat_August_2010-4.jpg/181px-Cat_August_2010-4.jpg" data-srcset="//upload.wikimedia.org/wikipedia/commons/thumb/1/15/Cat_August_2010-4.jpg/272px-Cat_August_2010-4.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/1/15/Cat_August_2010-4.jpg/362px-Cat_August_2010-4.jpg 2x" data-width="181" data-height="111" data-alt="" data-data-file-width="3640" data-data-file-height="2226">
   <span style="padding-top: 61.32596685082873%;">
   </span>
  </span>
 </a>
</span>

We deployed mobileapps after reverting this: https://gerrit.wikimedia.org/r/c/mediawiki/services/mobileapps/+/908961
Also forced invalidation of PCS JS on restbase level and purged the meta.wikimedia.org edge endpoint for PCS JS.

The last problem which is unavoidable is the client side caching:

http --headers https://meta.wikimedia.org/api/rest_v1/data/javascript/mobile/pcs
cache-control: public, max-age=86400, s-maxage=86400

I took a look to a few pages that had broken images and now they work fine.

Seddon raised the priority of this task from High to Unbreak Now!.Apr 17 2023, 2:22 PM

Update not to reflect any new issue but to reflect the seriousness

From the environments I have access to reproduce the issue it looks fixed. I am not entirely sure for cases were the problematic JS is cached in the client side were we should wait for it to expire.

The users' reports on this bug can be found in this sheet.

Closing this one since even client side caches should have expired by now.