Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplycated key entry prvents drush from doing it's job #4577

Closed
horvan opened this issue Oct 21, 2020 · 5 comments
Closed

Duplycated key entry prvents drush from doing it's job #4577

horvan opened this issue Oct 21, 2020 · 5 comments

Comments

@horvan
Copy link

horvan commented Oct 21, 2020

Describe the bug
Drush 10.x doesnt work on several commands because of duplicated key entfry somewhere
To Reproduce
What did you do?

Installed Drupal 9.07
installed drupal console and drush 10.x with wold like to reset password by using upwd or enable a module by useing en. Instead teh commands work the error message I got is the following

drupal@drupal:/var/www/drupal$ bin/drush -vvv --uri  htp://drupal uli admin
 [preflight] Config paths: /var/www/drupal/vendor/drush/drush/drush.yml
 [preflight] Alias paths: /var/www/drupal/docroot/drush/sites,/var/www/drupal/drush/sites
 [preflight] Commandfile search paths: /var/www/drupal/vendor/drush/drush/src
 [debug] Starting bootstrap to none [0.16 sec, 9.76 MB]
 [debug] Drush bootstrap phase 0 [0.16 sec, 9.76 MB]
 [debug] Try to validate bootstrap phase 0 [0.16 sec, 9.76 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalRoot() [0.16 sec, 9.85 MB]
 [debug] Change working directory to /var/www/drupal/docroot [0.16 sec, 9.85 MB]
 [debug] Initialized Drupal 9.0.7 root directory at /var/www/drupal/docroot [0.16 sec, 9.95 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalSite() [0.17 sec, 10.33 MB]
 [debug] Initialized Drupal site drupal at sites/default [0.17 sec, 10.5 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalConfiguration() [0.17 sec, 10.5 MB]
 [debug] Add service modifier [0.18 sec, 10.67 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalDatabase() [0.18 sec, 11.1 MB]
 [debug] Successfully connected to the Drupal database. [0.18 sec, 11.1 MB]
 [debug] Drush bootstrap phase: bootstrapDrupalFull() [0.18 sec, 11.1 MB]
 [debug] Start bootstrap of the Drupal Kernel. [0.18 sec, 11.1 MB]
 [debug] Found drush.services.yml for checklistapi Drush commands [0.36 sec, 14.98 MB]
 [debug] ckeditor_media_embed commands loaded even though its constraint (^9) is incompatible with Drush 10.3.5. Broaden the constraint in modules/contrib/ckeditor_media_embed/composer.json (see 'extra\drush\services' section) to remove this message. [0.36 sec, 14.99 MB]
 [debug] default_content commands loaded even though its constraint (^9) is incompatible with Drush 10.3.5. Broaden the constraint in modules/contrib/default_content/composer.json (see 'extra\drush\services' section) to remove this message. [0.36 sec, 14.99 MB]
 [debug] entity_usage commands loaded even though its constraint (^9) is incompatible with Drush 10.3.5. Broaden the constraint in modules/contrib/entity_usage/composer.json (see 'extra\drush\services' section) to remove this message. [0.37 sec, 14.98 MB]
 [debug] scheduler commands loaded even though its constraint (^9) is incompatible with Drush 10.3.5. Broaden the constraint in modules/contrib/scheduler/composer.json (see 'extra\drush\services' section) to remove this message. [0.37 sec, 14.98 MB]
 [debug] Found drush.services.yml for simple_sitemap Drush commands [0.37 sec, 14.98 MB]
 [debug] Found drush.services.yml for token Drush commands [0.37 sec, 14.98 MB]
 [debug] Found drush.services.yml for ultimate_cron Drush commands [0.37 sec, 14.98 MB]
 [info] update_helper should have an extra.drush.services section in its composer.json. See http://docs.drush.org/en/10.x/commands/#specifying-the-services-file. [0.37 sec, 14.98 MB]
 [info] update_helper_checklist should have an extra.drush.services section in its composer.json. See http://docs.drush.org/en/10.x/commands/#specifying-the-services-file. [0.37 sec, 14.98 MB]
 [info] varbase_update_helper should have an extra.drush.services section in its composer.json. See http://docs.drush.org/en/10.x/commands/#specifying-the-services-file. [0.37 sec, 14.98 MB]
 [debug] Found drush.services.yml for views_bulk_operations Drush commands [0.37 sec, 14.99 MB]
 [debug] webform commands loaded even though its constraint (^9) is incompatible with Drush 10.3.5. Broaden the constraint in modules/contrib/webform/composer.json (see 'extra\drush\services' section) to remove this message. [0.37 sec, 14.99 MB]
 [debug] Found drush.services.yml for pathauto Drush commands [0.37 sec, 14.99 MB]
 [debug] Get container builder [0.37 sec, 14.99 MB]
 [debug] Service modifier alter. [0.38 sec, 15.09 MB]

**In YamlSymfony.php line 40:**
                                                                       
  [Drupal\Component\Serialization\Exception\InvalidDataTypeException]  
  Duplicate key "services" detected at line 6.                         
                                                                       

Exception trace:
  at /var/www/drupal/docroot/core/lib/Drupal/Component/Serialization/YamlSymfony.php:40
 Drupal\Component\Serialization\YamlSymfony::decode() at /var/www/drupal/docroot/core/lib/Drupal/Component/Serialization/Yaml.php:35
 Drupal\Component\Serialization\Yaml::decode() at /var/www/drupal/docroot/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php:336
 Drupal\Core\DependencyInjection\YamlFileLoader->loadFile() at /var/www/drupal/docroot/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php:63
 Drupal\Core\DependencyInjection\YamlFileLoader->load() at /var/www/drupal/docroot/core/lib/Drupal/Core/DrupalKernel.php:1262
 Drupal\Core\DrupalKernel->compileContainer() at /var/www/drupal/docroot/core/lib/Drupal/Core/DrupalKernel.php:897
 Drupal\Core\DrupalKernel->initializeContainer() at /var/www/drupal/vendor/drush/drush/src/Drupal/DrupalKernelTrait.php:69
 Drush\Drupal\DrupalKernel->initializeContainer() at /var/www/drupal/docroot/core/lib/Drupal/Core/DrupalKernel.php:470
 Drupal\Core\DrupalKernel->boot() at /var/www/drupal/vendor/drush/drush/src/Boot/DrupalBoot8.php:240
 Drush\Boot\DrupalBoot8->bootstrapDrupalFull() at /var/www/drupal/vendor/drush/drush/src/Boot/BootstrapManager.php:293
 Drush\Boot\BootstrapManager->doBootstrap() at /var/www/drupal/vendor/drush/drush/src/Commands/core/LoginCommands.php:54
 Drush\Commands\core\LoginCommands->login() at n/a:n/a
 call_user_func_array() at /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:257
 Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback() at /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:212
 Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() at /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:176
 Consolidation\AnnotatedCommand\CommandProcessor->process() at /var/www/drupal/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:311
 Consolidation\AnnotatedCommand\AnnotatedCommand->execute() at /var/www/drupal/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /var/www/drupal/vendor/symfony/console/Application.php:1027
 Symfony\Component\Console\Application->doRunCommand() at /var/www/drupal/vendor/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at /var/www/drupal/vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /var/www/drupal/vendor/drush/drush/src/Runtime/Runtime.php:118
 Drush\Runtime\Runtime->doRun() at /var/www/drupal/vendor/drush/drush/src/Runtime/Runtime.php:49
 Drush\Runtime\Runtime->run() at /var/www/drupal/vendor/drush/drush/drush.php:72
 require() at /var/www/drupal/vendor/drush/drush/drush:4

**In Parser.php line 335:**
                                                     
  [Symfony\Component\Yaml\Exception\ParseException]  
  Duplicate key "services" detected at line 6.       
                                                     

Exception trace:
  at /var/www/drupal/vendor/symfony/yaml/Parser.php:335
 Symfony\Component\Yaml\Parser->doParse() at /var/www/drupal/vendor/symfony/yaml/Parser.php:95
 Symfony\Component\Yaml\Parser->parse() at /var/www/drupal/docroot/core/lib/Drupal/Component/Serialization/YamlSymfony.php:37
 Drupal\Component\Serialization\YamlSymfony::decode() at /var/www/drupal/docroot/core/lib/Drupal/Component/Serialization/Yaml.php:35
 Drupal\Component\Serialization\Yaml::decode() at /var/www/drupal/docroot/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php:336
 Drupal\Core\DependencyInjection\YamlFileLoader->loadFile() at /var/www/drupal/docroot/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php:63
 Drupal\Core\DependencyInjection\YamlFileLoader->load() at /var/www/drupal/docroot/core/lib/Drupal/Core/DrupalKernel.php:1262
 Drupal\Core\DrupalKernel->compileContainer() at /var/www/drupal/docroot/core/lib/Drupal/Core/DrupalKernel.php:897
 Drupal\Core\DrupalKernel->initializeContainer() at /var/www/drupal/vendor/drush/drush/src/Drupal/DrupalKernelTrait.php:69
 Drush\Drupal\DrupalKernel->initializeContainer() at /var/www/drupal/docroot/core/lib/Drupal/Core/DrupalKernel.php:470
 Drupal\Core\DrupalKernel->boot() at /var/www/drupal/vendor/drush/drush/src/Boot/DrupalBoot8.php:240
 Drush\Boot\DrupalBoot8->bootstrapDrupalFull() at /var/www/drupal/vendor/drush/drush/src/Boot/BootstrapManager.php:293
 Drush\Boot\BootstrapManager->doBootstrap() at /var/www/drupal/vendor/drush/drush/src/Commands/core/LoginCommands.php:54
 Drush\Commands\core\LoginCommands->login() at n/a:n/a
 call_user_func_array() at /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:257
 Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback() at /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:212
 Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() at /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:176
 Consolidation\AnnotatedCommand\CommandProcessor->process() at /var/www/drupal/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:311
 Consolidation\AnnotatedCommand\AnnotatedCommand->execute() at /var/www/drupal/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /var/www/drupal/vendor/symfony/console/Application.php:1027
 Symfony\Component\Console\Application->doRunCommand() at /var/www/drupal/vendor/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at /var/www/drupal/vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /var/www/drupal/vendor/drush/drush/src/Runtime/Runtime.php:118
 Drush\Runtime\Runtime->doRun() at /var/www/drupal/vendor/drush/drush/src/Runtime/Runtime.php:49
 Drush\Runtime\Runtime->run() at /var/www/drupal/vendor/drush/drush/drush.php:72
 require() at /var/www/drupal/vendor/drush/drush/drush:4

user:login [--name [NAME]] [--uid [UID]] [--mail [MAIL]] [--browser [BROWSER]] [--redirect-port REDIRECT-PORT] [--no-browser] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--xh-link XH-LINK] [--notify [NOTIFY]] [--druplicon] [--] <command> [<path>]

drupal@drupal:/var/www/drupal$ 

Expected behavior

What did you expect would happen?

´change password for user show one time login link ect.

Actual behavior
What happened instead?
See output above

Workaround
Use Drupals UI instead of drush

System Configuration

Q A
Drush version? 10.x (please be specific, and try latest release)
Drupal version? 9.x
PHP version 7.x,
OS? Linux

Additional information
Here is the combination of consle/drush that happens with

"require-dev": {
    "drupal/console": "~1.9",
    "drush/drush": "~10.0"
  },
@greg-1-anderson
Copy link
Member

Haven't seen this before. Could you try to reproduce, first with a fresh Drupal 9 site and Drush only, and, if that works, add Drupal Console and try again?

I'd be surprised if Drupal Console caused this sort of error. Looks like a site-specific problem to me, but IDK.

@greg-1-anderson
Copy link
Member

Perhaps related to one of these modules:

 [debug] Found drush.services.yml for simple_sitemap Drush commands [0.37 sec, 14.98 MB]
 [debug] Found drush.services.yml for token Drush commands [0.37 sec, 14.98 MB]
 [debug] Found drush.services.yml for ultimate_cron Drush commands [0.37 sec, 14.98 MB]

@horvan
Copy link
Author

horvan commented Oct 21, 2020

On my way. Will report back.

@ryanaslett
Copy link

This is probably a console bug: hechoendrupal/drupal-console#4273

@horvan
Copy link
Author

horvan commented Oct 22, 2020

IÄve instakked drupal 9 drush and drupal console now without any modules. So It's crea. This si not a drush error. This can be closed now. Because drush does not cause that problem. It's drupal module. Thank you @greg-1-anderson for pointiong me in the right direction.

@horvan horvan closed this as completed Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants