hechoendrupal / drupal-console

The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.
http://drupalconsole.com
GNU General Public License v2.0
940 stars 559 forks source link

[console] Error when running any command #3281

Closed ismailcherri closed 7 years ago

ismailcherri commented 7 years ago

I'm getting the following error when I try to run any console command:

Recoverable fatal error: Argument 2 passed to Drupal\Console\Command\Config\ExportCommand::__construct() must implement interface Drupal\Core\Config\StorageInterface, none given in /vendor/drupal/console/src/Command/Config/ExportCommand.php on line 43 #0 /web/core/includes/bootstrap.inc(552): _drupal_error_handler_real(4096, 'Argument 2 pass...', '/mnt/c/Users/is...', 43, Array)
#1 /vendor/drupal/console/src/Command/Config/ExportCommand.php(43): _drupal_error_handler(4096, 'Argument 2 pass...', '/mnt/c/Users/is...', 43, Array)
#2 [internal function]: Drupal\Console\Command\Config\ExportCommand->__construct(Object(Drupal\Core\Config\ConfigManager))
#3 /vendor/symfony/dependency-injection/ContainerBuilder.php(936): ReflectionClass->newInstanceArgs(Array)
#4 /vendor/symfony/dependency-injection/ContainerBuilder.php(476): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), 'console.config_...')
#5 /vendor/drupal/console/src/Application.php(170): Symfony\Component\DependencyInjection\ContainerBuilder->get('console.config_...')
#6 /vendor/drupal/console/src/Application.php(41): Drupal\Console\Application->registerCommands()
#7 /vendor/symfony/console/Application.php(123): Drupal\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /vendor/drupal/console/bin/drupal.php(68): Symfony\Component\Console\Application->run()
#9 /vendor/drupal/console/bin/drupal(4): require('/mnt/c/Users/is...')
#10 {main}
Recoverable fatal error: Argument 2 passed to Drupal\Console\Command\Config\ExportCommand::__construct() must implement interface Drupal\Core\Config\StorageInterface, none given in Drupal\Console\Command\Config\ExportCommand->__construct() (line 43 of /vendor/drupal/console/src/Command/Config/ExportCommand.php).

