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

Fatal error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() #1760

Closed
captainQW opened this issue Nov 10, 2015 · 12 comments
Closed

Comments

@captainQW
Copy link

Fatal error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in /usr/local/drush/drush/drush/includes/drupal.inc on line 41
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in /usr/local/drush/drush/drush/includes/drupal.inc,
line 41

Drush Version : 8.0.0-rc3
drupal version: 8.0.0-rc3
os: mac osx 10.11.1

@captainQW
Copy link
Author

PHP Fatal error: Uncaught Error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in /usr/local/drush/drush/drush/drush/includes/drupal.inc:41
Stack trace:
#0 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(264): drush_drupal_version('/Users/panjunli...')
#1 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(412): Drush\Boot\DrupalBoot->bootstrap_drupal_root_validate()
#2 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(451): drush_bootstrap_validate(1)
#3 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(54): drush_bootstrap_to_phase(6)
#4 /usr/local/drush/drush/drush/drush/includes/preflight.inc(64): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#5 /usr/local/drush/drush/drush/drush/drush.php(12): drush_main()
#6 {main}
thrown in /usr/local/drush/drush/drush/drush/includes/drupal.inc on line 41
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Uncaught Error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in
/usr/local/drush/drush/drush/drush/includes/drupal.inc:41
Stack trace:
#0 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(264): drush_drupal_version('/Users/panjunli...')
#1 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(412): Drush\Boot\DrupalBoot->bootstrap_drupal_root_validate()
#2 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(451): drush_bootstrap_validate(1)
#3 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(54): drush_bootstrap_to_phase(6)
#4 /usr/local/drush/drush/drush/drush/includes/preflight.inc(64): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#5 /usr/local/drush/drush/drush/drush/drush.php(12): drush_main()
#6 {main}
thrown in /usr/local/drush/drush/drush/drush/includes/drupal.inc, line 41

@weitzman
Copy link
Member

please post full log with --debug, including the command you are running.

@quicksketch
Copy link
Contributor

This is odd because the get_version() method is definitely there in the code: https://github.com/drush-ops/drush/blob/8.0.0-rc3/lib/Drush/Boot/DrupalBoot8.php#L34

Maybe you're somehow running a copy of Drush that is partially older code and some newer code?

@quicksketch
Copy link
Contributor

APC or the built-in 5.5 opcache can intermittently cause these sorts of problems also. Try disabling opcache in your php.ini file or reset it manually: http://php.net/manual/en/function.opcache-reset.php

@captainQW
Copy link
Author

