Fatal error: Interface Psr\SimpleCache\CacheInterface not found

mediawiki
extensions

#1

I just updated my MediaWiki core and also some extensions including Wikibase and when trying to visit the Special page “SpecialPages”, I get this error;

Fatal error: Interface 'Psr\SimpleCache\CacheInterface' not found in /usr/local/var/www/wiki/mw-core/extensions/Wikibase/lib/includes/SimpleCacheWithBagOStuff.php on line 13

This error is related to the Wikibase repo and below is a stack trace;

Call Stack
#	Time	Memory	Function	Location
1	0.0001	365824	{main}( )	.../index.php:0
2	0.0448	4262904	MediaWiki->run( )	.../index.php:42
3	0.0632	4486464	MediaWiki->main( )	.../MediaWiki.php:523
4	0.0641	4490264	MediaWiki->performRequest( )	.../MediaWiki.php:866
5	0.0732	4725120	SpecialPageFactory::executePath( )	.../MediaWiki.php:287
6	0.0736	4727424	SpecialSpecialpages->run( )	.../SpecialPageFactory.php:570
7	0.0741	4755440	SpecialSpecialpages->execute( )	.../SpecialPage.php:566
8	0.2037	5975176	SpecialSpecialpages->getPageGroups( )	.../SpecialSpecialpages.php:42
9	0.2038	5975176	SpecialPageFactory::getUsablePages( )	.../SpecialSpecialpages.php:53
10	0.2274	8172040	SpecialPageFactory::getPage( )	.../SpecialPageFactory.php:430
11	0.2275	8172040	{closure:/usr/local/var/www/wiki/mw-core/extensions/Wikibase/repo/Wikibase.php:675-694}( )	.../SpecialPageFactory.php:381
12	0.2284	8290848	Wikibase\Repo\WikibaseRepo->getSummaryFormatter( )	.../Wikibase.php:688
13	0.2284	8290848	Wikibase\Repo\WikibaseRepo->newSummaryFormatter( )	.../WikibaseRepo.php:1111
14	0.2321	8419520	Wikibase\Lib\OutputFormatSnakFormatterFactory->getSnakFormatter( )	.../WikibaseRepo.php:1154
15	0.2325	8428256	Wikibase\Lib\OutputFormatValueFormatterFactory->getValueFormatter( )	.../OutputFormatSnakFormatterFactory.php:99
16	0.2325	8428256	Wikibase\Lib\OutputFormatValueFormatterFactory->buildDefinedFormatters( )	.../OutputFormatValueFormatterFactory.php:140
17	0.2325	8428256	call_user_func:{/usr/local/var/www/wiki/mw-core/extensions/Wikibase/lib/includes/Formatters/OutputFormatValueFormatterFactory.php:160} ( )	.../OutputFormatValueFormatterFactory.php:160
18	0.2325	8428256	{closure:/usr/local/var/www/wiki/mw-core/extensions/Wikibase/repo/WikibaseRepo.datatypes.php:98-101}( )	.../OutputFormatValueFormatterFactory.php:160
19	0.2325	8428256	Wikibase\Repo\WikibaseRepo::getDefaultValueFormatterBuilders( )	.../WikibaseRepo.datatypes.php:99
20	0.2325	8428656	Wikibase\Repo\WikibaseRepo->newWikibaseValueFormatterBuilders( )	.../WikibaseRepo.php:431
21	0.2333	8442432	Wikibase\Repo\WikibaseRepo->getFormatterCache( )	.../WikibaseRepo.php:453
22	0.2333	8442552	spl_autoload_call ( )	.../WikibaseRepo.php:2110
23	0.2333	8442616	AutoLoader::autoload( )	.../WikibaseRepo.php:2110
24	0.2334	8444824	require( '/usr/local/var/www/wiki/mw-core/extensions/Wikibase/lib/includes/SimpleCacheWithBagOStuff.php' )	.../AutoLoader.php:109

Any help? I’m just wondering what to do in order to get this issue resolved. I can access other special pages such as “Special:Version” etc but can’t access “Special:SpecialPages”.

MediaWiki version: 1.32.0-alpha
PHP: 7.1.20 (fpm-fcgi)
MySQL: 8.0.12
Wikibase repo: master
Nginx: 1.15.1


#2

Could it be related to this: https://www.mediawiki.org/wiki/Wikibase/Installation#Get_Wikibase? The statement that says:

Using the wrong version of Wikibase for your Mediawiki installation will result in errors. Be aware that the latest version of Wikibase will not work with Mediawiki version 1.30.0 (latest stable version).


#3

Please always provide exact version information for MediaWiki itself and the extension. Thanks!

(Merged in https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/441203/ )


#4

Thanks a lot @aklapper, let me put down those informations here;

MediaWiki version: 1.32.0-alpha
PHP: 7.1.20 (fpm-fcgi)
MySQL: 8.0.12
Wikibase repo: master
Nginx: 1.15.1

Let me update the description.


#5

So this seem to be an issue with a missing composer package. I just ran composer update now and it installed the psr/simple-cache package and everything seem to be working fine again. See output of the update comment;

51

This is a little strange as I had updated composer already before. Hmmm… or maybe I missed running the composer update command after updating my upstream? Maybe but thanks @aklapper for making me go over this issue again one more time and got a fix.


#6

I think I have run into this before, but I can’t find a related phabricator ticket.
Sometimes I find that you have to run “composer update” when using the composer merge plugin to install the libraries required by extensions etc correctly.


#7

Yes @addshore. I managed to solve the issue, see my post above. So what I did was I instead ran composer update before updating my upstream whereas I would have done composer update after updating my upstream and all it’s extension.

That’s how I got it. Not forgetting the merge plugin in the docs etc. :slightly_smiling_face: