Skip to content
Advertisement

Why does Symfony ask a valid token when I start a local server?

I have a symfony 5.1 application under development on my laptop. This command failed:

symfony console server:start

Your token has been revoked, please login again

Then, the prompt purposes me to login, but I cannot always login, because I’m behind a firewall that rejects external access for some security reasons.

I tried :

  • to uninstall the local certificate authority,
  • to launch server without TLS,
  • to launch server with the command symfony serve -d (I got the same error message)
  • to launch application with different version of PHP (by using .php-version file)

It’s perhaps because I tested a demo symfony cloud which is expired. So, I tried to remove all elements about cloud.

Without success…

As soon as I am offline, the server can be started. As soon as I’m connected on other network I can login, but I want to launch this local server when I’m on our enterprise network. (And I’m tired to disconnect from network)

Advertisement

Answer

I had a problem like this. It helped me – symfony account:logout

Here I found the answer – https://github.com/symfony/cli/issues/281

edit by Alexandre: I only had to logout from cloud. Because of the firewall rules, symfony detected that Internet was available and try to get a new token, but fails because of firewall rules.

Now I only have to disconnect from cloud when I am connect on enterprise network:

symfony account:logout

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement