PackageManagerUninstallValidatorUnable to update after uninstall

Created on 16 January 2023, over 1 year ago
Updated 16 May 2023, about 1 year ago

Installed Automatic Updates via Composer and enabled.
Uninstalled again as I realised that my site didn't meet the requirements - namely running a multi-site config.

When I run update.php, I get a missing module issue of Package_Manager.

Errors found
MISSING OR INVALID MODULE
The following module is marked as installed in the core.extension configuration, but it is missing:
package_manager
Review the suggestions for resolving this incompatibility to repair your installation, and then re-run update.php.

I cannot enter the Extent / Update / Install pages of my site - "The website encountered an unexpected error. Please try again later.The website encountered an unexpected error. Please try again later."

[Mon Jan 16 11:42:30.962791 2023] [php:notice] [pid 365104] [client 192.168.1.9:38884] Error: Class "Drupal\\package_manager\\PackageManagerUninstallValidator" not found in /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 #0 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\\Component\\DependencyInjection\\Container->createService()\n#1 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(434): Drupal\\Component\\DependencyInjection\\Container->get()\n#2 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(273): Drupal\\Component\\DependencyInjection\\Container->resolveServicesAndParameters()\n#3 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\\Component\\DependencyInjection\\Container->createService()\n#4 /var/www/html/drupal/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(64): Drupal\\Component\\DependencyInjection\\Container->get()\n#5 /var/www/html/drupal/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(99): Drupal\\Core\\ProxyClass\\Extension\\ModuleInstaller->lazyLoadItself()\n#6 /var/www/html/drupal/web/core/modules/system/src/Form/ModulesUninstallForm.php(151): Drupal\\Core\\ProxyClass\\Extension\\ModuleInstaller->validateUninstall()\n#7 [internal function]: Drupal\\system\\Form\\ModulesUninstallForm->buildForm()\n#8 /var/www/html/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(534): call_user_func_array()\n#9 /var/www/html/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(281): Drupal\\Core\\Form\\FormBuilder->retrieveForm()\n#10 /var/www/html/drupal/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\\Core\\Form\\FormBuilder->buildForm()\n#11 [internal function]: Drupal\\Core\\Controller\\FormController->getContentResult()\n#12 /var/www/html/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()\n#13 /var/www/html/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}()\n#14 /var/www/html/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\\Core\\Render\\Renderer->executeInRenderContext()\n#15 /var/www/html/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()\n#16 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}()\n#17 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()\n#18 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\\Component\\HttpKernel\\HttpKernel->handle()\n#19 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\\Core\\StackMiddleware\\Session->handle()\n#20 /var/www/html/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle()\n#21 /var/www/html/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\\page_cache\\StackMiddleware\\PageCache->pass()\n#22 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\\page_cache\\StackMiddleware\\PageCache->handle()\n#23 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle()\n#24 /var/www/html/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle()\n#25 /var/www/html/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(713): Stack\\StackedHttpKernel->handle()\n#26 /var/www/html/drupal/web/index.php(19): Drupal\\Core\\DrupalKernel->handle()\n#27 {main}

I can install Package_Manager on its own, but I now get the following issue:
[Mon Jan 16 11:36:48.689473 2023] [php:notice] [pid 365085] [client 192.168.1.9:39946] Uncaught PHP Exception Symfony\\Component\\DependencyInjection\\Exception\\LogicException: "Service 'drupal.proxy_original_service.package_manager.uninstall_validator' for consumer 'config_import_subscriber' does not implement Drupal\\Core\\Extension\\ModuleUninstallValidatorInterface." at /var/www/html/drupal/web/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php line 182

πŸ› Bug report
Status

Postponed: needs info

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom onetoomany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Postponed: needs info over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA
  • πŸ‡ΊπŸ‡ΈUnited States Adrianm6254

    I ran into the same issue. This is not a multidev.

    I am using Core 10.0.8
    automatic_updates 8.x-2.7

    I installed automatic_updates using ddev composer require drupal/automatic_updates

    Next I run ddev drush pm:install automatic_updates and I get the following error:

    In CheckExceptionOnInvalidReferenceBehaviorPass.php line 83:
                                                                                                                                                                                        
      The service "project_browser.composer_validator.core_not_updated" has a dependency on a non-existent service "Drupal\package_manager\PathLocator". Did you mean this: "package_manager.path_locator"?                                                                                                                                                            
                                                                                                                                                                                        
    Failed to run drush pm:install automatic_updates: exit status 1

    I uninstalled auromatic_updates using ddev drush pm:uninstall automatic_updates and I get this message:

    In PmCommands.php line 177:
                                                                                              
      The following module(s) are not installed: automatic_updates. No modules to uninstall.  
                                                                                             
    Failed to run drush pm:uninstall automatic_updates: exit status 1

    I remove the module using ddev composer remove drupal/automatic_updates

    After uninstalling automatic_updates when I run database update ddev drush updb I get this error:

     [error]   (Currently using Missing or invalid modules The following modules are marked as installed in the core.extension configuration, but they are missing:
     * automatic_updates
     * package_manager
    
    Review the  suggestions for resolving this incompatibility [1] to repair your installation, and then re-run update.php.
    
    [1] https://www.drupal.org/docs/updating-drupal/troubleshooting-database-updates) 
    
     // Requirements check reports errors. Do you wish to continue?: yes.
  • πŸ‡ΊπŸ‡ΈUnited States Adrianm6254
  • πŸ‡ΊπŸ‡ΈUnited States Adrianm6254
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Project Browser is only compatible with Automatic Updates 3.0.x now. I think they were going to add a conflict with 2.x in their composer.json, in order to prevent the situation you're running into, but I'm not sure if they've done that yet.

    Anyway, you should be able to clear caches if you install drupal/automatic_updates:3.0.x-dev.

  • πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA
Production build 0.69.0 2024