I have installed my Symfony project on another computer with the same specifications, and I receive the following error when I login with fosuserbundle:
Authentication request could not be processed due to a system problem.
I can't find anything of interest in the app/logs files. I run the app in dev mode. Cleared cache both manually and from the console. I setup the db with doctrine:database:create. It works to create a new user with fos:user:create
and it's successfully saved to the database.
I have no idea where to go from here.
I had the problem Symfony 2.3 and when I execute app/console doctrine:schema:update --dump-sql this is the result.
DROP INDEX UNIQ_957A647992FC23A8 ON fos_user; DROP INDEX UNIQ_957A6479A0D96FBF ON fos_user; ALTER TABLE fos_user DROP username, DROP username_canonical, DROP email, DROP email_canonical, DROP enabled, DROP salt, DROP password, DROP last_login, DROP locked, DROP expired, DROP expires_at, DROP confirmation_token, DROP password_requested_at, DROP roles, DROP credentials_expired, DROP credentials_expire_at;
It started working again just after I updated doctrine-bundle from 1.2 to 1.3.
Info:
https://github.com/FriendsOfSymfony/FOSUserBundle/issues/2140
If you've generated the database using doctrine:database:create, maybe your charset isn't appropriate. Because User table has a serialized field (roles) a wrong encoding could be the cause.
You can check this looking into app/logs and your database collation.
Alternatively, check this answer
Had the same issue while working in dev environment. I updated my User's model, and every time I tried to login I had your error. Solved by running:
EDIT: Had the same issue again. This time it's happened because I moved my project to another server and forgot to update
parameters.yml
to match the server's MySQL credentials.It looks like that the error:
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.