Problem/Motivation
Attempted upgrade from 8.x-1.10 to 8.x-1.12 results in a crash and unusable site. The message on the screen is:
The website encountered an unexpected error. Please try again later.
AssertionError: The file specified by the given app root, relative path and file name (/var/www/sites/drupal/modules/contrib/captcha/image_captcha/image_captcha.info.yml) do not exist. in assert() (line 68 of core/lib/Drupal/Core/Extension/Extension.php).
The php8-fpm log says:
[20-Jul-2023 17:06:03] WARNING: [pool www] child 1041 said into stderr: "NOTICE: PHP message: AssertionError: The file specified by the given app root, relative path and file name (/var/www/sites/drupal/modules/contrib/captcha/image_captcha/image_captcha.info.yml) do not exist. in /var/www/sites/drupal/core/lib/Drupal/Core/Extension/Extension.php on line 68 #0 /var/www/sites/drupal/core/lib/Drupal/Core/Extension/Extension.php(68): assert(false, 'The file specif...')"
[20-Jul-2023 17:06:03] WARNING: [pool www] child 1041 said into stderr: "#1 /var/www/sites/drupal/core/lib/Drupal/Core/Extension/ModuleHandler.php(114): Drupal\Core\Extension\Extension->__construct('/var/www/sites/...', 'module', 'modules/contrib...', 'image_captcha.m...')"
[20-Jul-2023 17:06:03] WARNING: [pool www] child 1041 said into stderr: "#2 /var/www/sites/drupal8/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\Core\Extension\ModuleHandler->__construct('/var/www/sites/...', Array, Object(Drupal\Core\Cache\DatabaseBackend))"
[20-Jul-2023 17:06:03] WARNING: [pool www] child 1041 said into stderr: "#3 /var/www/sites/drupal/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'module_handler')"
[20-Jul-2023 17:06:03] WARNING: [pool www] child 1041 said into stderr: "#4 /var/www/sites/drupal..."
Steps to reproduce
I tried to upgrade using Drupal's admin interface, so just logged in, clicked on "Extend" then "Update" tab, clicked the checkbox next to the "CAPTCHA" module, and then clicked on "Download these updates" button.
After restoring the web site from the backup, I also tried upgrading via Composer, but it also failed with the same problem.
I experienced the same with 8.x-1.11 upgrade when I tried the other day.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes