Page MenuHomePhabricator

EchoForeignWikiRequest emits PHP error "Undefined index: query"
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

Request ID: W6JbzwrAACsAACO@hxsAAADX

message
[{exception_id}] {exception_url}   ErrorException from line 110 of /srv/mediawiki/php-1.32.0-wmf.22/extensions/Echo/includes/ForeignWikiRequest.php: PHP Notice: Undefined index: csrftoken
stacktrace
#0 /srv/mediawiki/php-1.32.0-wmf.22/extensions/Echo/includes/ForeignWikiRequest.php(110): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.32.0-wmf.22/extensions/Echo/includes/ForeignWikiRequest.php(153): EchoForeignWikiRequest->getCsrfToken(string)
#2 /srv/mediawiki/php-1.32.0-wmf.22/extensions/Echo/includes/ForeignWikiRequest.php(134): EchoForeignWikiRequest->getQueryParams(string)
#3 /srv/mediawiki/php-1.32.0-wmf.22/extensions/Echo/includes/ForeignWikiRequest.php(36): EchoForeignWikiRequest->getRequestParams(string, array)
#4 /srv/mediawiki/php-1.32.0-wmf.22/extensions/Echo/includes/api/ApiCrossWiki.php(38): EchoForeignWikiRequest->execute()
#5 /srv/mediawiki/php-1.32.0-wmf.22/extensions/Echo/includes/api/ApiEchoNotifications.php(44): ApiEchoNotifications->getFromForeign()
#6 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiQuery.php(249): ApiEchoNotifications->execute()
#7 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(1587): ApiQuery->execute()
#8 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(531): ApiMain->executeAction()
#9 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()
#10 /srv/mediawiki/php-1.32.0-wmf.22/api.php(87): ApiMain->execute()

Notes

New error introduced in 1.32.0-wmf.22. Similar circumstances as T204758.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Krinkle added a subscriber: SBisson.

Given it come from the same line, it's possible that the exiting patch for T204758 will fix this as well. CC-ing @SBisson to confirm.

Given it come from the same line, it's possible that the exiting patch for T204758 will fix this as well. CC-ing @SBisson to confirm.

Very likely.

The request for the token was malformed so the response didn't have the expected structure but I'm puzzled as to why
$this->csrfTokens[$w] = $response['query']['tokens']['csrftoken'];
failed with invalid index sometimes on 'query' and sometimes on 'csrftoken'.

greg triaged this task as Unbreak Now! priority.Sep 19 2018, 2:40 PM
greg subscribed.

(Train blocker == UBN!)

The request for the token was malformed so the response didn't have the expected structure but I'm puzzled as to why
$this->csrfTokens[$w] = $response['query']['tokens']['csrftoken'];
failed with invalid index sometimes on 'query' and sometimes on 'csrftoken'.

Presumably because sometimes there are other tokens?

T204758 is similar and got fixed earlier.

There was a single notice for the last 12 hours, so I have no idea how to reproduce. It is hardly a blocker, I will keep moving train to group1

This happened pretty frequently, but then stopped. The last notice is from 16:43 UTC. The fix for T204758 was deployed at 16:49 UTC. I think that's enough circumstantial evidence to say that T204758 fixed this too.

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