I setup monica in a docker container, building my own from the latest master with docker-compose. After starting it every page works except the main dashboard. It just shows Whoops, looks like something went wrong. up the top.
I can't see any error logs to diagnose what went wrong, how could I enable them or figure out what's wrong?
The Whoops error is something produced by Laravel. You can find the logs for any Laravel app in storage/logs/. Hope this helps!
I was able to figure some detail out to get the dashboard functionality restored, at least temporarily.
The laravel log is touched as the root user during install. This will prevent the webapp from being able to open the log file during its rotatinghandler.php access routine.
After changing the access mode chmod 666 storage/logs/laravel-*.log the 'WHOOPS" error message went away and I was able to pull some trace info out of the logs.
/var/www/monica/storage/logs # cat laravel-2017-10-08.log
[2017-10-08 22:35:32] production.ERROR: Symfony\Component\Console\Exception\RuntimeException: Aborted in /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php:159
Stack trace:
#0 /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php(65): Symfony\Component\Console\Helper\QuestionHelper->doAsk(Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#1 /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php(421): Symfony\Component\Console\Helper\QuestionHelper->Symfony\Component\Console\Helper\{closure}()
#2 /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php(68): Symfony\Component\Console\Helper\QuestionHelper->validateAttempts(Object(Closure), Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#3 /var/www/monica/vendor/symfony/console/Helper/SymfonyQuestionHelper.php(49): Symfony\Component\Console\Helper\QuestionHelper->ask(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#4 /var/www/monica/vendor/symfony/console/Style/SymfonyStyle.php(300): Symfony\Component\Console\Helper\SymfonyQuestionHelper->ask(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#5 /var/www/monica/vendor/symfony/console/Style/SymfonyStyle.php(226): Symfony\Component\Console\Style\SymfonyStyle->askQuestion(Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#6 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/Command.php(298): Symfony\Component\Console\Style\SymfonyStyle->confirm('Do you really w...', false)
#7 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php(31): Illuminate\Console\Command->confirm('Do you really w...')
#8 /var/www/monica/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php(75): Illuminate\Foundation\Console\KeyGenerateCommand->confirmToProceed()
#9 /var/www/monica/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php(44): Illuminate\Foundation\Console\KeyGenerateCommand->setKeyInEnvironmentFile('base64:tqSkXs8W...')
#10 [internal function]: Illuminate\Foundation\Console\KeyGenerateCommand->fire()
#11 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#12 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#13 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#14 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#15 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array)
#16 /var/www/monica/vendor/symfony/console/Command/Command.php(264): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#17 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#18 /var/www/monica/vendor/symfony/console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/monica/vendor/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Foundation\Console\KeyGenerateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/monica/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/monica/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/monica/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 {main}
[2017-10-08 22:35:37] production.ERROR: Symfony\Component\Console\Exception\RuntimeException: Aborted in /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php:159
Stack trace:
#0 /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php(65): Symfony\Component\Console\Helper\QuestionHelper->doAsk(Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#1 /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php(421): Symfony\Component\Console\Helper\QuestionHelper->Symfony\Component\Console\Helper\{closure}()
#2 /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php(68): Symfony\Component\Console\Helper\QuestionHelper->validateAttempts(Object(Closure), Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#3 /var/www/monica/vendor/symfony/console/Helper/SymfonyQuestionHelper.php(49): Symfony\Component\Console\Helper\QuestionHelper->ask(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#4 /var/www/monica/vendor/symfony/console/Style/SymfonyStyle.php(300): Symfony\Component\Console\Helper\SymfonyQuestionHelper->ask(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#5 /var/www/monica/vendor/symfony/console/Style/SymfonyStyle.php(226): Symfony\Component\Console\Style\SymfonyStyle->askQuestion(Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#6 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/Command.php(298): Symfony\Component\Console\Style\SymfonyStyle->confirm('Do you really w...', false)
#7 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php(31): Illuminate\Console\Command->confirm('Do you really w...')
#8 /var/www/monica/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(56): Illuminate\Database\Console\Seeds\SeedCommand->confirmToProceed()
#9 [internal function]: Illuminate\Database\Console\Seeds\SeedCommand->fire()
#10 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#11 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#12 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#13 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#14 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array)
#15 /var/www/monica/vendor/symfony/console/Command/Command.php(264): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#16 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#17 /var/www/monica/vendor/symfony/console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/monica/vendor/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Seeds\SeedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/monica/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/monica/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/monica/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 {main}
[2017-10-08 22:35:38] production.ERROR: Symfony\Component\Console\Exception\RuntimeException: Aborted in /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php:159
Stack trace:
#0 /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php(65): Symfony\Component\Console\Helper\QuestionHelper->doAsk(Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#1 /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php(421): Symfony\Component\Console\Helper\QuestionHelper->Symfony\Component\Console\Helper\{closure}()
#2 /var/www/monica/vendor/symfony/console/Helper/QuestionHelper.php(68): Symfony\Component\Console\Helper\QuestionHelper->validateAttempts(Object(Closure), Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#3 /var/www/monica/vendor/symfony/console/Helper/SymfonyQuestionHelper.php(49): Symfony\Component\Console\Helper\QuestionHelper->ask(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#4 /var/www/monica/vendor/symfony/console/Style/SymfonyStyle.php(300): Symfony\Component\Console\Helper\SymfonyQuestionHelper->ask(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#5 /var/www/monica/vendor/symfony/console/Style/SymfonyStyle.php(226): Symfony\Component\Console\Style\SymfonyStyle->askQuestion(Object(Symfony\Component\Console\Question\ConfirmationQuestion))
#6 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/Command.php(298): Symfony\Component\Console\Style\SymfonyStyle->confirm('Do you really w...', false)
#7 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php(31): Illuminate\Console\Command->confirm('Do you really w...')
#8 /var/www/monica/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(56): Illuminate\Database\Console\Seeds\SeedCommand->confirmToProceed()
#9 [internal function]: Illuminate\Database\Console\Seeds\SeedCommand->fire()
#10 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#11 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#12 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#13 /var/www/monica/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#14 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array)
#15 /var/www/monica/vendor/symfony/console/Command/Command.php(264): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#16 /var/www/monica/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#17 /var/www/monica/vendor/symfony/console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/monica/vendor/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Seeds\SeedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/monica/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/monica/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/monica/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 {main}
[2017-10-08 22:37:52] production.INFO: debug:256
[2017-10-08 22:37:52] production.INFO: debug:257
[2017-10-08 22:37:52] production.INFO: debug:258
[2017-10-08 22:37:52] production.INFO: debug:259
[2017-10-08 22:37:52] production.INFO: debug:260
[2017-10-08 22:37:52] production.INFO: debug:261
[2017-10-08 22:37:52] production.INFO: debug:262
[2017-10-08 22:37:52] production.INFO: debug:263
[2017-10-08 22:37:52] production.INFO: debug:264
[2017-10-08 22:37:52] production.INFO: debug:265
[2017-10-08 22:37:52] production.INFO: debug:266
[2017-10-08 22:37:52] production.INFO: debug:267
[2017-10-08 22:37:52] production.INFO: debug:268
[2017-10-08 22:37:52] production.INFO: debug:239
[2017-10-08 22:37:52] production.INFO: debug:240
[2017-10-08 22:37:52] production.INFO: debug:241
[2017-10-08 22:37:52] production.INFO: debug:242
[2017-10-08 22:37:52] production.INFO: debug:243
[2017-10-08 22:37:52] production.INFO: debug:244
[2017-10-08 22:37:52] production.INFO: debug:245
[2017-10-08 22:37:52] production.INFO: debug:246
[2017-10-08 22:37:52] production.INFO: debug:247
[2017-10-08 22:37:52] production.INFO: debug:248
[2017-10-08 22:37:52] production.INFO: debug:249
[2017-10-08 22:37:52] production.INFO: debug:250
[2017-10-08 22:37:52] production.INFO: debug:251
[2017-10-08 22:37:52] production.INFO: debug:252
[2017-10-08 22:37:52] production.INFO: debug:253
[2017-10-08 22:37:52] production.INFO: debug:254
[2017-10-08 22:37:52] production.INFO: debug:255
Is there a fix in sight?
Removing .env from .dockerignore and performing a docker-compose up --build to put the .env file into the image worked for me. Laravel is looking for the .env file and the Dockerignore functionality excludes it from the built image. In this particular case, it was looking for proper SMTP settings available within .env.
Ok this didnt helped for me. But i have currently SMTP commented out. Is SMTP a forced requierement? Wanted to test it for the begin. Before I begin E-Mail Account to create for it.
Adding SMTP Account didn't helped. Changing APP_ENV from production to local helped. Maybe a issue because with production HTTPS is enforced? Without my reverse proxy I get HTTPS error when I connect directly to the Docker Container HTTP Port.
I can confirm that fix at https://github.com/monicahq/monica/issues/596#issuecomment-337264447 worked for me as of https://github.com/monicahq/monica/commit/0001b26afc030992b8a58ffaff7e83ba3df3497e
Is this issue solved? If so, can we close it?
If I recall, I had some Docker issues even with the fix at https://github.com/monicahq/monica/issues/596#issuecomment-337264447 .
I can try again over the weekend with the latest master and report back.
I'm having this issue
I don't know if this will help anyone but a few things that I encountered that may be of relevance/help to others here.
I tried a number of things and can't be 100% sure which made the big difference (or if they all accumulated). Also, I thought I'd try and get this running locally, on MacOS, using docker (which I'd never used before).
I removed .env from .dockerignore as per https://github.com/monicahq/monica/issues/596#issuecomment-337264447
I've been building/running with docker-compose build then docker-compose up as it's become a habit. No idea if there's any difference/benefit over docker-compose up --build
Before I turned on debugging (below) I also suspected problems with my email setup in .env
My mail provider which I was going to use for e-mails to myself uses STARTTLS so I set this in the mail encryption. Looking through Laravel docs I don;t think this is valid. Currently I have this set as MAIL_ENCRYPTION=tls and I'll report back if I have any issues.
Also in .env, APP_DISABLE_SIGNUP was set to true using the default .env. I now have this set to false. I changed this on the assumption I wouldn't be able to create an account otherwise???
I've since set APP_DEBUG=true in the .env file.
At one point that was showing errors relating to permissions/logs but these have gone and haven't come back. I thought it might be related to root as per https://github.com/monicahq/monica/issues/596#issuecomment-335057580 and I wasted lots of time trying to figure this out but have moved on as follows.
I also got an error message about The only supported ciphers are AES-128-CBC and AES-256-CBC
I'd generated my APP_KEY for .env just using the password generator is Keepass as I had it open at the time. I never thought about special characters etc. I wondered if these were problematic so I installed pwgen (brew install pwgen) and then generated a new key using pwgen -s 32 1 as per the user docs.
I now have a login/registration page. 馃帀
Thanks @mroystonward for this great explanation.
Instruction for docker on wiki page https://github.com/monicahq/monica/wiki/Installing-Monica-on-Docker is clear now.
Most helpful comment
Is there a fix in sight?