drush cr
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have [error]
requested a non-existent service "plugin.manager.payment.status". Did you mean one of
these: "plugin.manager.sendstate", "plugin.manager.mentions"? in
drupal-8.5.6/html/core/lib/Drupal/Component/DependencyInjection/Container.php:151

Comments

SocialNicheGuru created an issue. See original summary.

OnkelTem’s picture

Same here

tenken’s picture

This module requires the Plugin module and Currency module also maintained by Berdir.

The current release of payment 8.x-2.0-rc5 installs if you have required those modules previously to your project:

composer require 'drupal/plugin:^2.5'
composer require 'drupal/currency:^3.1'
nanabrownee’s picture

installing these hasn't fixed the issue for me

pollegie’s picture

Any update on this?

f2boot’s picture

Looks like there is some kind of race condition through *Plugin* module during installation process.

I got this solved by completely removing Payment (including files !!!!!).
Then completely (re-)installalling "Plugin" and "Currency" modules (did files with composer and enabled both module in the same time with drush).

And only after, installed and enabled Payment.

It looks like Plugin is detecting Payment plugins while the module (and included services) has not been enabled yet. That generates an error blocking proper installation of the other modules required as dependencies (namely Currency). So this may rather be a Plugin module bug...

This means that having Payment installed with composer managing "Plugin" and "Currency" dependencies is giving troubles further in the installation process (and more largely at any cache rebuild).

If correct, the *2 steps* installation process suggested above may be worth a line in Payment readme file.

berdir’s picture

Status: Active » Postponed (maintainer needs more info)

Payment has a dozen functional tests that are enabling all those modules at once, I have an install profile that does the same, I 've no idea how to reproduce this. Could be a race condition in combination with another module.

Can you reproduce on a clean D8/D9 site? What's the full backtrace for that error?

mchamps’s picture

Hi,

Same issue here. The issue has started to happen while trying to enable a new module. Any module.

I did not have payment enabled.
I started having issues with drush cr.

Error message in terminal :
In Container.php line 153:
You have requested a non-existent service "plugin.manager.payment.status".

In my log I have a 2 issues in chronological order :
- php
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "plugin.manager.payment.status". in Drupal\Component\DependencyInjection\Container->get() (line 153 of /home/clients/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php).

- Search API
Message Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException while computing Views data for index Products: You have requested a non-existent service "plugin.plugin_type_manager". in Drupal\Component\DependencyInjection\Container->get() (line 153 of /home/clients/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php).

As suggested above, I deleted the payment module files and it worked straight away.

I checked if plugin or currency were enabled, disabled plugin, left currency disabled.

I have been able to remove completely payment with composer.
It also remove drupal/plugin drupal/currency commercie/currency-exchange commercie/currency
I had to run drush cr after removing.

I check payment, plugin & currency folders have been removed.

I can now install new modules and run drush cr.

I hope it helps!

socialnicheguru’s picture

Status: Postponed (maintainer needs more info) » Active
manishsaharan’s picture

Priority: Normal » Major
StatusFileSize
new189.13 KB

Getting same issue

You have requested a non-existent service "plugin.manager.payment.status".

STR:

  1. Installing module using composer
  2. Drush cr
  3. Navigate to admin/modules
  4. Enabling module Payment, Paypal Payment, Currency and dependent modules

This issue occurred with Drupal 8.9.16 version

Does anyone have any idea how I can resolve this?

socialnicheguru’s picture

Just a workaround.
I have to enable plugin before payment

jacov’s picture

+1
payment module in combination with plugin and currency dependancies creating this fatal error...

trying to get out of it now...took the site down totally....

latest drupal 9 btw

[root@ip-10-0-201-139 web]# ../vendor/drush/drush/drush pmu payment

In Container.php line 156:

  You have requested a non-existent service "plugin.manager.payment.status".

                                                                                                                                                                                  |
