I\'am using Symfony for a project and I have been trying to get the login to work on production server with no success for the past 2 days. I keep getting the error
Currently there is a bug in Symfony and on production IF during authentication system error occurs (missing table, missing column or any other exception) - it's logged as INFO instead of ERROR and with default error logging options it's not logged at all.
https://github.com/symfony/symfony/pull/28462
I think there are two options right now - temporary log everything (including INFO) on production until you find the real error.
Second option: use this patch or debug directly on production.
You probably used the template given by Symfony docs here :
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
Which actually gives you this error message. The most simple and reliable way to fix this issue is to replace this line by the following :
<div class="alert alert-danger">{{ error }}</div>
Which will give you the full stack-trace for your error and (hopefully) help you debug your application. Don't forget to revert this before going to production!
It looks like that the error:
Authentication request could not be processed due to a system problem.
is too generic and does not tell anything about where the problem is (there is an issue opened about this matter here).
I solved my issue by checking the logs and see what happened (in var/logs/dev.log), hoping this helps someone.
In my specific case, there was a wrong parameter in parameters.yml about database connection. But, again, the error is too generic and does not necessarily imply that the problem is related with database connection.
I'm sure that this error is too generic. In my case, The follow is incorrect:
class: App/Entity/User;
Correction:
class: App\Entity\User;
This problem can be fixed running command: php bin/console cache:clear --env=prod --no-debug