drush updatedb returns error

Created on 23 February 2024, 4 months ago
Updated 7 June 2024, 19 days ago

Thanks in advance for helping me.
I have no drupal system experienc, don't know how to start investigating this issue.

Problem/Motivation

I just updated a fresh drupal 10.2.2 to 10.2.3
witt the command

composer require drupal/core-recommended:10.2.3 drupal/core-composer-scaffold:10.2.3 drupal/core-project-message:10.2.3 --update-with-all-dependencies

All went fine.

Next step:
drush updatedb

Result:
In BootstrapHook.php line 32:
Bootstrap failed. Run your command with -vvv for more information.

Steps to reproduce

When running drush updatedb -vvv

I get:

 [preflight] Config paths: /usr/local/drush/vendor/drush/drush/drush.yml
 [preflight] Alias paths: 
 [preflight] Commandfile search paths: /usr/local/drush/vendor/drush/drush/src
 [debug] Starting bootstrap to full [0.12 sec, 2.66 MB]

In BootstrapHook.php line 32:
                                                                      
  [Exception]                                                         
  Bootstrap failed. Run your command with -vvv for more information.  
                                                                      

Exception trace:
  at /usr/local/drush/vendor/drush/drush/src/Boot/BootstrapHook.php:32
 Drush\Boot\BootstrapHook->initialize() at /usr/local/drush/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:44
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook() at /usr/local/drush/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:36
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook() at /usr/local/drush/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:29
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize() at /usr/local/drush/vendor/consolidation/annotated-command/src/CommandProcessor.php:145
 Consolidation\AnnotatedCommand\CommandProcessor->initializeHook() at /usr/local/drush/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:376
 Consolidation\AnnotatedCommand\AnnotatedCommand->initialize() at /usr/local/drush/vendor/symfony/console/Command/Command.php:221
 Symfony\Component\Console\Command\Command->run() at /usr/local/drush/vendor/symfony/console/Application.php:1039
 Symfony\Component\Console\Application->doRunCommand() at /usr/local/drush/vendor/symfony/console/Application.php:275
 Symfony\Component\Console\Application->doRun() at /usr/local/drush/vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /usr/local/drush/vendor/drush/drush/src/Runtime/Runtime.php:118
 Drush\Runtime\Runtime->doRun() at /usr/local/drush/vendor/drush/drush/src/Runtime/Runtime.php:48
 Drush\Runtime\Runtime->run() at /usr/local/drush/vendor/drush/drush/drush.php:72
 require() at /usr/local/drush/vendor/drush/drush/drush:4
 include() at /usr/local/drush/vendor/bin/drush:119

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ’¬ Support request
Status

Postponed: needs info

Version

10.2 ✨

Component
OtherΒ  β†’

Last updated 21 minutes ago

