Page MenuHomePhabricator

DomainException on Special:Notifications on mediawiki.org
Closed, ResolvedPublic

Description

https://www.mediawiki.org/wiki/Special:Notifications -> Exception encountered, of type "DomainException"

Echo icon -> Could not retrieve notifications. Please try again. (Error [1bb1d3ad] Exception Caught: No agent associated with notification with id '52564' of type 'edit-thank')

2016-02-22 17:36:32 mw1200 mediawikiwiki 1.27.0-wmf.13 exception ERROR: [1bb1d3ad] /w/api.php?action=query&format=json&notsections=alert&meta=notifications&notgroupbysection=1&notmessageunreadfirst=1&notformat=model&notlimit=25&notprop=index%7Clist%7Ccount&uselang=en&_=1456162588213   DomainException from line 285 of /srv/mediawiki/php-1.27.0-wmf.13/extensions/Echo/includes/formatters/EventPresentationModel.php: No agent associated with notification with id '52564' of type 'edit-thank' {"exception_id":"1bb1d3ad"}
[Exception DomainException] (/srv/mediawiki/php-1.27.0-wmf.13/extensions/Echo/includes/formatters/EventPresentationModel.php:285) No agent associated with notification with id '52564' of type 'edit-thank'
  #0 /srv/mediawiki/php-1.27.0-wmf.13/extensions/Thanks/ThanksPresentationModel.php(29): EchoEventPresentationModel->getAgentLink()
  #1 /srv/mediawiki/php-1.27.0-wmf.13/extensions/Echo/includes/formatters/EventPresentationModel.php(381): EchoThanksPresentationModel->getSecondaryLinks()
  #2 /srv/mediawiki/php-1.27.0-wmf.13/extensions/Echo/includes/formatters/EchoModelFormatter.php(13): EchoEventPresentationModel->jsonSerialize()
  #3 /srv/mediawiki/php-1.27.0-wmf.13/extensions/Echo/includes/formatters/EchoEventFormatter.php(30): EchoModelFormatter->formatModel(EchoThanksPresentationModel)
  #4 /srv/mediawiki/php-1.27.0-wmf.13/extensions/Echo/includes/DataOutputFormatter.php(141): EchoEventFormatter->format(EchoEvent)
  #5 /srv/mediawiki/php-1.27.0-wmf.13/extensions/Echo/includes/DataOutputFormatter.php(116): EchoDataOutputFormatter::formatNotification(EchoEvent, User, string, Language)
  #6 /srv/mediawiki/php-1.27.0-wmf.13/extensions/Echo/includes/api/ApiEchoNotifications.php(219): EchoDataOutputFormatter::formatOutput(EchoNotification, string, User, Language)
  #7 /srv/mediawiki/php-1.27.0-wmf.13/extensions/Echo/includes/api/ApiEchoNotifications.php(129): ApiEchoNotifications->getPropList(User, array, array, integer, NULL, string, boolean)
  #8 /srv/mediawiki/php-1.27.0-wmf.13/extensions/Echo/includes/api/ApiEchoNotifications.php(49): ApiEchoNotifications->getSectionPropList(User, string, array, integer, NULL, string, boolean)
  #9 /srv/mediawiki/php-1.27.0-wmf.13/includes/api/ApiQuery.php(277): ApiEchoNotifications->execute()
  #10 /srv/mediawiki/php-1.27.0-wmf.13/includes/api/ApiMain.php(1319): ApiQuery->execute()
  #11 /srv/mediawiki/php-1.27.0-wmf.13/includes/api/ApiMain.php(461): ApiMain->executeAction()
  #12 /srv/mediawiki/php-1.27.0-wmf.13/includes/api/ApiMain.php(433): ApiMain->executeActionWithErrorHandling()
  #13 /srv/mediawiki/php-1.27.0-wmf.13/api.php(83): ApiMain->execute()
  #14 /srv/mediawiki/w/api.php(3): include(string)
  #15 {main}

Event Timeline

Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald Transcript
hoo removed a project: SRE.

The code that produced this exception doesn't exist anymore since https://gerrit.wikimedia.org/r/#/c/271297

I never thought the agent could be null. Since it can, we could return null from getUserLink or check it in canRender and suppress the notification entirely.

Change 272998 had a related patch set uploaded (by Sbisson):
Handle null user when trying to generate a link for notifications

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

Change 272998 merged by jenkins-bot:
Handle null user when trying to generate a link for notifications

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

Checked in betalabs - did not see exceptions for 'edit-thank' . T128020: [betalabs] "Thank action failed" message was probably fixed due to this fix.