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

RuntimeException: No supported encrypter found. The cipher and / or key length are invalid. #381

Open
DevMan01 opened this issue Jun 26, 2020 · 3 comments

Comments

@DevMan01
Copy link

No matter what I do, I can't seem to get the guy to boot up with an APP_KEY that it'll take with consistency.

docker-compose.yaml reads this, under the environment:
- APP_KEY=odsoIqIptj9ADwVS9onivtmarnFKQhG3

This is what spits out in the run time logs:

Backup skipped!
Backup completed!
Application key [base64:vGSwhwLZjWiucsWF6jEyF6Mk/jgfNU0uAdK2Q1sTR4w=] set successfully.
Configuration cache cleared!
Configuration cached successfully!
Route cache cleared!

When I go into the deployment, and look at the .env file this is what I see set:
APP_KEY="base64:oRx0GVFwZRvofbeo1Et/EoSCh+Fel+GQF3yUyGGbGYg="

No wonder when the app tries to start up it gives me this error:

[2020-06-26 02:14:47] production.ERROR: RuntimeException: No supported encrypter found. The cipher and / or key length are invalid. in /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:45

It's probably unable to find consistency in the values. cachet v2.3.18

@truppert-mdsol
Copy link

Hi @DevMan01 I had the same problem for a bit. The issue for me was that I used an incorrect APP_KEY, which looks like it may be your issue as well. From your logs, it looks like you need to set your APP_KEY to the string base64:vGSwhwLZjWiucsWF6jEyF6Mk/jgfNU0uAdK2Q1sTR4w=

@rohit-gohri
Copy link

rohit-gohri commented Sep 8, 2020

API_KEY needs to be 32 chars: #330 (comment)
This fixed it for me

@Lemmmy
Copy link

Lemmmy commented Dec 24, 2020

Just noticed that the README of this repo tells you to use artisan to generate the key (which has the correct format and length), but the actual guide doesn't explain it yet:

docker exec -i ID_OF_THE_CONTAINER php artisan key:generate

For anyone finding this issue, just use that command to generate the key.

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

4 participants