Created by

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 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    Would you please run your command with -vvv for more information?

  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    Based on /usr/local/drush/vendor/bin/drush it looks as though Drush is installed globally on that system, which is not supported by Drush.

  • πŸ‡¬πŸ‡§United Kingdom EM-fast1

    I'm having the same or a similar problem and I'm suing AEgir (BOA variant) multi-platform / multi-site hosting system, which has many versions of drush on it since it can host drupal 7, 9 and 10 cores, and it allows using drush locally per platform. Is this going to be a problem going forward. Since the update to 10.2.3 we can't use drush to do a dbup - and if we try it takes the site down! Errors like this are produced:

    drush updb -y
    Drush command terminated abnormally due to an unrecoverable error. [error]
    Error: Declaration of Drush\Command\DrushInputAdapter::getFirstArgument() must be
    compatible with Symfony\Component\Console\Input\InputInterface::getFirstArgument():
    ?string in /opt/tools/drush/8/drush/lib/Drush/Command/DrushInputAdapter.php, line 54

  • πŸ‡¬πŸ‡§United Kingdom EM-fast1

    drush updb -vvv gives:

    drush updb -vvv
    Drush preflight prepare loaded autoloader at [preflight]
    /opt/tools/drush/8/drush/vendor/autoload.php [0.01 sec, 2.64 MB]
    Starting Drush preflight. [0.01 sec, 2.64 MB] [preflight]
    Cache HIT cid: 8.4.12-commandfiles-0-d533fd30d60aee95db6043a23eaf9fe0 [0.01 sec, 2.91 MB] [debug]
    Loading drushrc "/data/disk/o2/static/d10.2/web/sites/all/drush/drushrc.php" into [bootstrap]
    "drupal" scope. [0.02 sec, 5.45 MB]
    Bootstrap to phase 0. [0.03 sec, 9.28 MB] [bootstrap]
    Bootstrap to phase 2. [0.03 sec, 9.28 MB] [bootstrap]
    Drush bootstrap phase : bootstrap_drupal_root() [0.03 sec, 9.54 MB] [bootstrap]
    Loading drushrc "/data/disk/o2/static/d10.2/web/sites/all/drush/drushrc.php" into [bootstrap]
    "drupal" scope. [0.03 sec, 9.54 MB]
    Initialized Drupal 10.2.4 root directory at /data/disk/o2/static/d10.2/web [0.04 sec, [bootstrap]
    9.54 MB]
    Find command files for phase 1 (max=2) [0.04 sec, 8.01 MB] [debug]
    Cache HIT cid: 8.4.12-commandfiles-1-86a645d09957713ed803dd865afd49f5 [0.04 sec, 8.02 MB] [debug]
    Cache HIT cid: 8.4.12-annotationfiles-1-fb639ed55e74b29b25e00e8124a2c83d [0.04 sec, 8.02 [debug]
    MB]
    Drush bootstrap phase : bootstrap_drupal_site() [0.04 sec, 8.63 MB] [bootstrap]
    Loading drushrc "/data/disk/o2/static/d10.2/web/sites/valid-site/drushrc.php"[bootstrap]
    into "site" scope. [0.04 sec, 8.63 MB]
    Initialized Drupal site valid-site at sites/valid-site [0.05 sec, 10.49[bootstrap]
    MB]
    Find command files for phase 2 (max=2) [0.05 sec, 8.96 MB] [debug]
    Cache MISS cid: 8.4.12-install_profile-8fd1db0132851697bb39b65300700d82 [0.05 sec, 8.96 [debug]
    MB]
    Cache HIT cid: 8.4.12-commandfiles-2-3a468fc63ecb79ec6290d3c1c0a8f0b5 [0.05 sec, 8.96 MB] [debug]
    Found command: updatedb (commandfile=core) [0.05 sec, 8.96 MB] [bootstrap]
    Calling hook drush_core_updatedb [0.05 sec, 10.75 MB] [debug]
    Bootstrap to phase 5. [0.05 sec, 10.87 MB] [bootstrap]
    Drush bootstrap phase : bootstrap_drupal_configuration() [0.05 sec, 10.87 MB] [bootstrap]
    Create from request [0.05 sec, 10.88 MB] [debug]
    add service modifier [0.06 sec, 11.12 MB] [debug]
    Find command files for phase 3 (max=5) [0.06 sec, 9.59 MB] [debug]
    sql-query: SELECT 1; [0.06 sec, 9.73 MB] [notice]
    Executing: mysql --defaults-extra-file=/home/o2.ftp/.tmp/drush_Zz6Vr1 --database=valid-db-name --host=localhost --port=3306 --silent < /home/o2.ftp/.tmp/drush_UvdYT3
    1
    sql-query: SHOW TABLES; [0.06 sec, 9.73 MB] [notice]
    Executing: mysql --defaults-extra-file=/home/o2.ftp/.tmp/drush_G3rHj2 --database=valid-db-name --host=localhost --port=3306 --silent < /home/o2.ftp/.tmp/drush_DQPUt2
    block_content
    block_content__body
    block_content_field_data
    block_content_field_revision
    block_content_revision
    block_content_revision__body
    cache_bootstrap
    cache_config
    cache_container
    cache_data
    cache_default
    cache_discovery
    cache_dynamic_page_cache
    cache_entity
    cache_menu
    cache_page
    cache_render
    cache_toolbar
    cachetags
    comment
    comment__comment_body
    comment_entity_statistics
    comment_field_data
    config
    file_managed
    file_usage
    help_search_items
    history
    key_value
    key_value_expire
    menu_link_content
    menu_link_content_data
    menu_link_content_field_revision
    menu_link_content_revision
    menu_tree
    node
    node__body
    node__comment
    node__field_image
    node__field_tags
    node_access
    node_field_data
    node_field_revision
    node_revision
    node_revision__body
    node_revision__comment
    node_revision__field_image
    node_revision__field_tags
    path_alias
    path_alias_revision
    queue
    router
    search_dataset
    search_index
    search_total
    semaphore
    sequences
    sessions
    shortcut
    shortcut_field_data
    shortcut_set_users
    taxonomy_index
    taxonomy_term__parent
    taxonomy_term_data
    taxonomy_term_field_data
    taxonomy_term_field_revision
    taxonomy_term_revision
    taxonomy_term_revision__parent
    user__roles
    user__user_picture
    users
    users_data
    users_field_data
    watchdog
    Drush bootstrap phase : bootstrap_drupal_database() [0.07 sec, 9.74 MB] [bootstrap]
    Successfully connected to the Drupal database. [0.07 sec, 9.74 MB] [bootstrap]
    Find command files for phase 4 (max=5) [0.07 sec, 9.74 MB] [debug]
    Drush bootstrap phase : bootstrap_drupal_full() [0.07 sec, 9.74 MB] [bootstrap]
    About to bootstrap the Drupal 10 Kernel. [0.07 sec, 9.74 MB] [debug]
    get container builder [0.09 sec, 11.78 MB] [debug]
    service modifier alter [0.09 sec, 11.93 MB] [debug]
    Drush command terminated abnormally due to an unrecoverable error. [error]
    Error: Declaration of Drupal\Core\Logger\LoggerChannel::log($level, $message, array
    $context = []) must be compatible with Psr\Log\LoggerTrait::log($level, Stringable|string
    $message, array $context = []): void in
    /data/disk/o2/static/d10.2/web/core/lib/Drupal/Core/Logger/LoggerChannel.php, line 94
    [0.1 sec, 17.68 MB]

  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    See my comment #3.

  • πŸ‡ΊπŸ‡ΈUnited States xjm

    It should also be noted that Drush is not a part of core, nor technically supported by core. In general, issues with Drush should be reported to Drush. (If we can confirm that a core change broke Drush, then we might revert that change from core until a fix for Drush was ready; however, we would need confirmation of what that change was and it should still get an issue in the Drush queue.)

Production build 0.69.0 2024