In 2 of my 3 Drupal websites, drush updb
crashes with the following error after upgrading from Drupal 9.5.11 to Drupal 10.2.2.
In BatchStorage.php line 143:
[Exception]
Serialization of 'Closure' is not allowed
Exception trace:
at /var/www/html/drupal/web/core/lib/Drupal/Core/Batch/BatchStorage.php:143
serialize() at /var/www/html/drupal/web/core/lib/Drupal/Core/Batch/BatchStorage.php:143
Drupal\Core\Batch\BatchStorage->create() at /var/www/html/drupal/web/core/lib/Drupal/Core/ProxyClass/Batch/BatchStorage.php:107
Drupal\Core\ProxyClass\Batch\BatchStorage->create() at /var/www/html/drupal/web/vendor/drush/drush/includes/batch.inc:146
_drush_backend_batch_process() at /var/www/html/drupal/web/vendor/drush/drush/includes/batch.inc:55
drush_backend_batch_process() at /var/www/html/drupal/web/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php:410
Drush\Commands\core\UpdateDBCommands->updateBatch() at /var/www/html/drupal/web/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php:73
Drush\Commands\core\UpdateDBCommands->updatedb() at n/a:n/a
call_user_func_array() at /var/www/html/drupal/web/vendor/consolidation/annotated-command/src/CommandProcessor.php:276
Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback() at /var/www/html/drupal/web/vendor/consolidation/annotated-command/src/CommandProcessor.php:212
Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() at /var/www/html/drupal/web/vendor/consolidation/annotated-command/src/CommandProcessor.php:176
Consolidation\AnnotatedCommand\CommandProcessor->process() at /var/www/html/drupal/web/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:391
Consolidation\AnnotatedCommand\AnnotatedCommand->execute() at /var/www/html/drupal/web/vendor/symfony/console/Command/Command.php:326
Symfony\Component\Console\Command\Command->run() at /var/www/html/drupal/web/vendor/symfony/console/Application.php:1096
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/drupal/web/vendor/symfony/console/Application.php:324
Symfony\Component\Console\Application->doRun() at /var/www/html/drupal/web/vendor/symfony/console/Application.php:175
Symfony\Component\Console\Application->run() at /var/www/html/drupal/web/vendor/drush/drush/src/Runtime/Runtime.php:110
Drush\Runtime\Runtime->doRun() at /var/www/html/drupal/web/vendor/drush/drush/src/Runtime/Runtime.php:40
Drush\Runtime\Runtime->run() at /var/www/html/drupal/web/vendor/drush/drush/drush.php:139
require() at /var/www/html/drupal/web/vendor/drush/drush/drush:4
include() at /var/www/html/drupal/web/vendor/bin/drush:120
``
Website is not down and I can access the back-end, but it can't stay like this.
I followed [How to upgrade from Drupal 9 to Drupal 10][1].
Do you have any idea?
I'll try to spot differences with my 3rd website which has well supported the upgrade.
[1]: https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/how-to-upgrade-from-drupal-9-to-drupal-10
composer self-update
and thencomposer dump-autoload