Page MenuHomePhabricator

[regression-betalabs] 'Failed to fetch notifications'
Closed, ResolvedPublic

Description

Login to betalabs and click on Alerts or Messages badge. 'Failed to fetch notifications' will be displayed.

The badges do not change their colors after clicking. Special:Notifications page will display unread messages with the correct count. No errors in the Console.

Note: Special:Notificaitons displays all notifications correctly; only the flyout shows "Failed to fetch notifications".
Note: 'Failed to fetch notifications' is displayed when only local unread notifications are present.
The same user - in cawiki, English Alert is visible; in enwiki - Alert displays 'Failed to fetch notifications'

Network tab shows:

"#0 /srv/mediawiki/php-master/extensions/Echo/includes/api/ApiEchoNotifications.php(119): 
ApiEchoNotifications->makeForeignNotification(User, string, string) 
#1 /srv/mediawiki/php-master/extensions/Echo/includes/api/ApiEchoNotifications.php(44): ApiEchoNotifications->getLocalNotifications(array) 
#2 /srv/mediawiki/php-master/includes/api/ApiQuery.php(251): 
ApiEchoNotifications->execute() #3 /srv/mediawiki/php-master/includes/api/ApiMain.php(1374): 
ApiQuery->execute() 
#4 /srv/mediawiki/php-master/includes/api/ApiMain.php(470): ApiMain-
>executeAction() 
#5 /srv/mediawiki/php-master/includes/api/ApiMain.php(441): ApiMain-
>executeActionWithErrorHandling() 
#6 /srv/mediawiki/php-master/api.php(83): ApiMain->execute() 
#7 /srv/mediawiki/w/api.php(3): include(string) 
#8 {main}"

Some other examples:

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 30 2016, 8:41 PM
Etonkovidova updated the task description. (Show Details)Jun 30 2016, 9:02 PM
Etonkovidova updated the task description. (Show Details)Jun 30 2016, 9:19 PM
Catrope triaged this task as Unbreak Now! priority.Jul 1 2016, 1:30 PM
Catrope moved this task from Untriaged to Ready for Pickup on the Collab-Team-2016-Apr-Jun-Q4 board.
Restricted Application added subscribers: Luke081515, TerraCodes, Urbanecm. · View Herald TranscriptJul 1 2016, 1:30 PM

I've seen this in @Etonkovidova 's computer, but when I try with my user, I don't see this error on beta labs and in master. Both Special:Notifications page and the popups load perfectly for me without errors.

@Etonkovidova, could it be an error with the specific user? Can you try with another user and see if that happens again?

@Mooeypoo - Adding error info:

error: {code: "internal_api_error_BadMethodCallException",…}
*:"#0 /srv/mediawiki/php-master/extensions/Echo/includes/api/ApiEchoNotifications.php(373): Closure$ApiEchoNotifications::makeForeignNotification#3(string, string)
#1 /srv/mediawiki/php-master/extensions/Echo/includes/api/ApiEchoNotifications.php(119): ApiEchoNotifications->makeForeignNotification(User, string, string)
#2 /srv/mediawiki/php-master/extensions/Echo/includes/api/ApiEchoNotifications.php(44): ApiEchoNotifications->getLocalNotifications(array)
#3 /srv/mediawiki/php-master/includes/api/ApiQuery.php(251): ApiEchoNotifications->execute()
#4 /srv/mediawiki/php-master/includes/api/ApiMain.php(1376): ApiQuery->execute()
#5 /srv/mediawiki/php-master/includes/api/ApiMain.php(472): ApiMain->executeAction()
#6 /srv/mediawiki/php-master/includes/api/ApiMain.php(443): ApiMain->executeActionWithErrorHandling()
#7 /srv/mediawiki/php-master/api.php(83): ApiMain->execute()
#8 /srv/mediawiki/w/api.php(3): include(string)
#9 {main}"

code:"internal_api_error_BadMethodCallException"

info:
"[V3ak1wpEEH8AAD2W6LMAAAAN] Exception Caught: Call to a member function getTimestamp() on a non-object (null)"

servedby:"deployment-mediawiki02"
Etonkovidova updated the task description. (Show Details)Jul 1 2016, 6:15 PM

Change 296956 had a related patch set uploaded (by Catrope):
ApiEchoNotifications: Don't add wikis with no timestamp

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

Change 296956 merged by jenkins-bot:
ApiEchoNotifications: Don't add wikis with no timestamp

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

Catrope claimed this task.Jul 1 2016, 7:42 PM
Catrope moved this task from Ready for Pickup to QA Review on the Collab-Team-2016-Apr-Jun-Q4 board.

Checked the fix in betalabs - no more 'Failed to fetch notifications' messages displayed.

jmatazzoni closed this task as Resolved.Jul 5 2016, 6:45 PM