[root@ip-10-0-201-139 web]# ../vendor/drush/drush/drush pmu plugin
The following extensions will be uninstalled: plugin, currency
 Do you want to continue? (yes/no) [yes]:

In Container.php line 156:
  You have requested a non-existent service "plugin.manager.payment.status".
                                                                                                                                                                                  |
 /var/app/current/web/core/lib/Drupal/Component/DependencyInjection/Container.php:156
Stack trace:
#0 /var/app/current/web/modules/contrib/payment/src/Entity/Payment/PaymentStorage.php(35): Drupal\Component\DependencyInjection\Container->get('plugin.manager....')
#1 /var/app/current/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(269): Drupal\payment\Entity\Payment\PaymentStorage::createInstance(Object(Drupal\Core\DependencyInjectio
n\Container), Object(Drupal\Core\Entity\ContentEntityType))
#2 /var/app/current/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(258): Drupal\Core\Entity\EntityTypeManager->createHandlerInstance('Drupal\\payment\\...', Object(Drupal\
Core\Entity\ContentEntityType))
#3 /var/app/current/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(192): Drupal\Core\Entity\EntityTypeManager->getHandler('payment', 'storage')
#4 /var/app/current/web/core/modules/field/field.module(197): Drupal\Core\Entity\EntityTypeManager->getStorage('payment')
#5 /var/app/current/web/core/lib/Drupal/Core/Entity/EntityFieldManager.php(411): field_entity_bundle_field_info(Object(Drupal\Core\Entity\ContentEntityType), 'payment', Array)
#6 /var/app/current/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(405): Drupal\Core\Entity\EntityFieldManager->Drupal\Core\Entity\{closure}(Object(Closure), 'field')
#7 /var/app/current/web/core/lib/Drupal/Core/Entity/EntityFieldManager.php(422): Drupal\Core\Extension\ModuleHandler->invokeAllWith('entity_bundle_f...', Object(Closure))
#8 /var/app/current/web/core/lib/Drupal/Core/Entity/EntityFieldManager.php(351): Drupal\Core\Entity\EntityFieldManager->buildBundleFieldDefinitions('payment', 'payment', Array)
#9 /var/app/current/web/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php(323): Drupal\Core\Entity\EntityFieldManager->getFieldDefinitions('payment', 'payment')
#10 /var/app/current/web/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php(157): Drupal\jsonapi\ResourceType\ResourceTypeRepository->getAllFieldNames(Object(Drupal
\Core\Entity\ContentEntityType), 'payment')
#11 /var/app/current/web/modules/contrib/jsonapi_extras/src/ResourceType/ConfigurableResourceTypeRepository.php(134): Drupal\jsonapi\ResourceType\ResourceTypeRepository->createRe
sourceType(Object(Drupal\Core\Entity\ContentEntityType), 'payment')
#12 /var/app/current/web/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php(129): Drupal\jsonapi_extras\ResourceType\ConfigurableResourceTypeRepository->createResou
rceType(Object(Drupal\Core\Entity\ContentEntityType), 'payment')
#13 [internal function]: Drupal\jsonapi\ResourceType\ResourceTypeRepository->Drupal\jsonapi\ResourceType\{closure}(Array, 'payment')
#14 /var/app/current/web/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php(128): array_reduce(Array, Object(Closure), Array)
#15 /var/app/current/web/core/modules/jsonapi/src/Routing/Routes.php(115): Drupal\jsonapi\ResourceType\ResourceTypeRepository->all()
#16 [internal function]: Drupal\jsonapi\Routing\Routes->routes()
#17 /var/app/current/web/core/lib/Drupal/Core/Routing/RouteBuilder.php(146): call_user_func(Array)
#18 /var/app/current/web/core/lib/Drupal/Core/Routing/RouteBuilder.php(210): Drupal\Core\Routing\RouteBuilder->rebuild()
#19 /var/app/current/web/core/lib/Drupal/Core/Routing/RouteBuilder.php(222): Drupal\Core\Routing\RouteBuilder->rebuildIfNeeded()
#20 /var/app/current/web/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php(51): Drupal\Core\Routing\RouteBuilder->destruct()
#21 [internal function]: Drupal\Core\EventSubscriber\KernelDestructionSubscriber->onKernelTerminate(Object(Symfony\Component\HttpKernel\Event\TerminateEvent), 'kernel.terminat...
', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#22 /var/app/current/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\Termina
teEvent), 'kernel.terminat...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#23 /var/app/current/vendor/symfony/http-kernel/HttpKernel.php(103): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\
Event\TerminateEvent), 'kernel.terminat...')
#24 /var/app/current/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request)
, Object(Symfony\Component\HttpFoundation\Response))
#25 /var/app/current/web/core/lib/Drupal/Core/DrupalKernel.php(687): Stack\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component
\HttpFoundation\Response))
#26 /var/app/current/vendor/drush/drush/src/Boot/DrupalBoot8.php(298): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Compon
ent\HttpFoundation\Response))
#27 [internal function]: Drush\Boot\DrupalBoot8->terminate()
#28 {main}
  thrown in /var/app/current/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 156


