Page MenuHomePhabricator

NoSuchServiceException when replying comments
Closed, ResolvedPublicBUG REPORT

Description

I got some errors when replying comments.

Wikimedia\Services\NoSuchServiceException at /www/wwwroot/MediaWiki/vendor/wikimedia/services/src/ServiceContainer.php(426) 
from /www/wwwroot/MediaWiki/vendor/wikimedia/services/src/ServiceContainer.php(426) 
#0 /www/wwwroot/MediaWiki/vendor/wikimedia/services/src/ServiceContainer.php(406): Wikimedia\Services\ServiceContainer->createService() 
#1 /www/wwwroot/MediaWiki/includes/MediaWikiServices.php(356): Wikimedia\Services\ServiceContainer->getService() 
#2 /www/wwwroot/mw-utils/YsArchives-Extensions/CommentStreams/includes/Notifier/EchoNotifier.php(175): MediaWiki\MediaWikiServices->getService() 
#3 /www/wwwroot/mw-utils/YsArchives-Extensions/Echo/includes/Controller/NotificationController.php(471): MediaWiki\Extension\CommentStreams\Notifier\EchoNotifier::locateUsersWatchingComment() 
#4 /www/wwwroot/mw-utils/YsArchives-Extensions/Echo/includes/Controller/NotificationController.php(502): MediaWiki\Extension\Notifications\Controller\NotificationController::evaluateUserCallable() 
#5 /www/wwwroot/mw-utils/YsArchives-Extensions/Echo/includes/Controller/NotificationController.php(137): MediaWiki\Extension\Notifications\Controller\NotificationController::getUsersToNotifyForEvent() 
#6 /www/wwwroot/mw-utils/YsArchives-Extensions/Echo/includes/Model/Event.php(207): MediaWiki\Extension\Notifications\Controller\NotificationController::notify() 
#7 /www/wwwroot/mw-utils/YsArchives-Extensions/CommentStreams/includes/Notifier/EchoNotifier.php(148): MediaWiki\Extension\Notifications\Model\Event::create() 
#8 /www/wwwroot/mw-utils/YsArchives-Extensions/CommentStreams/includes/ApiCSPostReply.php(116): MediaWiki\Extension\CommentStreams\Notifier\EchoNotifier->sendReplyNotifications() 
#9 /www/wwwroot/MediaWiki/includes/api/ApiMain.php(1974): MediaWiki\Extension\CommentStreams\ApiCSPostReply->execute() 
#10 /www/wwwroot/MediaWiki/includes/api/ApiMain.php(942): MediaWiki\Api\ApiMain->executeAction() 
#11 /www/wwwroot/MediaWiki/includes/api/ApiMain.php(913): MediaWiki\Api\ApiMain->executeActionWithErrorHandling() 
#12 /www/wwwroot/MediaWiki/includes/api/ApiEntryPoint.php(153): MediaWiki\Api\ApiMain->execute() 
#13 /www/wwwroot/MediaWiki/includes/MediaWikiEntryPoint.php(200): MediaWiki\Api\ApiEntryPoint->execute() 
#14 /www/wwwroot/MediaWiki/api.php(44): MediaWiki\MediaWikiEntryPoint->run() 
#15 {main}

I'm using the latest commit of REL1_43 and my MediaWiki is 1.43.1, not sure if it's a error about Echo or CommentStreams

Event Timeline

Zorua_Fox triaged this task as Unbreak Now! priority.Jun 29 2025, 12:50 PM
Zorua_Fox added subscribers: Osnard, MarkAHershberger.

@Osnard @MarkAHershberger This issue occurs when I reply to someone else's existing comment. If I post a brand new comment, this problem does not happen.

Aklapper lowered the priority of this task from Unbreak Now! to Needs Triage.Jun 29 2025, 2:12 PM
在T398136#10956640中,@Aklapper写道:

My apologies for the wrong priority of this task, Sorry for the inconvenience.

Zorua_Fox triaged this task as Unbreak Now! priority.EditedJul 12 2025, 7:57 AM

Given that I have identified the potential issue, I will increase this task's priority to Unbreak Now.

@Osnard @MarkAHershberger Can you help check if line 175 in the EchoNotifier.php file is using the correct service name? The issue disappeared when I changed ICommentStreamsStore to CommentStreamsStore there.

Aklapper lowered the priority of this task from Unbreak Now! to Needs Triage.Jul 12 2025, 11:29 AM

Please do not, as knowing the reason does not imply at all that a problem has suddenly become more urgent.

在T398136#10997247中,@Aklapper写道:

Please do not, as knowing the reason does not imply at all that a problem has suddenly become more urgent.

Based on this code error causing a critical error in the latest extension version (preventing others from replying to any comments), and referencing the "Issues that hold the train" section on Wikitech regarding how to define priority as Unbreak Now!, I believe this issue qualifies as a Major feature regression as defined in that section. Additionally, based on the definition of Unbreak Now! priority in https://mediawiki.org/wiki/Phabricator/Project_management#Priority_levels, I have therefore adjusted this bug to target priority. I am fully aware of what I'm doing and the impact this issue has on the master branch. Please reconsider restoring the priority level I set.

(This cannot hold the train as this codebase is not deployed on Wikimedia servers at all :)

Zorua_Fox triaged this task as Medium priority.Jul 12 2025, 3:17 PM

@Osnard, I can confirm the issue. I suspect that the extension can currently only be used with the new page content model introduced with version 9.0.0, although I have not verified this. Either way, it will be great if you could fix the issue, which can only be circumvented by disabling the Echo extension. That's a nasty workaround.

Change #1187003 had a related patch set uploaded (by Robert Vogel; author: Robert Vogel):

[mediawiki/extensions/CommentStreams@REL1_43] Fix service name

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

I have provided a patch. And a version 9.0.1 will be published soon.

Change #1187005 had a related patch set uploaded (by ItSpiderman; author: Robert Vogel):

[mediawiki/extensions/CommentStreams@master] Fix service name

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

Change #1187003 merged by jenkins-bot:

[mediawiki/extensions/CommentStreams@REL1_43] Fix service name

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

@Osnard Regretably, the fix does not work, i.e., I still get API response errors when trying to reply to a comment. There must be something else in the water.

@Osnard, I am sorry for the noise. I did not check out the fixed code. After eventually doing so, it worked. Senior moments, I guess. Thanks a lot!

Nevermind, thanks for confirmation.

Change #1187005 merged by jenkins-bot:

[mediawiki/extensions/CommentStreams@master] Fix service name

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

Change #1203477 had a related patch set uploaded (by SomeRandomDeveloper; author: Robert Vogel):

[mediawiki/extensions/CommentStreams@REL1_44] Fix service name

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

Change #1203478 had a related patch set uploaded (by SomeRandomDeveloper; author: Robert Vogel):

[mediawiki/extensions/CommentStreams@REL1_45] Fix service name

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

Change #1203478 merged by jenkins-bot:

[mediawiki/extensions/CommentStreams@REL1_45] Fix service name

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

Change #1203477 merged by jenkins-bot:

[mediawiki/extensions/CommentStreams@REL1_44] Fix service name

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