Page MenuHomePhabricator

XTools loging in problem
Closed, ResolvedPublic

Description

/var/www/vendor/mediawiki/oauthclient/src/Client.php: 174 - Catchable Fatal Error: Argument 1 passed to MediaWiki\OAuthClient\Client::complete() must be an instance of MediaWiki\OAuthClient\Token, null given, called in /var/www/src/AppBundle/Controller/DefaultController.php on line 128 and defined

URL: http://xtools.wmflabs.org/oauth_callback?oauth_token=7f243292f98cc317236d2fd372fe8fce

We (at least another user and me) are not able to log in to https://xtools.wmflabs.org, with this message above shown.

Event Timeline

the error page says :

500: Internal Server Error

A fatal error has occurred within XTools.

The server said: Catchable Fatal Error: Argument 1 passed to MediaWiki\OAuthClient\Client::complete() must be an instance of MediaWiki\OAuthClient\Token, null given, called in /var/www/src/AppBundle/Controller/DefaultController.php on line 128 and defined

Please feel free to report this error on Phabricator (requires a Wikimedia account).

I'm also experiencing the same error with a new user account.

Matthewrbowker triaged this task as High priority.
Matthewrbowker moved this task from Backlog to Working on the XTools board.
Matthewrbowker subscribed.

I'll take a look.

Okay, looking through the code, it appears that "oauth_request_token" is not getting set on callback.

@Samwilson @MusikAnimal Who implemented the oauth code? I don't believe it was me...

The xtools-prod01.xtools.eqiad.wmflabs was running out of disk space for storing the session information. I've cleared the cache, and logging in seems to be working again.

The long-term fix for this is, I guess, to figure out what's going wrong with switching to Redis as the cache, or get more disk space and clear it more often. And set up better low-disk space reporting. :)

Also, I was confused initially, because df -h said there was plenty of space on /:

samwilson@xtools-prod01:/var/www$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             10M     0   10M   0% /dev
tmpfs           1.6G  155M  1.5G  10% /run
/dev/vda3        19G  9.7G  8.0G  56% /
tmpfs           4.0G     0  4.0G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           4.0G     0  4.0G   0% /sys/fs/cgroup

Now it says there's 11G free.

I didn't understand anything about the code, but wow thank you guys it works!

Matthewrbowker reassigned this task from Matthewrbowker to Samwilson.
Matthewrbowker moved this task from Working to Complete on the XTools board.

Glad that's working for you! I'm going to close this now, will add a couple follow-up tasks shortly.

The xtools-prod01.xtools.eqiad.wmflabs was running out of disk space for storing the session information. I've cleared the cache, and logging in seems to be working again.

The long-term fix for this is, I guess, to figure out what's going wrong with switching to Redis as the cache, or get more disk space and clear it more often.

I wonder if maybe the cache isn't being cleared from disk after it has expired? Most operations are only cached for 10 minutes. I love redis, but even between the two app servers, a shared cache won't be very beneficial to us. With every use of a tool there are several cache reads/writes, so I worry what effect those round-trips to Redis will have on performance (probably trivial?). I'm perfectly ok with giving it a try, but if the current issue indeed is that stale cached data isn't being cleared, we might focus on that first.

And set up better low-disk space reporting. :)

Yes! Adding some sort of monitoring service seems like a good idea, perhaps one that could comment in the IRC channel.