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

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

Closed
squaricdot opened this issue Jun 1, 2018 · 1 comment

Comments

@squaricdot
Copy link

Whatever i try to configure for the key. or what is supplied by the logs, then put in docker-compose.

Or create my own base64 value based on a 32 character string and inject it doens't work.

[2018-06-01 15:37:26] development.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
Stack trace:
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(25): Illuminate\Encryption\EncryptionServiceProvider->getEncrypterForKeyAndCipher(''base64:ZnVja2l...', 'AES-256-CBC')
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(731): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption{closure}(Object(Illuminate\Foundation\Application), Array)
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(629): Illuminate\Container\Container->build(Object(Closure), Array)
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(697): Illuminate\Container\Container->make('encrypter', Array)
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(1178): Illuminate\Foundation\Application->make('encrypter')
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php(139): Illuminate\Container\Container->offsetGet('encrypter')
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(147): Illuminate\Queue\QueueManager->connection('database')
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(111): Illuminate\Queue\Worker->pop(NULL, NULL, '2', '1', '3')
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(86): Illuminate\Queue\Worker->runNextJobForDaemon(NULL, NULL, '2', '1', '3')
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(119): Illuminate\Queue\Worker->daemon(NULL, NULL, '2', 128, '1', '3')
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(78): Illuminate\Queue\Console\WorkCommand->runWorker(NULL, NULL, '2', 128, true)
#11 [internal function]: Illuminate\Queue\Console\WorkCommand->fire()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(507): call_user_func_array(Array, Array)
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(169): Illuminate\Container\Container->call(Array)
#14 /var/www/html/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(155): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/vendor/symfony/console/Application.php(794): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/vendor/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/vendor/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(107): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 {main} {"identification":{"id":"4835be44-fbc8-4328-9a26-d31d28e49b46"}}

The used keys:

grep APP_KEY docker-compose.yml

  - APP_KEY='base64:ZnVja2luZ2hvZXJlbmhvZWdla3VpamVyMjhhamsyMwo='

or provided by the logs:
base64:gWAaLV264kT34BlotomdmythxEvfLSj/Cu40OG7HFzU=

both don't seem to work, accepted by the cipher.

@squaricdot
Copy link
Author

Don't use the single quotes in the Dockerfile to define the key like that.

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

1 participant