Page MenuHomePhabricator

Logging in on beta metawiki throws `Wikimedia\Services\NoSuchServiceException: No such service: CommunityConfiguration.ProviderFactory`
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

I am redirected to https://auth.wikimedia.beta.wmcloud.org/loginwiki/wiki/Special:CentralAutoLogin/checkLoggedIn?useformat=desktop&type=redirect&returnUrlToken=REDACTED&wikiid=metawiki&usesul3=1&useformat=desktop, which throws the following fatal error:

MediaWiki internal error.

Original exception: [aJy0a8fdx0_AWVx1vFBoqQAAABg] /loginwiki/wiki/Special:CentralAutoLogin/checkLoggedIn?returnUrlToken=4cc650076d10a7978470ab5393206b62&type=redirect&useformat=desktop&useformat=desktop&usesul3=1&wikiid=metawiki Wikimedia\Services\NoSuchServiceException: No such service: CommunityConfiguration.ProviderFactory
Backtrace:
from /srv/mediawiki/php-master/vendor/wikimedia/services/src/ServiceContainer.php(426)
#0 /srv/mediawiki/php-master/vendor/wikimedia/services/src/ServiceContainer.php(406): Wikimedia\Services\ServiceContainer->createService(string)
#1 /srv/mediawiki/php-master/includes/MediaWikiServices.php(372): Wikimedia\Services\ServiceContainer->getService(string)
#2 /srv/mediawiki/php-master/vendor/wikimedia/services/src/ServiceContainer.php(414): MediaWiki\MediaWikiServices->getService(string)
#3 /srv/mediawiki/php-master/vendor/wikimedia/object-factory/src/ObjectFactory.php(204): Wikimedia\Services\ServiceContainer->get(string)
#4 /srv/mediawiki/php-master/vendor/wikimedia/object-factory/src/ObjectFactory.php(149): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec(array, array)
#5 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(252): Wikimedia\ObjectFactory\ObjectFactory->createObject(array)
#6 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(344): MediaWiki\HookContainer\HookContainer->makeExtensionHandlerCallback(string, array, array)
#7 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(516): MediaWiki\HookContainer\HookContainer->normalizeHandler(string, array, array)
#8 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(142): MediaWiki\HookContainer\HookContainer->getHandlers(string, array)
#9 /srv/mediawiki/php-master/includes/HookContainer/HookRunner.php(2245): MediaWiki\HookContainer\HookContainer->run(string, array)
#10 /srv/mediawiki/php-master/includes/Permissions/PermissionManager.php(573): MediaWiki\HookContainer\HookRunner->onGetUserPermissionsErrors(MediaWiki\Title\Title, MediaWiki\User\User, string, string)
#11 /srv/mediawiki/php-master/includes/Permissions/PermissionManager.php(528): MediaWiki\Permissions\PermissionManager->checkPermissionHooks(string, MediaWiki\User\User, MediaWiki\Permissions\PermissionStatus, string, bool, MediaWiki\Title\Title)
#12 /srv/mediawiki/php-master/includes/Permissions/UserAuthority.php(362): MediaWiki\Permissions\PermissionManager->getPermissionStatus(string, MediaWiki\User\User, MediaWiki\Title\Title, string)
#13 /srv/mediawiki/php-master/includes/Permissions/UserAuthority.php(237): MediaWiki\Permissions\UserAuthority->internalCan(string, string, MediaWiki\Title\Title, MediaWiki\Permissions\PermissionStatus, int)
#14 /srv/mediawiki/php-master/includes/user/User.php(3379): MediaWiki\Permissions\UserAuthority->authorizeRead(string, MediaWiki\Title\Title, MediaWiki\Permissions\PermissionStatus)
#15 /srv/mediawiki/php-master/includes/actions/ActionEntryPoint.php(400): MediaWiki\User\User->authorizeRead(string, MediaWiki\Title\Title, MediaWiki\Permissions\PermissionStatus)
#16 /srv/mediawiki/php-master/includes/actions/ActionEntryPoint.php(143): MediaWiki\Actions\ActionEntryPoint->performRequest()
#17 /srv/mediawiki/php-master/includes/MediaWikiEntryPoint.php(198): MediaWiki\Actions\ActionEntryPoint->execute()
#18 /srv/mediawiki/php-master/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#19 /srv/mediawiki/w/index.php(3): require(string)
#20 {main}

