1

enter image description here

AuthenticationCredentialsNotFoundException in classes.php line 2876:

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

I tried everything I could find on Stack Overflow, GitHub and Google. Nothing worked.


Lesson learned: Always check the log files.

tail -f app/logs/dev.log

Found this:

...[Semantical Error] The annotation \"@Route\" in method Ambry\TumorNextAPIBundle\Controller\DefaultController::indexAction() was never imported. Did you maybe forget to add a \"use\" statement for this annotation?...


I was missing the following use statement(s):

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

In the following code:

<?php

namespace Ambry\TumorNextAPIBundle\Controller;

use Symfony\Component\HttpFoundation\Request;

use Ambry\BioToolsBundle\Controller\ApplicationController;

class DefaultController extends ApplicationController
{
    /**
     * @Route("/", name="tumornext" )
     * @Method({"GET","POST"})
     * @Template
     */
    public function indexAction(Request $request)
    {
        return array();
    }
}

1 Answer 1

1

Lesson learned: Always check the log files.

tail -f app/logs/dev.log
tail -f app/logs/dev.log | grep CRIT
tail -f app/logs/dev.log | grep ERROR
tail -f app/logs/dev.log | grep INFO

In this case, you're missing use statement(s):

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.