Page MenuHomePhabricator

Watchstar hidden on unwatched pages - Watch icon from skins.minerva.icons.images.scripts invalid SVG ("PHP Warning: parsing XML declaration")
Closed, ResolvedPublicPRODUCTION ERROR

Description

Spotted in production. Two errors, but they come in pairs so they're clearly the same underlying bug:

Error reading SVG:Error domain 1 code 4 on line 1 column 1 of data: Start tag expected, '<' not found
Warning: parsing XML declaration: '?>' expected in Entity, line: 1 in /srv/mediawiki/php-1.30.0-wmf.16/includes/resourceloader/ResourceLoaderImage.php on line 302

ResourceLoader is making me think we've got a bad SVG that someone checked in somewhere? No stacktraces obvs cuz that would make life easy and shit.

=> Logstash: https://logstash.wikimedia.org/goto/d2698f1b9f332217fb797090b2bb5fa9

Replication steps

Visit https://m.mediawiki.org/wiki/Extension:MobileFrontend
If the watch star is green click it, if you can't see the watchstar at all that's the problem.
After clicking it, notice it's absence.

Event Timeline

demon created this task.Aug 30 2017, 7:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 30 2017, 7:27 PM
demon triaged this task as High priority.Aug 30 2017, 7:27 PM

Setting to high because it's actually pretty spammy with wmf.16

Krinkle added a comment.EditedAug 30 2017, 9:18 PM

No stacktraces obvs cuz that would make life easy and shit.

Indeed. Except.. wait a minute... Lies! The error channel has traces now? (See update at T45086)

Logstash:

#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.30.0-wmf.16/includes/resourceloader/ResourceLoaderImage.php(302): DOMDocument->loadXML(string)
#2 /srv/mediawiki/php-1.30.0-wmf.16/includes/resourceloader/ResourceLoaderImage.php(342): ResourceLoaderImage->massageSvgPathdata(string)
#3 /srv/mediawiki/php-1.30.0-wmf.16/includes/resourceloader/ResourceLoaderImage.php(243): ResourceLoaderImage->rasterize(string)
#4 /srv/mediawiki/php-1.30.0-wmf.16/includes/resourceloader/ResourceLoader.php(1050): ResourceLoaderImage->getImageData(ResourceLoaderContext)
#5 /srv/mediawiki/php-1.30.0-wmf.16/includes/resourceloader/ResourceLoader.php(783): ResourceLoader->makeModuleResponse(ResourceLoaderContext, array, array)
#6 /srv/mediawiki/php-1.30.0-wmf.16/load.php(53): ResourceLoader->respond(ResourceLoaderContext)
#7 /srv/mediawiki/w/load.php(3): include(string)
#8 {main}

Looking at https://logstash.wikimedia.org/goto/d2698f1b9f332217fb797090b2bb5fa9 it seems all the log entries are from urls requesting modules=skins.minerva.icons.images.scripts&image=watch.

Krinkle renamed this task from Bad SVG in ResourceLoader? to Watch icon from skins.minerva.icons.images.scripts invalid SVG ("PHP Warning: parsing XML declaration").Aug 30 2017, 9:52 PM
Krinkle updated the task description. (Show Details)
Krinkle edited projects, added MinervaNeue; removed MediaWiki-ResourceLoader.

The HVVM error channel (the first of the two errors) includes no stack trace. I assumed the other wouldn't either because too often the bugs I report don't have traces :(

Jdlrobson renamed this task from Watch icon from skins.minerva.icons.images.scripts invalid SVG ("PHP Warning: parsing XML declaration") to Watchstar hidden on unwatched pages - Watch icon from skins.minerva.icons.images.scripts invalid SVG ("PHP Warning: parsing XML declaration").Aug 31 2017, 2:13 AM
Jdlrobson added a subscriber: Jdlrobson.

This is blocking the train and if it goes out on the train it will break the watchstar functionality, so it seems like a no-brainer that we should fix this today.

Jdlrobson updated the task description. (Show Details)Aug 31 2017, 1:39 PM
Jdlrobson moved this task from Upcoming to 2017-18 Q1 on the Readers-Web-Backlog board.

Change 375028 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Fix watchstar icon

https://gerrit.wikimedia.org/r/375028

@Jdlrobson to try to get this in before today's swat, else go with the old star

Change 375028 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Fix watchstar icon

https://gerrit.wikimedia.org/r/375028

Change 375031 had a related patch set uploaded (by Chad; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@wmf/1.30.0-wmf.16] Fix watchstar icon

https://gerrit.wikimedia.org/r/375031

Change 375031 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@wmf/1.30.0-wmf.16] Fix watchstar icon

https://gerrit.wikimedia.org/r/375031

Jdlrobson closed this task as Resolved.Aug 31 2017, 6:21 PM

Watchstar is now showing again on mediawiki.org

phuedx added a subscriber: phuedx.Aug 31 2017, 6:49 PM

Initial thought, is the XML processing instruction invalid? It should end with an ?>, right? See https://en.wikipedia.org/wiki/Processing_Instruction

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:10 PM