Page MenuHomePhabricator

TypeError: Argument 2 passed to MediaWiki\TimedMediaHandler\TimedTextPage::getTimedTextHTML() must be of the type string, null given
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   TypeError: Argument 2 passed to MediaWiki\TimedMediaHandler\TimedTextPage::getTimedTextHTML() must be of the type string, null given, called in /srv/mediawiki/php-1.42.0-wmf.25/extensions/TimedMediaHandler/includes/TimedTextPag
error.stack_trace
from /srv/mediawiki/php-1.42.0-wmf.25/extensions/TimedMediaHandler/includes/TimedTextPage.php(318)
#0 /srv/mediawiki/php-1.42.0-wmf.25/extensions/TimedMediaHandler/includes/TimedTextPage.php(165): MediaWiki\TimedMediaHandler\TimedTextPage->getTimedTextHTML(MediaWiki\Output\OutputPage, NULL)
#1 /srv/mediawiki/php-1.42.0-wmf.25/extensions/TimedMediaHandler/includes/TimedTextPage.php(126): MediaWiki\TimedMediaHandler\TimedTextPage->renderOutput(MediaWiki\Output\OutputPage)
#2 /srv/mediawiki/php-1.42.0-wmf.25/includes/actions/ViewAction.php(78): MediaWiki\TimedMediaHandler\TimedTextPage->view()
#3 /srv/mediawiki/php-1.42.0-wmf.25/includes/actions/ActionEntryPoint.php(733): ViewAction->show()
#4 /srv/mediawiki/php-1.42.0-wmf.25/includes/actions/ActionEntryPoint.php(510): MediaWiki\Actions\ActionEntryPoint->performAction(MediaWiki\TimedMediaHandler\TimedTextPage, MediaWiki\Title\Title)
#5 /srv/mediawiki/php-1.42.0-wmf.25/includes/actions/ActionEntryPoint.php(145): MediaWiki\Actions\ActionEntryPoint->performRequest()
#6 /srv/mediawiki/php-1.42.0-wmf.25/includes/MediaWikiEntryPoint.php(199): MediaWiki\Actions\ActionEntryPoint->execute()
#7 /srv/mediawiki/php-1.42.0-wmf.25/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#8 /srv/mediawiki/w/index.php(3): require(string)
#9 {main}
Impact

Error is user visible. It seems to affect TimedMediaHandler media files (Possible only the ones not using subtitles/captions?)

Notes

Seen after deploy of wmf.25 to group1. The error references "php-1.42.0-wmf.25", but searching for similar errors for wmf.24 didn't return any results, so the issue seems new. Multiple wikis are affected, including commonswiki.

Error can be easily reproduced by visiting an affected URL (example).

This patch looks like the cause: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TimedMediaHandler/+/986519

The current volume is low, but it worries me what will happen when we roll out to group2. This, coupled with the fact that it's user facing, means that I'm going to tentatively mark this as a train blocker. Please lower the priority if this is not considered serious enough.

Details

Request URL
https://commons.wikimedia.org/wiki/TimedText:Ch%C3%83%C2%A2teau_de_Fontainebleau_-_Webinaire_wiki_data_et_GLAM_2021.webm
Related Changes in Gerrit:

Related Objects

Event Timeline

jnuche triaged this task as Unbreak Now! priority.
jnuche renamed this task from TypeError: Argument 2 passed to MediaWiki\TimedMediaHandler\TimedTextPage::getTimedTextHTML() must be of the type string, null given, called in /srv/mediawiki/php-1.42.0-wmf.25/extensions/TimedMediaHandler/includes/TimedTextPag to TypeError: Argument 2 passed to MediaWiki\TimedMediaHandler\TimedTextPage::getTimedTextHTML() must be of the type string, null given.Apr 3 2024, 12:12 PM
jnuche updated the task description. (Show Details)

Due to changes in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TimedMediaHandler/+/986519
Possibly happens when both the timed text page AND the corresponding file do not exist.

Example:

the latter was supposed to be https://commons.wikimedia.org/wiki/TimedText:Nie_wieder_ist_jetzt_–_Gedenkdemo_-_Hannover_Opernplatz_2024-01-27.flac

So this is essentially for content that doesn't exist (and shouldn't exist), and it seems people are ending up here due to typos or incorrect encoding in links. I don't think it is needed to block the train on this, but I won't have access to gerrit before a couple hours to be able to patch this.

Proof that the chain for actual subtitle pages seem to work:
https://commons.wikimedia.org/wiki/TimedText:Folgers.ogv.fr.srt
https://commons.wikimedia.org/wiki/TimedText:Folgers.ogv.dty.srt
https://commons.wikimedia.org/wiki/TimedText:Folgers.ogv.dty.srt?action=edit
https://commons.wikimedia.org/wiki/TimedText:Folgers.ogv
https://commons.wikimedia.org/wiki/File:Folgers.ogv

jnuche lowered the priority of this task from Unbreak Now! to Needs Triage.Apr 3 2024, 12:29 PM

@TheDJ Thank you, then the impact of the issue is probably limited. I'm lowering the priority accordingly.

Change #1016789 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/TimedMediaHandler@master] TimedTextPage::renderOutput: Don't cause a fatal if languageName is null

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

Change #1016853 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/TimedMediaHandler@master] Fix fatal for non-existing TT pages with non-existing file

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

Change #1016789 abandoned by Jforrester:

[mediawiki/extensions/TimedMediaHandler@master] TimedTextPage::renderOutput: Don't cause a fatal if languageName is null

Reason:

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

Change #1016853 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@master] Fix fatal for non-existing TT pages with non-existing file

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

TheDJ claimed this task.