[How to solve] – Laravel No supported encrypter found, The cipher and / or key length are invalid

Hi Coder, How are you today?  I hope you are okay. Are you still working with the framework laravel? If so, have you ever come across this error?


and then what’s the solution? The default cipher in confing/app.php is “AES-256-CBC” which needs a 32 character string, but the default key is “SomeRandomString,” which is only 16 characters. So, you can either set the cipher to “AES-128-CBC” which only needs 16 characters, or generate a new 32 character string for the key.

But before, copy or move the file .env.example

$ mv .env.example .env

Entering “php artisan key:gen”

$ php artisan key:generate
←[32mApplication key [base64:o1wvSoJzkxzFWrf9Nu9Vm5LzraVuxEFfwPkOxocXodg=] set successfully.←[39m

and now look, laravel has been running perfectly.


Source : https://laracasts.com/discuss/channels/forge/no-supported-encrypter-found-the-cipher-and-or-key-length-are-invalid-with-laravel-51?page=2

[How to solve] – Laravel Whoops, looks like something went wrong

Good afternoon coders! .. How are you today ? On this article I try to provide solutions to the problems that I had when finished installing laravel. Coder² here may never experienced anything like this.


Sometimes this can make us annoyed because there is no information related to the file or line that has an error. To provide information related to this laravel. We need to enable debug mode and set to true. Coder can open the configuration file here \app\app.php


And then change the debug to true.


Save the configuration file you and now we can know what information is required in order that the code is running well.


Ok .. Simple is not it? because we already know the error information, it’s time to try back laravel and hope to run well.