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();
}
}
