[GH-ISSUE #831] composer install and koel:init fails when following the installation instructions #576

Closed
opened 2026-02-26 02:33:36 +03:00 by kerem · 4 comments
Owner

Originally created by @ElectronicWar on GitHub (Oct 16, 2018).
Original GitHub issue: https://github.com/koel/koel/issues/831

System: koel/master 96a3361, Debian 9

Following the official installation instructions (both the simplified one on https://koel.phanan.net/#install and the more detailed one on https://koel.phanan.net/docs/#/) will lead to a fail of composer install as well as php artisan koel:init

When no .env file was created, the error will be

  The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.

When .env was created from .env.example, the error will be

 No application encryption key has been specified.

This error should be suppressed during the composer step.
The .env.example file reads # A random 32-char string. You can leave this empty if use php artisan koel:init. but this is not true, as koel:init will only abort with "No application encryption key has been specified.".

Currently it's required to manually set a 32char string for APP_KEY and JWT_SECRET to finish installation.

composer install will run this at the very end, which it will never reach due to the error in the artisan step: @php -r "if (!file_exists('.env')) copy('.env.example', '.env');", so it's pretty much a chicken-egg-problem

This might be obvious for someone experience with artisan/laravel but the instructions should at least point to information that .env configuration is required before running composer.

Originally created by @ElectronicWar on GitHub (Oct 16, 2018). Original GitHub issue: https://github.com/koel/koel/issues/831 System: koel/master 96a3361, Debian 9 Following the official installation instructions (both the simplified one on https://koel.phanan.net/#install and the more detailed one on https://koel.phanan.net/docs/#/) will lead to a fail of `composer install` as well as `php artisan koel:init` When no `.env` file was created, the error will be ``` The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. ``` When `.env` was created from `.env.example`, the error will be ``` No application encryption key has been specified. ``` This error should be suppressed during the composer step. The `.env.example` file reads `# A random 32-char string. You can leave this empty if use php artisan koel:init.` but this is not true, as koel:init will only abort with "No application encryption key has been specified.". Currently it's required to manually set a 32char string for APP_KEY and JWT_SECRET to finish installation. `composer install` will run this at the very end, which it will never reach due to the error in the artisan step: `@php -r "if (!file_exists('.env')) copy('.env.example', '.env');"`, so it's pretty much a chicken-egg-problem This might be obvious for someone experience with artisan/laravel but the instructions should at least point to information that .env configuration is required before running composer.
kerem closed this issue 2026-02-26 02:33:36 +03:00
Author
Owner

@phanan commented on GitHub (Oct 16, 2018):

I'm confused. Are you on master branch or a release tag?

<!-- gh-comment-id:430266992 --> @phanan commented on GitHub (Oct 16, 2018): I'm confused. Are you on `master` branch or a release tag?
Author
Owner

@ElectronicWar commented on GitHub (Oct 16, 2018):

I am on the latest commit in master, not on a release tag. (git clone https://github.com/phanan/koel as by website instructions). I also wanted to be on master as latest release tag is many commits behind.

<!-- gh-comment-id:430272362 --> @ElectronicWar commented on GitHub (Oct 16, 2018): I am on the latest commit in master, not on a release tag. (`git clone https://github.com/phanan/koel` as by website instructions). I also wanted to be on master as latest release tag is many commits behind.
Author
Owner

@phanan commented on GitHub (Oct 16, 2018):

So does the problem happen to you if you really follow the instructions then?

<!-- gh-comment-id:430273434 --> @phanan commented on GitHub (Oct 16, 2018): So does the problem happen to you if you really follow the instructions then?
Author
Owner

@ElectronicWar commented on GitHub (Oct 16, 2018):

The main website instructions do not work if followed.

image

Checking out a release tag works (when using nodejs 8.x instead of 10.x), but not master (which happens when using the main website instructions)

<!-- gh-comment-id:430313117 --> @ElectronicWar commented on GitHub (Oct 16, 2018): The main website instructions do not work if followed. ![image](https://user-images.githubusercontent.com/1890874/47032710-4c848e80-d173-11e8-9e92-79c51bb2a72b.png) Checking out a release tag works (when using nodejs 8.x instead of 10.x), but not master (which happens when using the main website instructions)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#576
No description provided.