0

Hi I have problem with debug toolbar, when I try to load page (on localhost) all code is loading correctly but after code is loaded a get warning :

An error occurred while loading the web debug toolbar (500: Internal Server Error). Do you want to open the profiler?

I can choose : OK or Cancel.

When I click Cancel nothing happens, but if I clicked OK I get (http://127.0.0.1:8000/_profiler/ae356f):

There are no registered paths for namespace "security".

{% block menu %}
        <span class="label {{ not collector.enabled or not collector.token ? 'disabled' }}">
            <span class="icon">{{ include('@security/Collector/icon.svg') }}</span>
            <strong>Security</strong>
        </span>
{% endblock %}

I can share Composer file:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-4": { "": "src/" },
        "classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
    },
    "autoload-dev": {
        "psr-4": { "Tests\\": "tests/" },
        "files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
    },
    "require": {
        "php": ">=5.5.9",
        "doctrine/doctrine-bundle": "^1.6",
        "doctrine/doctrine-cache-bundle": "^1.2",
        "doctrine/orm": "^2.5",
        "incenteev/composer-parameter-handler": "^2.0",
        "sensio/distribution-bundle": "^5.0",
        "sensio/framework-extra-bundle": "^3.0.2",
        "symfony/monolog-bundle": "^3.0.2",
        "symfony/polyfill-apcu": "^1.0",
        "symfony/swiftmailer-bundle": "^2.3.10",
        "symfony/symfony": "3.2.*",
        "twig/twig": "^1.0||^2.0",
        "symfony/assetic-bundle": "2.8.1",
        "doctrine/doctrine-migrations-bundle": "^1.0"
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0",
        "symfony/phpunit-bridge": "^3.0"
    },
    "scripts": {
        "symfony-scripts": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ],
        "post-install-cmd": [
            "@symfony-scripts"
        ],
        "post-update-cmd": [
            "@symfony-scripts"
        ]
    },
    "config": {
        "platform": {
            "php": "5.5.9"
        },
        "sort-packages": true
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-bin-dir": "bin",
        "symfony-var-dir": "var",
        "symfony-web-dir": "web",
        "symfony-tests-dir": "tests",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "3.2-dev"
        }
    }
}

Can you guys have any idea what can be cause of this problem? I already tried this solution but no effect. Please help.

mcgoo
  • 103
  • 3
  • 12
  • Can you give us your Apache Virtual Host if any and/or `.htaccess` file? Seems to me that something is stopping the debug toolbar to work properly – ReynierPM Oct 12 '17 at 19:48
  • Sure no problem, but which one? From Web folder? – mcgoo Oct 12 '17 at 19:57
  • Well if you have an Apache virtual host won't be on your web folder, if you have not made any changes to the default `.htacess` then no need to add it here – ReynierPM Oct 12 '17 at 19:58
  • You right, I didn't change anything there. – mcgoo Oct 12 '17 at 20:05

1 Answers1

0

On the french site openclassroom.fr a guy have the same error 500. I don't know the true hidden error but his error is

The security context contains no authentication token. One possible reason may be that there is no firewall configured for this URL.

The issue seems to be to test if a token exist:

if(null == $this->securityContext->getToken() && HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType())
{
    return;
}
th3fr33man
  • 60
  • 1
  • 5