Using the Drush script found at /usr/local/drush/drush/drush/drush/drush.launcher using pcntl_exec
Drush preflight prepare loaded autoloader at [preflight]
/usr/local/drush/vendor/autoload.php [0.02 sec, 2.16 MB]
Starting Drush preflight. [0.02 sec, 2.16 MB] [preflight]
Cache HIT cid: 8.0.0-rc3-commandfiles-0-680b6909db482ecc85e8d3f7becb239c [0.03 sec, 2.19 [debug]
MB]
Scanning into /etc/drush for /._aliases.drush(8|)rc.php$/ [0.08 sec, 4.19 MB] [sitealias]
Scanning into /etc/drush for /self.alias.drush(8|)rc.php$/ [0.08 sec, 4.19 MB] [sitealias]
Scanning into /usr/local/drush/drush/drush/drush/includes/.. for [sitealias]
/._aliases.drush(8|)rc.php$/ [0.08 sec, 4.19 MB]
Scanning into /usr/local/drush/drush/drush/drush/includes/.. for [sitealias]
/self.alias.drush(8|)rc.php$/ [0.09 sec, 4.19 MB]
Scanning into /Users/panjunliu/.drush for /._aliases.drush(8|)rc.php$/ [0.1 sec, 4.19 [sitealias]
MB]
Scanning into /Users/panjunliu/.drush for /self.alias.drush(8|)rc.php$/ [0.1 sec, 4.19 [sitealias]
MB]
Scanning into /Users/panjunliu/Sites/drupal8/../drush for /._aliases.drush(8|)rc.php$/ [sitealias]
[0.1 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/../drush for /self.alias.drush(8|)rc.php$/[sitealias]
[0.1 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/drush for /._aliases.drush(8|)rc.php$/ [0.1[sitealias]
sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/drush for /self.alias.drush(8|)rc.php$/ [sitealias]
[0.1 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/all/drush for [sitealias]
/._aliases.drush(8|)rc.php$/ [0.11 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/all/drush for [sitealias]
/self.alias.drush(8|)rc.php$/ [0.11 sec, 4.2 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/default for [sitealias]
/.*aliases.drush(8|)rc.php$/ [0.11 sec, 4.2 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/default for [sitealias]
/self.alias.drush(8|)rc.php$/ [0.11 sec, 4.2 MB]
Bootstrap to phase 0. [0.17 sec, 5.25 MB] [bootstrap]
Bootstrap to phase 6. [0.17 sec, 5.25 MB] [bootstrap]
PHP Fatal error: Uncaught Error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in /usr/local/drush/drush/drush/drush/includes/drupal.inc:41
Stack trace:
#0 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(264): drush_drupal_version('/Users/panjunli...')
#1 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(412): Drush\Boot\DrupalBoot->bootstrap_drupal_root_validate()
#2 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(451): drush_bootstrap_validate(1)
#3 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(54): drush_bootstrap_to_phase(6)
#4 /usr/local/drush/drush/drush/drush/includes/preflight.inc(64): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#5 /usr/local/drush/drush/drush/drush/drush.php(12): drush_main()
#6 {main}
thrown in /usr/local/drush/drush/drush/drush/includes/drupal.inc on line 41
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Uncaught Error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in
/usr/local/drush/drush/drush/drush/includes/drupal.inc:41
Stack trace:
#0 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(264):
drush_drupal_version('/Users/panjunli...')
#1 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(412):
Drush\Boot\DrupalBoot->bootstrap_drupal_root_validate()
#2 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(451):
drush_bootstrap_validate(1)
#3 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(54):
drush_bootstrap_to_phase(6)
#4 /usr/local/drush/drush/drush/drush/includes/preflight.inc(64):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#5 /usr/local/drush/drush/drush/drush/drush.php(12): drush_main()
#6 {main}
thrown in /usr/local/drush/drush/drush/drush/includes/drupal.inc, line 41 [0.17 sec,
5.26 MB]

@weitzman
Copy link
Member

what command are you running? also please run drush cache-clear drush

@captainQW
Copy link
Author

@weitzman

panjunliu@mac:/Sites/drupal8 > drush cache-clear drush
PHP Fatal error: Uncaught Error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in /usr/local/drush/drush/drush/drush/includes/drupal.inc:41
Stack trace:
#0 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(264): drush_drupal_version('/Users/panjunli...')
#1 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(412): Drush\Boot\DrupalBoot->bootstrap_drupal_root_validate()
#2 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(488): drush_bootstrap_validate(1)
#3 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(436): drush_bootstrap_max()
#4 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(54): drush_bootstrap_to_phase(-2)
#5 /usr/local/drush/drush/drush/drush/includes/preflight.inc(64): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#6 /usr/local/drush/drush/drush/drush/drush.php(12): drush_main()
#7 {main}
thrown in /usr/local/drush/drush/drush/drush/includes/drupal.inc on line 41
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Uncaught Error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in
/usr/local/drush/drush/drush/drush/includes/drupal.inc:41
Stack trace:
#0 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(264):
drush_drupal_version('/Users/panjunli...')
#1 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(412):
Drush\Boot\DrupalBoot->bootstrap_drupal_root_validate()
#2 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(488):
drush_bootstrap_validate(1)
#3 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(436): drush_bootstrap_max()
#4 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(54):
drush_bootstrap_to_phase(-2)
#5 /usr/local/drush/drush/drush/drush/includes/preflight.inc(64):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#6 /usr/local/drush/drush/drush/drush/drush.php(12): drush_main()
#7 {main}
thrown in /usr/local/drush/drush/drush/drush/includes/drupal.inc, line 41
panjunliu@mac:
/Sites/drupal8 > drush cache-clear drush --debug
Using the Drush script found at /usr/local/drush/drush/drush/drush/drush.launcher using pcntl_exec
Drush preflight prepare loaded autoloader at [preflight]
/usr/local/drush/vendor/autoload.php [0.01 sec, 2.16 MB]
Starting Drush preflight. [0.01 sec, 2.16 MB] [preflight]
Cache HIT cid: 8.0.0-rc3-commandfiles-0-680b6909db482ecc85e8d3f7becb239c [0.02 sec, 2.19 [debug]
MB]
Scanning into /etc/drush for /._aliases.drush(8|)rc.php$/ [0.05 sec, 4.19 MB] [sitealias]
Scanning into /etc/drush for /self.alias.drush(8|)rc.php$/ [0.05 sec, 4.19 MB] [sitealias]
Scanning into /usr/local/drush/drush/drush/drush/includes/.. for [sitealias]
/._aliases.drush(8|)rc.php$/ [0.05 sec, 4.19 MB]
Scanning into /usr/local/drush/drush/drush/drush/includes/.. for [sitealias]
/self.alias.drush(8|)rc.php$/ [0.05 sec, 4.19 MB]
Scanning into /Users/panjunliu/.drush for /._aliases.drush(8|)rc.php$/ [0.06 sec, 4.19 [sitealias]
MB]
Scanning into /Users/panjunliu/.drush for /self.alias.drush(8|)rc.php$/ [0.06 sec, 4.19[sitealias]
MB]
Scanning into /Users/panjunliu/Sites/drupal8/../drush for /._aliases.drush(8|)rc.php$/ [sitealias]
[0.06 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/../drush for /self.alias.drush(8|)rc.php$/[sitealias]
[0.06 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/drush for /._aliases.drush(8|)rc.php$/ [sitealias]
[0.06 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/drush for /self.alias.drush(8|)rc.php$/ [sitealias]
[0.06 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/all/drush for [sitealias]
/._aliases.drush(8|)rc.php$/ [0.07 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/all/drush for [sitealias]
/self.alias.drush(8|)rc.php$/ [0.07 sec, 4.2 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/default for [sitealias]
/.*aliases.drush(8|)rc.php$/ [0.07 sec, 4.2 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/default for [sitealias]
/self.alias.drush(8|)rc.php$/ [0.07 sec, 4.2 MB]
Bootstrap to phase 0. [0.12 sec, 5.25 MB] [bootstrap]
PHP Fatal error: Uncaught Error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in /usr/local/drush/drush/drush/drush/includes/drupal.inc:41
Stack trace:
#0 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(264): drush_drupal_version('/Users/panjunli...')
#1 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(412): Drush\Boot\DrupalBoot->bootstrap_drupal_root_validate()
#2 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(488): drush_bootstrap_validate(1)
#3 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(436): drush_bootstrap_max()
#4 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(54): drush_bootstrap_to_phase(-2)
#5 /usr/local/drush/drush/drush/drush/includes/preflight.inc(64): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#6 /usr/local/drush/drush/drush/drush/drush.php(12): drush_main()
#7 {main}
thrown in /usr/local/drush/drush/drush/drush/includes/drupal.inc on line 41
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Uncaught Error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in
/usr/local/drush/drush/drush/drush/includes/drupal.inc:41
Stack trace:
#0 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(264):
drush_drupal_version('/Users/panjunli...')
#1 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(412):
Drush\Boot\DrupalBoot->bootstrap_drupal_root_validate()
#2 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(488):
drush_bootstrap_validate(1)
#3 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(436): drush_bootstrap_max()
#4 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(54):
drush_bootstrap_to_phase(-2)
#5 /usr/local/drush/drush/drush/drush/includes/preflight.inc(64):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#6 /usr/local/drush/drush/drush/drush/drush.php(12): drush_main()
#7 {main}
thrown in /usr/local/drush/drush/drush/drush/includes/drupal.inc, line 41 [0.13 sec,
5.26 MB]

@captainQW
Copy link
Author

panjunliu@mac:~/Sites/drupal8 > drush cache-rebuild --debug
Using the Drush script found at /usr/local/drush/drush/drush/drush/drush.launcher using pcntl_exec
Drush preflight prepare loaded autoloader at [preflight]
/usr/local/drush/vendor/autoload.php [0.01 sec, 2.16 MB]
Starting Drush preflight. [0.01 sec, 2.16 MB] [preflight]
Cache HIT cid: 8.0.0-rc3-commandfiles-0-680b6909db482ecc85e8d3f7becb239c [0.02 sec, 2.19 [debug]
MB]
Scanning into /etc/drush for /._aliases.drush(8|)rc.php$/ [0.05 sec, 4.19 MB] [sitealias]
Scanning into /etc/drush for /self.alias.drush(8|)rc.php$/ [0.05 sec, 4.19 MB] [sitealias]
Scanning into /usr/local/drush/drush/drush/drush/includes/.. for [sitealias]
/._aliases.drush(8|)rc.php$/ [0.05 sec, 4.19 MB]
Scanning into /usr/local/drush/drush/drush/drush/includes/.. for [sitealias]
/self.alias.drush(8|)rc.php$/ [0.05 sec, 4.19 MB]
Scanning into /Users/panjunliu/.drush for /._aliases.drush(8|)rc.php$/ [0.06 sec, 4.19 [sitealias]
MB]
Scanning into /Users/panjunliu/.drush for /self.alias.drush(8|)rc.php$/ [0.06 sec, 4.19[sitealias]
MB]
Scanning into /Users/panjunliu/Sites/drupal8/../drush for /._aliases.drush(8|)rc.php$/ [sitealias]
[0.06 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/../drush for /self.alias.drush(8|)rc.php$/[sitealias]
[0.06 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/drush for /._aliases.drush(8|)rc.php$/ [sitealias]
[0.06 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/drush for /self.alias.drush(8|)rc.php$/ [sitealias]
[0.06 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/all/drush for [sitealias]
/._aliases.drush(8|)rc.php$/ [0.06 sec, 4.19 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/all/drush for [sitealias]
/self.alias.drush(8|)rc.php$/ [0.06 sec, 4.2 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/default for [sitealias]
/.*aliases.drush(8|)rc.php$/ [0.06 sec, 4.2 MB]
Scanning into /Users/panjunliu/Sites/drupal8/sites/default for [sitealias]
/self.alias.drush(8|)rc.php$/ [0.06 sec, 4.2 MB]
Bootstrap to phase 0. [0.13 sec, 5.25 MB] [bootstrap]
Bootstrap to phase 2. [0.13 sec, 5.25 MB] [bootstrap]
PHP Fatal error: Uncaught Error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in /usr/local/drush/drush/drush/drush/includes/drupal.inc:41
Stack trace:
#0 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(264): drush_drupal_version('/Users/panjunli...')
#1 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(412): Drush\Boot\DrupalBoot->bootstrap_drupal_root_validate()
#2 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(451): drush_bootstrap_validate(1)
#3 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(54): drush_bootstrap_to_phase(2)
#4 /usr/local/drush/drush/drush/drush/includes/preflight.inc(64): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#5 /usr/local/drush/drush/drush/drush/drush.php(12): drush_main()
#6 {main}
thrown in /usr/local/drush/drush/drush/drush/includes/drupal.inc on line 41
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Uncaught Error: Call to undefined method Drush\Boot\DrupalBoot8::get_version() in
/usr/local/drush/drush/drush/drush/includes/drupal.inc:41
Stack trace:
#0 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(264):
drush_drupal_version('/Users/panjunli...')
#1 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(412):
Drush\Boot\DrupalBoot->bootstrap_drupal_root_validate()
#2 /usr/local/drush/drush/drush/drush/includes/bootstrap.inc(451):
drush_bootstrap_validate(1)
#3 /usr/local/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(54):
drush_bootstrap_to_phase(2)
#4 /usr/local/drush/drush/drush/drush/includes/preflight.inc(64):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#5 /usr/local/drush/drush/drush/drush/drush.php(12): drush_main()
#6 {main}
thrown in /usr/local/drush/drush/drush/drush/includes/drupal.inc, line 41 [0.13 sec,
5.26 MB]

@captainQW
Copy link
Author

@weitzman
php version

PHP 7.0.0RC6 (cli) (built: Nov 4 2015 03:24:16) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

@captainQW
Copy link
Author

@quicksketch

when I disabled opcache, the error still exist.

@weitzman
Copy link
Member

Are you able to try with PHP 5?

@weitzman
Copy link
Member

Pretty sure this a local problem. Please completely remove Drush and reinstall drush 8.0.0

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