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

no API_KEY after key:generate #101

Closed
karezza opened this issue Sep 30, 2021 · 4 comments
Closed

no API_KEY after key:generate #101

karezza opened this issue Sep 30, 2021 · 4 comments

Comments

@karezza
Copy link

karezza commented Sep 30, 2021

After installing I'm seeing the following error:

PHP Fatal error:  Uncaught RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:44\nStack trace:\n#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(32): Illuminate\\Encryption\\Encrypter->__construct()\n#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(869): Illuminate\\Encryption\\EncryptionServiceProvider->Illuminate\\Encryption\\{closure}()\n#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(754): Illuminate\\Container\\Container->build()\n#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(841): Illuminate\\Container\\Container->resolve()\n#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(692): Illuminate\\Foundation\\Application->resolve()\n#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(826): Illuminat in /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php on line 44, referer: https://koel.k-dev.harmony.net/

Could this be because I made up an API_KEY rather than use the utility to generate one? I thought maybe so I tried to generate one using the command:

# php artisan key:generate --force
Application key set successfully.

Looks like it completed successfully but there is nothing new in .env

@karezza
Copy link
Author

karezza commented Sep 30, 2021

Just noticed this is forked off another project, going to work with the other project for a bit and see if I can figure out the issue.

@karezza karezza closed this as completed Sep 30, 2021
@Hyzual
Copy link
Collaborator

Hyzual commented Oct 1, 2021

Hi, unfortunately the original project this is forked from is no longer maintained.
The APP_KEY is automatically generated, indeed if you need to generate it that's the right command to run. I'm surprised it didn't write it to .env file, I think there is also an artisan command to dump vars but I don't know it from the top of my head

@Hyzual
Copy link
Collaborator

Hyzual commented Oct 1, 2021

Did you try running php artisan koel:init --no-assets? It should generate the APP_KEY

@karezza
Copy link
Author

karezza commented Oct 2, 2021

What I found out is if I don't try to provide an api key one is generated. For some reason I felt like I needed an api key before I knew how to generate one so by providing an invalid key I created a problem for myself. Got everything working now. Thank you!

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

2 participants