Console version: 1.0.0-rc17 Drupal version: 8.3.1

 Package                          Name                                                             Type    Status         Version
 Administration                   Admin Toolbar (admin_toolbar)                                    Module  Enabled        8.x-1.19
 Administration                   Admin Toolbar Extra Tools (admin_toolbar_tools)                  Module  Enabled        8.x-1.19
 Chaos tool suite                 Chaos tools (ctools)                                             Module  Enabled        8.x-3.0-beta2
 Chaos tool suite (Experimental)  Chaos tools blocks (ctools_block)                                Module  Enabled        8.x-3.0-beta2
 Chaos tool suite (Experimental)  Chaos tools Views (ctools_views)                                 Module  Enabled        8.x-3.0-beta2
 Core                             Actions (action)                                                 Module  Not installed  8.3.1
 Core                             Activity Tracker (tracker)                                       Module  Not installed  8.3.1
 Core                             Aggregator (aggregator)                                          Module  Not installed  8.3.1
 Core                             Automated Cron (automated_cron)                                  Module  Enabled        8.3.1
 Core                             Ban (ban)                                                        Module  Not installed  8.3.1
 Core                             BigPipe (big_pipe)                                               Module  Not installed  8.3.1
 Core                             Block (block)                                                    Module  Enabled        8.3.1
 Core                             Book (book)                                                      Module  Not installed  8.3.1
 Core                             Breakpoint (breakpoint)                                          Module  Enabled        8.3.1
 Core                             CKEditor (ckeditor)                                              Module  Enabled        8.3.1
 Core                             Color (color)                                                    Module  Not installed  8.3.1
 Core                             Comment (comment)                                                Module  Not installed  8.3.1
 Core                             Configuration Manager (config)                                   Module  Enabled        8.3.1
 Core                             Contact (contact)                                                Module  Not installed  8.3.1
 Core                             Contextual Links (contextual)                                    Module  Enabled        8.3.1
 Core                             Custom Block (block_content)                                     Module  Enabled        8.3.1
 Core                             Custom Menu Links (menu_link_content)                            Module  Enabled        8.3.1
 Core                             Database Logging (dblog)                                         Module  Enabled        8.3.1
 Core                             Field (field)                                                    Module  Enabled        8.3.1
 Core                             Field UI (field_ui)                                              Module  Enabled        8.3.1
 Core                             Filter (filter)                                                  Module  Enabled        8.3.1
 Core                             Forum (forum)                                                    Module  Not installed  8.3.1
 Core                             Help (help)                                                      Module  Not installed  8.3.1
 Core                             History (history)                                                Module  Not installed  8.3.1
 Core                             Internal Dynamic Page Cache (dynamic_page_cache)                 Module  Enabled        8.3.1
 Core                             Internal Page Cache (page_cache)                                 Module  Enabled        8.3.1
 Core                             Menu UI (menu_ui)                                                Module  Enabled        8.3.1
 Core                             Node (node)                                                      Module  Enabled        8.3.1
 Core                             Path (path)                                                      Module  Enabled        8.3.1
 Core                             Quick Edit (quickedit)                                           Module  Not installed  8.3.1
 Core                             RDF (rdf)                                                        Module  Enabled        8.3.1
 Core                             Responsive Image (responsive_image)                              Module  Enabled        8.3.1
 Core                             Search (search)                                                  Module  Not installed  8.3.1
 Core                             Shortcut (shortcut)                                              Module  Enabled        8.3.1
 Core                             Statistics (statistics)                                          Module  Not installed  8.3.1
 Core                             Syslog (syslog)                                                  Module  Not installed  8.3.1
 Core                             System (system)                                                  Module  Enabled        8.3.1
 Core                             Taxonomy (taxonomy)                                              Module  Enabled        8.3.1
 Core                             Testing (simpletest)                                             Module  Not installed  8.3.1
 Core                             Text Editor (editor)                                             Module  Enabled        8.3.1
 Core                             Toolbar (toolbar)                                                Module  Enabled        8.3.1
 Core                             Tour (tour)                                                      Module  Not installed  8.3.1
 Core                             Update Manager (update)                                          Module  Enabled        8.3.1
 Core                             User (user)                                                      Module  Enabled        8.3.1
 Core                             Views (views)                                                    Module  Enabled        8.3.1
 Core                             Views UI (views_ui)                                              Module  Enabled        8.3.1
 Core (Experimental)              Content Moderation (content_moderation)                          Module  Not installed  8.3.1
 Core (Experimental)              Datetime Range (datetime_range)                                  Module  Not installed  8.3.1
 Core (Experimental)              Field Layout (field_layout)                                      Module  Not installed  8.3.1
 Core (Experimental)              Inline Form Errors (inline_form_errors)                          Module  Not installed  8.3.1
 Core (Experimental)              Layout Discovery (layout_discovery)                              Module  Not installed  8.3.1
 Core (Experimental)              Migrate (migrate)                                                Module  Not installed  8.3.1
 Core (Experimental)              Migrate Drupal (migrate_drupal)                                  Module  Not installed  8.3.1
 Core (Experimental)              Migrate Drupal UI (migrate_drupal_ui)                            Module  Not installed  8.3.1
 Core (Experimental)              Place Blocks (block_place)                                       Module  Not installed  8.3.1
 Core (Experimental)              Settings Tray (outside_in)                                       Module  Not installed  8.3.1
 Core (Experimental)              Workflows (workflows)                                            Module  Not installed  8.3.1
 Development                      Devel (devel)                                                    Module  Enabled        8.x-1.0-rc2
 Development                      Devel generate (devel_generate)                                  Module  Not installed  8.x-1.0-rc2
 Development                      Devel Kint (kint)                                                Module  Enabled        8.x-1.0-rc2
 Development                      Web Profiler (webprofiler)                                       Module  Not installed  8.x-1.0-rc2
 Field                            Jquery Colorpicker (jquery_colorpicker)                          Module  Enabled        8.x-1.3
 Field types                      Datetime (datetime)                                              Module  Enabled        8.3.1
 Field types                      Entity Reference Revisions (entity_reference_revisions)          Module  Enabled        8.x-1.2
 Field types                      File (file)                                                      Module  Enabled        8.3.1
 Field types                      Image (image)                                                    Module  Enabled        8.3.1
 Field types                      Link (link)                                                      Module  Enabled        8.3.1
 Field types                      Options (options)                                                Module  Enabled        8.3.1
 Field types                      SVG formatter (svg_formatter)                                    Module  Not installed  8.x-1.04
 Field types                      Telephone (telephone)                                            Module  Not installed  8.3.1
 Field types                      Text (text)                                                      Module  Enabled        8.3.1
 Fields                           Field Group (field_group)                                        Module  Enabled        8.x-1.0-rc6
 Media                            Colorbox (colorbox)                                              Module  Enabled        8.x-1.3
 Migrate                          Field Group Migrate (field_group_migrate)                        Module  Not installed  8.x-1.0-rc6
 Multilingual                     Configuration Translation (config_translation)                   Module  Enabled        8.3.1
 Multilingual                     Content Translation (content_translation)                        Module  Enabled        8.3.1
 Multilingual                     Interface Translation (locale)                                   Module  Enabled        8.3.1
 Multilingual                     Language (language)                                              Module  Enabled        8.3.1
 Other                            Link class (link_class)                                          Module  Enabled        8.x-1.3
 Other                            Pathauto (pathauto)                                              Module  Enabled        8.x-1.0-rc1
 Other                            Token (token)                                                    Module  Enabled        8.x-1.0-rc1
 Paragraphs                       Paragraphs (paragraphs)                                          Module  Enabled        8.x-1.1
 Paragraphs                       Paragraphs Demo (paragraphs_demo)                                Module  Not installed  8.x-1.1
 Paragraphs                       Paragraphs Type Permissions (paragraphs_type_permissions)        Module  Enabled        8.x-1.1
 SEO                              Metatag (metatag)                                                Module  Enabled        8.x-1.0
 SEO                              Metatag: App Links (metatag_app_links)                           Module  Not installed  8.x-1.0
 SEO                              Metatag: Dublin Core (metatag_dc)                                Module  Not installed  8.x-1.0
 SEO                              Metatag: Dublin Core Advanced (metatag_dc_advanced)              Module  Not installed  8.x-1.0
 SEO                              Metatag: Facebook (metatag_facebook)                             Module  Not installed  8.x-1.0
 SEO                              Metatag: favicons (metatag_favicons)                             Module  Not installed  8.x-1.0
 SEO                              Metatag: Google Custom Search Engine (CSE) (metatag_google_cse)  Module  Not installed  8.x-1.0
 SEO                              Metatag: Google Plus (metatag_google_plus)                       Module  Not installed  8.x-1.0
 SEO                              Metatag: hreflang (metatag_hreflang)                             Module  Not installed  8.x-1.0
 SEO                              Metatag: Mobile & UI Adjustments (metatag_mobile)                Module  Not installed  8.x-1.0
 SEO                              Metatag: Open Graph (metatag_open_graph)                         Module  Not installed  8.x-1.0
 SEO                              Metatag: Open Graph Products (metatag_open_graph_products)       Module  Not installed  8.x-1.0
 SEO                              Metatag: Twitter Cards (metatag_twitter_cards)                   Module  Not installed  8.x-1.0
 SEO                              Metatag: Verification (metatag_verification)                     Module  Not installed  8.x-1.0
 Social                           Instagram Block (instagram_block)                                Module  Enabled
 User Interface                   Ajax Loader (ajax_loader)                                        Module  Not installed  8.x-1.3
 Video Embed Field                Video Embed Field (video_embed_field)                            Module  Enabled        8.x-1.4
 Video Embed Field                Video Embed Media (video_embed_media)                            Module  Not installed  8.x-1.4
 Video Embed Field                Video Embed WYSIWYG (video_embed_wysiwyg)                        Module  Not installed  8.x-1.4
 Web services                     HAL (hal)                                                        Module  Not installed  8.3.1
 Web services                     HTTP Basic Authentication (basic_auth)                           Module  Not installed  8.3.1
 Web services                     RESTful Web Services (rest)                                      Module  Not installed  8.3.1
 Web services                     Serialization (serialization)                                    Module  Not installed  8.3.1
 Core                             Bartik (bartik)                                                  Theme   Enabled        8.3.1
 Core                             Seven (seven)                                                    Theme   Enabled        8.3.1
 Core                             Stark (stark)                                                    Theme   Disabled       8.3.1