Exception caught inside exception handler: [aJy0a8fdx0_AWVx1vFBoqQAAABg] /loginwiki/wiki/Special:CentralAutoLogin/checkLoggedIn?returnUrlToken=4cc650076d10a7978470ab5393206b62&type=redirect&useformat=desktop&useformat=desktop&usesul3=1&wikiid=metawiki Wikimedia\Services\NoSuchServiceException: No such service: CommunityConfiguration.ProviderFactory
Backtrace:
from /srv/mediawiki/php-master/vendor/wikimedia/services/src/ServiceContainer.php(426)
#0 /srv/mediawiki/php-master/vendor/wikimedia/services/src/ServiceContainer.php(406): Wikimedia\Services\ServiceContainer->createService(string)
#1 /srv/mediawiki/php-master/includes/MediaWikiServices.php(372): Wikimedia\Services\ServiceContainer->getService(string)
#2 /srv/mediawiki/php-master/vendor/wikimedia/services/src/ServiceContainer.php(414): MediaWiki\MediaWikiServices->getService(string)
#3 /srv/mediawiki/php-master/vendor/wikimedia/object-factory/src/ObjectFactory.php(204): Wikimedia\Services\ServiceContainer->get(string)
#4 /srv/mediawiki/php-master/vendor/wikimedia/object-factory/src/ObjectFactory.php(149): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec(array, array)
#5 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(252): Wikimedia\ObjectFactory\ObjectFactory->createObject(array)
#6 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(344): MediaWiki\HookContainer\HookContainer->makeExtensionHandlerCallback(string, array, array)
#7 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(516): MediaWiki\HookContainer\HookContainer->normalizeHandler(string, array, array)
#8 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(142): MediaWiki\HookContainer\HookContainer->getHandlers(string, array)
#9 /srv/mediawiki/php-master/includes/HookContainer/HookRunner.php(2245): MediaWiki\HookContainer\HookContainer->run(string, array)
#10 /srv/mediawiki/php-master/includes/Permissions/PermissionManager.php(573): MediaWiki\HookContainer\HookRunner->onGetUserPermissionsErrors(MediaWiki\Title\Title, MediaWiki\User\User, string, string)
#11 /srv/mediawiki/php-master/includes/Permissions/PermissionManager.php(528): MediaWiki\Permissions\PermissionManager->checkPermissionHooks(string, MediaWiki\User\User, MediaWiki\Permissions\PermissionStatus, string, bool, MediaWiki\Title\Title)
#12 /srv/mediawiki/php-master/includes/Permissions/PermissionManager.php(291): MediaWiki\Permissions\PermissionManager->getPermissionStatus(string, MediaWiki\User\User, MediaWiki\Title\Title, string, bool)
#13 /srv/mediawiki/php-master/includes/Permissions/UserAuthority.php(381): MediaWiki\Permissions\PermissionManager->userCan(string, MediaWiki\User\User, MediaWiki\Title\Title, string)
#14 /srv/mediawiki/php-master/includes/Permissions/UserAuthority.php(176): MediaWiki\Permissions\UserAuthority->internalCan(string, string, MediaWiki\Title\Title, null, bool)
#15 /srv/mediawiki/php-master/includes/user/User.php(3325): MediaWiki\Permissions\UserAuthority->probablyCan(string, MediaWiki\Title\Title, null)
#16 /srv/mediawiki/php-master/includes/skins/SkinTemplate.php(1074): MediaWiki\User\User->probablyCan(string, MediaWiki\Title\Title)
#17 /srv/mediawiki/php-master/includes/skins/SkinTemplate.php(613): MediaWiki\Skin\SkinTemplate->buildContentNavigationUrlsInternal()
#18 /srv/mediawiki/php-master/includes/skins/SkinTemplate.php(194): MediaWiki\Skin\SkinTemplate->getPortletsTemplateData()
#19 /srv/mediawiki/php-master/includes/skins/SkinMustache.php(131): MediaWiki\Skin\SkinTemplate->getTemplateData()
#20 /srv/mediawiki/php-master/skins/Vector/includes/SkinVector22.php(306): MediaWiki\Skin\SkinMustache->getTemplateData()
#21 /srv/mediawiki/php-master/includes/skins/SkinMustache.php(93): MediaWiki\Skins\Vector\SkinVector22->getTemplateData()
#22 /srv/mediawiki/php-master/includes/skins/SkinTemplate.php(187): MediaWiki\Skin\SkinMustache->generateHTML()
#23 /srv/mediawiki/php-master/includes/skins/Skin.php(676): MediaWiki\Skin\SkinTemplate->outputPage()
#24 /srv/mediawiki/php-master/includes/Output/OutputPage.php(3291): MediaWiki\Skin\Skin->outputPageFinal(MediaWiki\Output\OutputPage)
#25 /srv/mediawiki/php-master/includes/exception/MWExceptionRenderer.php(197): MediaWiki\Output\OutputPage->output()
#26 /srv/mediawiki/php-master/includes/exception/MWExceptionRenderer.php(116): MediaWiki\Exception\MWExceptionRenderer::reportHTML(Wikimedia\Services\NoSuchServiceException)
#27 /srv/mediawiki/php-master/includes/exception/MWExceptionHandler.php(137): MediaWiki\Exception\MWExceptionRenderer::output(Wikimedia\Services\NoSuchServiceException, int)
#28 /srv/mediawiki/php-master/includes/exception/MWExceptionHandler.php(238): MediaWiki\Exception\MWExceptionHandler::report(Wikimedia\Services\NoSuchServiceException)
#29 /srv/mediawiki/php-master/includes/MediaWikiEntryPoint.php(218): MediaWiki\Exception\MWExceptionHandler::handleException(Wikimedia\Services\NoSuchServiceException, string)
#30 /srv/mediawiki/php-master/includes/actions/ActionEntryPoint.php(79): MediaWiki\MediaWikiEntryPoint->handleTopLevelError(Wikimedia\Services\NoSuchServiceException)
#31 /srv/mediawiki/php-master/includes/MediaWikiEntryPoint.php(204): MediaWiki\Actions\ActionEntryPoint->handleTopLevelError(Wikimedia\Services\NoSuchServiceException)
#32 /srv/mediawiki/php-master/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#33 /srv/mediawiki/w/index.php(3): require(string)
#34 {main}

