Running Lighthouse on https://en.wikipedia.org/wiki/Main_Page showed the following warning:
Closer inspection shows that the "size" attribute is actually missing entirely.
https://en.m.wikipedia.org/w/api.php?action=webapp-manifest
{"name":"Wikipedia","orientation":"portrait","dir":"ltr","lang":"en","display":"browser","theme_color":"#252525","background_color":"#FFFFFF","start_url":"/wiki/Main_Page","icons":[{"src":"/static/apple-touch/wikipedia.png"}]}
I ran a quick test by manually stepping through the PHP code that creates this manifest in production and indeed, it does not work. The problem is that the url is expanded to HTTP instead of HTTPS, and (by default) no redirects are followed.
MobileFrontend/ApiWebappManifest actually doesn't expand the url properly in the first place, it uses PROTO_RELATIVE - which is invalid given that we're making a request from PHP (protocol-relative urls only make sense when used in by browsing contexts), there is no relative context for PHP. MWHttpRequest tolerates this error by re-expanding the url a second time using PROTO_HTTP as deterministic fallback.
As such, the request is a "success" but without any body content (it got a HTTP 301 redirect response).
$appleTouchIcon = $wgAppleTouchIcon; // From ApiWebappManifest.php $appleTouchIconUrl = wfExpandUrl( $appleTouchIcon, PROTO_RELATIVE ); $request = MWHttpRequest::factory( $appleTouchIconUrl ); $status = $request->execute(); $appleTouchIconContent = $request->getContent(); return [ $status->isOK(), strlen($appleTouchIconContent) ]; /* array(2) { [0]=> bool(true) [1]=> int(0) } */ // HTTP (same result but explicitly, instead of indirectly via MWHttpRequest) $appleTouchIconUrl = wfExpandUrl( $appleTouchIcon, PROTO_HTTP ); $request = MWHttpRequest::factory( $appleTouchIconUrl ); $status = $request->execute(); $appleTouchIconContent = $request->getContent(); return [ $status->isOK(), strlen($appleTouchIconContent) ]; /* array(2) { [0]=> bool(true) [1]=> int(0) } */ // HTTPS (using PROTO_CANONICAL or PROTO_HTTPS) $appleTouchIconUrl = wfExpandUrl( $appleTouchIcon, PROTO_CANONICAL ); $request = MWHttpRequest::factory( $appleTouchIconUrl ); $status = $request->execute(); $appleTouchIconContent = $request->getContent(); return [ $status->isOK(), strlen($appleTouchIconContent) ]; /* array(2) { [0]=> bool(true) [1]=> int(3248) } */
It was last changed in 676b75aacea for (T153250), but most likely it didn't work prior to this, either.