ismailcherri commented 7 years ago

similar to https://github.com/hechoendrupal/drupal-console/issues/3282

peschee commented 7 years ago

Same issue here (same Drupal console and Drupal core versions).

jmolivas commented 7 years ago

Try updating to latest DrupalConsole, executing from the site root directory

composer update drupal/console --with-dependencies

If using the Launcher, try updating it by executing from outside of site root directory:

drupal self-update

And finally rebuild cache executing from your drupal site:

drupal cr all
ismailcherri commented 7 years ago

@jmolivas It worked! I ran composer update and drupal cr all from the site directory and it works now. Console version now is Drupal Console version 1.0.0-rc17 Many thanks :)

jmolivas commented 7 years ago

@ismailcherri Closing this one. Feel free to re-open if still happening after updating to the latest version.

MatteoBorgognoni commented 7 years ago

@jmolivas this is still happening for me even after the suggeseted steps. Just updated to 1.0.0-rc19

jmolivas commented 7 years ago

@ismailcherri @peschee @MatteoBorgognoni please clear DrupalConsole cache by executing:

drupal cr all
MatteoBorgognoni commented 7 years ago

@jmolivas I've already done that but the problem still there

jmolivas commented 7 years ago

@MatteoBorgognoni did you updated the Launcher as well?

MatteoBorgognoni commented 7 years ago

@jmolivas I followed this:

composer update drupal/console --with-dependencies drupal self-update (on global console) drupal cr all

but the issue still happening

msypes commented 7 years ago

Same here. Followed the pattern of updating the console locally (core is rc21), self-updated launcher to rc25, drush cr all (drupal core is 8.3.5) Just running drupal --version still getting
Argument 2 passed to Drupal\Console\Command\Config\ExportCommand::construct() must implement interface Drupal\Core\Config\StorageInterface, none given in ...vendor/drupal/console/src/Command/Config/ExportCommand.php on line 43 and Argument 2 passed to Drupal\Console\Command\Config\ExportCommand::construct() must implement interface Drupal\Core\Config\StorageInterface, none given in Drupal\Console\Command\Config\ExportCommand->__construct() (line 43 of ...vendor/drupal/console/src/Command/Config/ExportCommand.php).

SOLVED: Following advice at https://github.com/hechoendrupal/drupal-console/issues/3352#issuecomment-309699952, I deleted ~/.console and I'm back in business