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'

Screen Shot 2016-06-30 at 1.58.17 PM.png (250×609 px, 27 KB)

Screen Shot 2016-06-30 at 1.57.58 PM.png (362×579 px, 45 KB)

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:

Screen Shot 2016-06-23 at 4.36.41 PM.png (277×1 px, 57 KB)

Screen Shot 2016-06-29 at 9.28.13 AM.png (422×1 px, 77 KB)

Screen Shot 2016-06-30 at 1.31.23 PM.png (401×1 px, 124 KB)

Screen Shot 2016-06-30 at 1.34.52 PM.png (666×1 px, 230 KB)

Event Timeline

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.

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"

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

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