Page MenuHomePhabricator

PHP Fatal Error: Call to a member function doLogout() on a non-object
Closed, DeclinedPublicPRODUCTION ERROR

Description

Call to a member function doLogout() on a non-object

2017-06-23 20:30:01 [473371d4f05138e3ca788853] silver labswiki 1.30.0-wmf.6 fatal ERROR: [0103afda] PHP Fatal Error: Call to a member function doLogout() on a non-object {"fatal_exception":{"class":"ErrorException","message":"PHP Fatal Error: Call to a member function doLogout() on a non-object","code":1,"file":"/srv/mediawiki/php-1.30.0-wmf.6/extensions/OpenStackManager/nova/OpenStackNovaController.php","line":1007,"trace":[{"function":"handleFatalError","class":"MWExceptionHandler","type":"::","args":[]}]},"exception_id":"XXXXXXXXXXX","caught_by":"mwe_handler"}

That seems to occur on a specific schedule of some sort:

2017-06-23 20:30:01
2017-06-22 08:30:02
2017-06-17 03:30:02
2017-06-15 11:30:01
2017-06-12 11:30:01
2017-06-09 15:30:02
etc.

Event Timeline

demon triaged this task as Medium priority.Jun 29 2017, 12:09 AM
demon subscribed.

The failure in getUnscopedToken() in obvious:

nova/OpenStackNovaController.php
$wikiuser = User::newFromName( $this->user->getUsername() );
$token = OpenStackNovaUser::loadToken( $wikiuser );
if ( !$token ) {
	// Log this user out!
	$wikiuser->doLogout();
	return '';
}

It's very easy for User::newFromName() to return null. So is the username being invalid here ok--like is it semi-expected? If so, we just need to bail out a little nicer.

Krinkle subscribed.

The code hasn't change in any obvious way, but I've found no occurrences in the last 30 days of WMF Logstash data. Closing for now.

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