[root@ip-10-0-201-139 web]# ../vendor/drush/drush/drush cr                                                                                                                        |

In Container.php line 156:

  You have requested a non-existent service "plugin.manager.payment.status".


[root@ip-10-0-201-139 web]# ../vendor/drush/drush/drush ws                                                                                                                        |
 --------- -------------- -------- ---------- ---------------------------------------------------------------------------------------------------------------------
  ID        Date           Type     Severity   Message
 --------- -------------- -------- ---------- ---------------------------------------------------------------------------------------------------------------------
  2100183   31/Oct 00:29   php      Error      Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service
                                               "plugin.manager.payment.status". in Drupal\Component\DependencyInjection
  2100182   31/Oct 00:29   php      Error      Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service
                                               "plugin.manager.payment.status". in Drupal\Component\DependencyInjection
  2100181   31/Oct 00:29   system   Info       currency module uninstalled.
  2100180   31/Oct 00:24   php      Error      Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service
                                               "plugin.manager.payment.status". in Drupal\Component\DependencyInjection
  2100179   31/Oct 00:22   php      Error      Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service
                                               "plugin.manager.payment.status". in Drupal\Component\DependencyInjection
  2100178   31/Oct 00:22   php      Error      Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service
                                               "plugin.manager.payment.status". in Drupal\Component\DependencyInjection


jacov’s picture

OK, THE FIX!!! (workaround)

after the payment module crash, run drush updb and then reinstall will work

[root@ip-10-0-201-139 web]# ../vendor/drush/drush/drush updb
 [warning] Schema information for module currency was missing from the database. You should manually review the module updates and your database to check if any updates have been
 skipped up to, and including, currency_update_8000().                                                                                                                            |
 [warning] Schema information for module plugin was missing from the database. You should manually review the module updates and your database to check if any updates have been s
kipped up to, and including, plugin_update_8001().
 [success] No pending updates.
 [warning] Message: Schema information for module /currency/ was missing from the database. You
should manually review the module updates and your database to check if any
updates have been skipped up to, and including, /currency_update_8000()/.

 [warning] Message: Schema information for module /plugin/ was missing from the database. You
should manually review the module updates and your database to check if any
updates have been skipped up to, and including, /plugin_update_8001()/.

[root@ip-10-0-201-139 web]#
[root@ip-10-0-201-139 web]# ../vendor/drush/drush/drush en plugin                                                                                                                 |
 [notice] Already enabled: plugin
[root@ip-10-0-201-139 web]# ../vendor/drush/drush/drush en currency                                                                                                               |
 [notice] Already enabled: currency
[root@ip-10-0-201-139 web]# ../vendor/drush/drush/drush en payment                                                                                                                |
 [success] Successfully enabled: payment
[root@ip-10-0-201-139 web]# ../vendor/drush/drush/drush cr                                                                                                                        |
 [success] Cache rebuild complete.