What should have happened instead?:
A login screen appears.

Other information (browser name/version, screenshots, etc.):
Repeating the process (w/o reopening the window) actually allows one to login.

Event Timeline

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

Also adding CentralAuth (and its responsible team) for awareness as this point (the issue is happening (a) on loginwiki (b) on the special auth domain).

FWIW, there seems to be a much easier way to reproduce this: simply visit https://login.wikimedia.beta.wmcloud.org/wiki/Special:Version.

This seems to be a fall-out from T393240: Special:BlockedExternalDomains should make use of Community Configuration :-/. Since that code is in wmf.15, this needs to be considered a train blocker for wmf.15.

Change #1178587 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/AbuseFilter@master] fix: Do not fail if CommunityConfiguration is not installed

https://gerrit.wikimedia.org/r/1178587

Change #1178587 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] fix: Do not fail if CommunityConfiguration is not installed

https://gerrit.wikimedia.org/r/1178587

Weird – I was briefly able to log into Beta a moment ago, but now it seems to be broken again and https://auth.wikimedia.beta.wmcloud.org/loginwiki/wiki/Special:CentralAutoLogin/checkLoggedIn?useformat=desktop&type=redirect&returnUrlToken=redacted&wikiid=metawiki&usesul3=1&useformat=desktop still gives me a “No such service: CommunityConfiguration.ProviderFactory” exception?

Okay, now it’s working for me again. I was probably trying it out before the merged change had actually reached Beta (I didn’t pay close attention to the timestamps), though that doesn’t explain how I was still able to log in once.

Okay, now it’s working for me again. I was probably trying it out before the merged change had actually reached Beta (I didn’t pay close attention to the timestamps), though that doesn’t explain how I was still able to log in once.

My observation with the bug is that you only see the error once. If you reproduce it once, and then click Log in again, a login form appeared (although I did not attempt to use it during the breakage). I did not look into why that happens though.

In any case, thanks for the +2! :)

Huh, I could’ve sworn that didn’t work for me earlier. But if you say so – it’s not like I have a countertheory ^^

Anyway, JFTR, this remains a train blocker until the fix is backported at an opportune time. (And it looks like loginwiki is in group1, so the train has already progressed as far as it can without hitting this bug, IIUC.)

Anyway, JFTR, this remains a train blocker until the fix is backported at an opportune time. (And it looks like loginwiki is in group1, so the train has already progressed as far as it can without hitting this bug, IIUC.)

Oh wait, it’s a train blocker for next week, not this week. Then I think nothing else is needed here? (Except for Growth-Team’s QA :))

Anyway, JFTR, this remains a train blocker until the fix is backported at an opportune time. (And it looks like loginwiki is in group1, so the train has already progressed as far as it can without hitting this bug, IIUC.)

Oh wait, it’s a train blocker for next week, not this week.

Indeed, the patch causing the breakage was merged after the branch cut.

Then I think nothing else is needed here? (Except for Growth-Team’s QA :))

Agreed!

Then I think nothing else is needed here? (Except for Growth-Team’s QA :))

Agreed!

Ok to close the task then?

Etonkovidova subscribed.

Then I think nothing else is needed here? (Except for Growth-Team’s QA :))

Agreed!

Ok to close the task then?

Thank you @jnuche! Well, I'm moving it to Test in Production (just to check).

I do not think this needs to block the train anymore. Thanks everyone!

Is it accurate to summarize this as "We accidentally create a hard dependency on CommunityConfiguration, when we actually wanted to create a soft dependency."?

Is it accurate to summarize this as "We accidentally create a hard dependency on CommunityConfiguration, when we actually wanted to create a soft dependency."?

Yes, it is.

Is it accurate to summarize this as "We accidentally create a hard dependency on CommunityConfiguration, when we actually wanted to create a soft dependency."?

Yes, it is.

That said...there is also a second problem: In the long term, we probably want to shift to a hard dependency (should be much simpler if we ever get CC bundled with core, or get some awareness of the CC concepts _into_ core), so that we do not need to maintain several "download this page" snippets. The fact loginwiki doesn't have CC kind of stands in the way. I already discussed this with MediaWiki-Platform-Team, with the conclusion of there is no risk in just enabling it if it makes something simpler. So, there is a hidden factor here as well.