drupal-console
drupal-console copied to clipboard
[console] 500 error on console installer page.
Problem/Motivation
TASK [geerlingguy.drupal-console : Install Drupal Console.] ******************** fatal: [abcd]: FAILED! => {"changed": false, "dest": "/usr/local/bin/drupal", "elapsed": 1, "msg": "Request failed", "response": "HTTP Error 500: Internal Server Error", "status_code": 500, "url": "https://drupalconsole.com/installer"}
Details to include:
- Got this while trying to provision for DrupalVM. https://drupalconsole.com/installer is not opening
How to reproduce
Visit https://drupalconsole.com/installer. OR try to provision for DrupalVM.
As a (very ugly) temporary workaround, I could obtain a copy of the "drupal" executable from a team mate that already had its VM provisionned and I changed this task in ansible :
- name: Install Drupal Console.
get_url:
url: https://drupalconsole.com/installer
dest: "{{ drupal_console_path }}"
for:
- name: Copy Drupal Console (temporary workaround).
copy:
src: /path/to/local/copy/of/drupal
# drupal_console_path in VM is /usr/local/bin/drupal
dest: "{{ drupal_console_path }}"
I also disabled the "drupal console" self-update task a few lines below.
I was then able to run vagrant up --provision
without issue.
I am also receiving a 500 Internal Server Error from https://drupalconsole.com/installer
Yes, the drupal console team has to solve that issue. Till then I guess we can use the method that @jcaillot has shown or we can remove drupalconsole from our ansible script(if we are using ansible) for the time if we do not explicitly require it. We can later add it back and re-provision the VM to get it into our system.
Where can I find this executable file to be downloaded from the link https://drupalconsole.com/installer?
You can ask someone to provide you with the executable.
Or you can use composer:
composer require drupal/console
Then you can run drupalconsole using: vendor/bin/drupal
We are working to solve this but in future versions this installer will be removed.
Please use the composer require drupal/console
to install DC
For DrupalVM, see my workaround at https://github.com/hechoendrupal/drupal-console/issues/3233#issuecomment-677787317
Considering that the DC team is planning to remove this installer in future versions, creating a .bashrc alias or adding vendor/bin to path might be more future friendly workarounds.
To fully install Drupal Console and add /vendor/bin
to the $PATH
, on Ubuntu, using Ansible:
tasks:
- name: Require Drupal Console.
composer:
command: require
arguments: drupal/console:~1.0
working_dir: "/var/www/{{ project }}"
prefer_dist: yes
optimize_autoloader: yes
become: false
environment:
COMPOSER_PROCESS_TIMEOUT: 1200
COMPOSER_MEMORY_LIMIT: '-1'
- name: Add project's /vendor/bin to $PATH
lineinfile:
path: ~/.profile
line: 'PATH="$PATH:/var/www/{{ project }}/vendor/bin"'
state: present
become: false
We are working to solve this but in future versions this installer will be removed.
Please use the
composer require drupal/console
to install DC
@dmouse 👋
So does this mean that the launcher itself is deprecated or soon to be deprecated?
Hi, Drupal Console can't be installed on Drupal 8.8/8.9 using composer (look at https://github.com/hechoendrupal/drupal-console/issues/4251 and others), so at least the installer should be restored. Now there is no way to install it.
Hi @dmouse
Is there any particular reason the phar/launcher isn't attached to each Github release?
That'd certainly avoid issues like this while reducing the stress on your servers.
is any update about installer? i am still facing the same issue. any one can help me for installing drupal console on windows please
Sounds like the problem is with the installer itself
php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar
PHP Warning: readfile(https://drupalconsole.com/installer): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error
in Command line code on line 1
Error: Server Error The server encountered an error and could not complete your request. Please try again in 30 seconds.
on https://drupalconsole.com/installer
duplicated by #4263