[root@ip-10-0-201-139 web]#

jacov’s picture

Problem has resurfaced, and site crashed, no ability to cache rebuild:

[root@ip-10-0-201-249 web]# ../vendor/drush/drush/drush cr

In Container.php line 156:
                                                                              
  You have requested a non-existent service "plugin.manager.payment.status".  
                                                                              

jacov’s picture

no way to uninstall the module either

jacov’s picture

[root@ip-10-0-201-249 web]# ../vendor/drush/drush/drush ws
 --------- -------------- -------- ---------- ------------------------------------------------------------------------------------------------------------------------------ 
  ID        Date           Type     Severity   Message                                                                                                                       
 --------- -------------- -------- ---------- ------------------------------------------------------------------------------------------------------------------------------ 
  2121097   15/Nov 22:23   php      Error      Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service           
                                               "plugin.manager.payment.status". in Drupal\Component\DependencyInjection


[root@ip-10-0-201-249 web]# ../vendor/drush/drush/drush status
Drupal version   : 9.4.8                                                                      
Site URI         : http://default                                                             
DB driver        : mysql                                                                      
....

Database         : Connected                                                                  
Drupal bootstrap : Successful                                                                 
Default theme    : bootstrap_barrio                                                           
Admin theme      : claro                                                                      
PHP binary       : /usr/bin/php                                                               
PHP config       : /etc/php.ini                                                               
PHP OS           : Linux                                                                      
Drush script     : /var/app/current/vendor/drush/drush/drush                                  
Drush version    : 10.6.2                                                                     
Drush temp       : /tmp                                

[root@ip-10-0-201-249 web]# ../vendor/drush/drush/drush pml | grep -E 'payment|plugin|currency'
  Other                             Currency (currency)                                                                 Enabled                    
  Other                             Currency Intl (currency_intl)                                                       Enabled                    
  Testing                           Currency Tests (currency_test)                                                      Disabled                   
  Payment                           Payment Form Field (payment_form)                                                   Disabled   8.x-2.2         
  Payment                           Payment Reference Field (payment_reference)                                         Disabled   8.x-2.2         
  Payment                           Payment Reference Field tests (payment_reference_test)                              Disabled   8.x-2.2         
  Payment                           Payment tests (payment_test)                                                        Disabled   8.x-2.2         
  Payment                           Payment (payment)                                                                   Disabled   8.x-2.2         
  Payment                           PayPal Payment (paypal_payment)                                                     Disabled   8.x-1.0-beta1   
  Other                             Plugin (plugin)                                                                     Enabled                    

sucks!

@Berdir! help ol friend! please!

jacov’s picture

from php-fpm error log:

[15-Nov-2022 17:31:21 America/New_York] Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: "You have requested a non-existent service "plugin.manager.payment.status"." at /var/app/current/web/core/lib/Drupal/Component/DependencyInjection/Container.php line 156
jacov’s picture

finally was able to uninstall the module and get past this error...

will not be using this module again, that's for sure...

using commerce now!!

anyway, to get rid of it, use a combination of

 ./composer.phar remove drupal/paypal_payment
 ./composer.phar remove drupal/payment
 ./composer.phar remove drupal/currency
 ./composer.phar remove drupal/plugin 

while also had to:

mv modules/contrib/payment /home/ec2-user/.
mv modules/contrib/plugin /home/ec2-user/.
mv modules/contrib/paypal_payment /home/ec2-user/.

../vendor/drush/drush/drush pmu currency
../vendor/drush/drush/drush cr
../vendor/drush/drush/drush pmu payment
../vendor/drush/drush/drush cr
../vendor/drush/drush/drush pmu plugin
../vendor/drush/drush/drush cr
../vendor/drush/drush/drush pmu payment
../vendor/drush/drush/drush cr

wow, what a nightmare

socialnicheguru’s picture

I can confirm that you have to physically remove it.

I am also getting this same error with other modules and their plugins.

Is there an issue with the core plugin system perhaps?