0
votes

I have Symfony 3.3 project with LexikJWTAuthenticationBundle implemented on ubuntu. I am getting this error on production: request.CRITICAL: Uncaught PHP Exception RuntimeException: "Failed to load private key "/var/www/symfony/app/../var/jwt/private.pem". File "private.pem" exist. jwt_key_pass_phrase is set. I tried to change ownership of private.pem to root and to www-data. It doesn't help.

If I use dev environnment ( adding to link app_dev.php), everything is working fine, I am getting token.

Why I am getting this error on production?

1
clear your prod cache or try to regenerate key - habibun
Clear cache helped. Thanks habibun! After 2 hours debugging forgot to do that. - Mantaz

1 Answers

0
votes

clear your prod cache or try to regenerate the key again.

same issue here github.com/lexik/LexikJWTAuthenticationBundle/issues/366