I've created new project in symfony and I get an error prompt on each site:
An error occurred while loading the web debug toolbar (404: Not Found).
Do you want to open the profiler?
When I open the profiler there is a message
Token not found
Token "59942c" was not found in the database.
Moreover, in the cache directory the profiler directory is empty! I checked permissions and they're proper. I tried cache:clear
and removing cache manually, but that didn't help.
It's often problem with event subscriber/listener. Try run
console debug:event
And check for errors
This usually happens if the cache directory is not properly set up to allow the web servers' user to write data into them.
Under Linux, I would usually use this for development:
php app/console --env=dev cache:clear
php app/console --env=dev cache:warmup
chmod -R a+rwX app/cache/
setfacl -Rm g:www-data:rwX app/cache/
setfacl -Rm g:dev-user:rwX app/cache/
This ensures all required directories will be created and then assigned the required permissions. If you do not have ACL enabled, skip the setfacl
commands.
OFC, replace www-data
with your web servers' username, and dev-user
with your username.
This is a known bug in the profiler. Since Symfony 2.4, the profiler persisting the data used by the WDT is the very last thing done by Symfony.
The alert you see means that the profiler has not been able to find the token requested in the 2500ms allowed, However if you click OK in the alert, you should be redirected to the profiler and figure out what precisely is slow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With