welcome to s4 Facebook
No engine is able to work with the template "". (500 Internal Server Error)

Symfony Exception

RuntimeException RuntimeException

HTTP 500 Internal Server Error

No engine is able to work with the template "".

Exceptions 2

RuntimeException

  1.             if ($engine->supports($name)) {
  2.                 return $engine;
  3.             }
  4.         }
  5.         throw new \RuntimeException(sprintf('No engine is able to work with the template "%s".'$name));
  6.     }
  7. }
  1.      */
  2.     public function getEngine($name)
  3.     {
  4.         $this->resolveEngines();
  5.         return parent::getEngine($name);
  6.     }
  7.     /**
  8.      * {@inheritdoc}
  9.      */
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function render($name, array $parameters = [])
  5.     {
  6.         return $this->getEngine($name)->render($name$parameters);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
  1.                 $engine $view->getEngine() ?: $this->defaultEngine;
  2.                 $template->set('engine'$engine);
  3.             }
  4.         }
  5.         return $this->templating->render($template$data);
  6.     }
  7.     /**
  8.      * Prepares view data for use by templating engine.
  9.      *
  1.      */
  2.     private function initResponse(View $view$format)
  3.     {
  4.         $content null;
  5.         if ($this->isFormatTemplating($format)) {
  6.             $content $this->renderTemplate($view$format);
  7.         } elseif ($this->serializeNull || null !== $view->getData()) {
  8.             $data $this->getDataFromView($view);
  9.             if ($data instanceof FormInterface && $data->isSubmitted() && !$data->isValid()) {
  10.                 $view->getContext()->setAttribute('status_code'$this->failedValidationCode);
  1.         if ($location) {
  2.             return $this->createRedirectResponse($view$location$format);
  3.         }
  4.         $response $this->initResponse($view$format);
  5.         if (!$response->headers->has('Content-Type')) {
  6.             $mimeType $request->attributes->get('media_type');
  7.             if (null === $mimeType) {
  8.                 $mimeType $request->getMimeType($format);
  1.         if (isset($this->customHandlers[$format])) {
  2.             return call_user_func($this->customHandlers[$format], $this$view$request$format);
  3.         }
  4.         return $this->createResponse($view$request$format);
  5.     }
  6.     /**
  7.      * Creates the Response from the view.
  8.      *
  1.         $currentContent $this->getAndCleanOutputBuffering($request->headers->get('X-Php-Ob-Level', -1));
  2.         $code $this->getStatusCode($exception);
  3.         $templateData $this->getTemplateData($currentContent$code$exception$logger);
  4.         $view $this->createView($exception$code$templateData$request$this->showException);
  5.         $response $this->viewHandler->handle($view);
  6.         return $response;
  7.     }
  8.     /**
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $exception $event->getThrowable();
  2.         $request $this->duplicateRequest($exception$event->getRequest());
  3.         try {
  4.             $response $event->getKernel()->handle($requestHttpKernelInterface::SUB_REQUESTfalse);
  5.         } catch (\Exception $e) {
  6.             $f FlattenException::createFromThrowable($e);
  7.             $this->logException($esprintf('Exception thrown when handling an exception (%s: %s at %s line %s)'$f->getClass(), $f->getMessage(), $e->getFile(), $e->getLine()));
  1.             }
  2.             $this->dispatcher->removeListener(KernelEvents::CONTROLLER_ARGUMENTS$controllerArgsListener);
  3.         };
  4.         $this->dispatcher->addListener(KernelEvents::CONTROLLER_ARGUMENTS$controllerArgsListener, -100);
  5.         $this->exceptionListener->onKernelException($event);
  6.     }
  7.     /**
  8.      * {@inheritdoc}
  9.      */
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.     {
  2.         foreach ($listeners as $listener) {
  3.             if ($event->isPropagationStopped()) {
  4.                 break;
  5.             }
  6.             $listener($event$eventName$this);
  7.         }
  8.     }
  9.     /**
  10.      * Sorts the internal list of listeners for the given event by priority.
  1.      * @param object     $event     The event object to pass to the event handlers/listeners
  2.      */
  3.     protected function callListeners(iterable $listenersstring $eventName$event)
  4.     {
  5.         if ($event instanceof Event) {
  6.             $this->doDispatch($listeners$eventName$event);
  7.             return;
  8.         }
  9.         $stoppable $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      * @throws \Exception
  2.      */
  3.     private function handleThrowable(\Throwable $eRequest $requestint $type): Response
  4.     {
  5.         $event = new ExceptionEvent($this$request$type$e);
  6.         $this->dispatcher->dispatch($eventKernelEvents::EXCEPTION);
  7.         // a listener might have replaced the exception
  8.         $e $event->getThrowable();
  9.         if (!$event->hasResponse()) {
  1.     {
  2.         if (!$request $request ?: $this->requestStack->getMasterRequest()) {
  3.             throw $exception;
  4.         }
  5.         $response $this->handleThrowable($exception$requestself::MASTER_REQUEST);
  6.         $response->sendHeaders();
  7.         $response->sendContent();
  8.         $this->terminate($request$response);
  1.                         if ($hasRun) {
  2.                             throw $e;
  3.                         }
  4.                         $hasRun true;
  5.                         $kernel->terminateWithException($e$request);
  6.                     };
  7.                 }
  8.             } elseif ($event instanceof ConsoleEvent && $app $event->getCommand()->getApplication()) {
  9.                 $output $event->getOutput();
  10.                 if ($output instanceof ConsoleOutputInterface) {
in /var/www/api-s4/vendor/symfony/error-handler/ErrorHandler.php :: Symfony\Component\HttpKernel\EventListener\{closure} (line 592)
  1.             $this->exceptionHandler null;
  2.         }
  3.         try {
  4.             if (null !== $exceptionHandler) {
  5.                 return $exceptionHandler($exception);
  6.             }
  7.             $handlerException $handlerException ?: $exception;
  8.         } catch (\Throwable $handlerException) {
  9.         }
  10.         if ($exception === $handlerException && null === $this->exceptionHandler) {
ErrorHandler->handleException(object(RuntimeException))

RuntimeException

Unable to create the storage directory (/var/www/api-s4/var/cache/dev/profiler/86/06).

  1.         $profileIndexed is_file($file);
  2.         if (!$profileIndexed) {
  3.             // Create directory
  4.             $dir = \dirname($file);
  5.             if (!is_dir($dir) && false === @mkdir($dir0777true) && !is_dir($dir)) {
  6.                 throw new \RuntimeException(sprintf('Unable to create the storage directory (%s).'$dir));
  7.             }
  8.         }
  9.         $profileToken $profile->getToken();
  10.         // when there are errors in sub-requests, the parent and/or children tokens
  1.             if ($collector instanceof LateDataCollectorInterface) {
  2.                 $collector->lateCollect();
  3.             }
  4.         }
  5.         if (!($ret $this->storage->write($profile)) && null !== $this->logger) {
  6.             $this->logger->warning('Unable to store the profiler information.', ['configured_storage' => \get_class($this->storage)]);
  7.         }
  8.         return $ret;
  9.     }
  1.             }
  2.         }
  3.         // save profiles
  4.         foreach ($this->profiles as $request) {
  5.             $this->profiler->saveProfile($this->profiles[$request]);
  6.         }
  7.         $this->profiles = new \SplObjectStorage();
  8.         $this->parents = new \SplObjectStorage();
  9.     }
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.     {
  2.         foreach ($listeners as $listener) {
  3.             if ($event->isPropagationStopped()) {
  4.                 break;
  5.             }
  6.             $listener($event$eventName$this);
  7.         }
  8.     }
  9.     /**
  10.      * Sorts the internal list of listeners for the given event by priority.
  1.      * @param object     $event     The event object to pass to the event handlers/listeners
  2.      */
  3.     protected function callListeners(iterable $listenersstring $eventName$event)
  4.     {
  5.         if ($event instanceof Event) {
  6.             $this->doDispatch($listeners$eventName$event);
  7.             return;
  8.         }
  9.         $stoppable $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function terminate(Request $requestResponse $response)
  5.     {
  6.         $this->dispatcher->dispatch(new TerminateEvent($this$request$response), KernelEvents::TERMINATE);
  7.     }
  8.     /**
  9.      * @internal
  10.      */
  1.         if (false === $this->booted) {
  2.             return;
  3.         }
  4.         if ($this->getHttpKernel() instanceof TerminableInterface) {
  5.             $this->getHttpKernel()->terminate($request$response);
  6.         }
  7.     }
  8.     /**
  9.      * {@inheritdoc}
Kernel->terminate(object(Request), object(Response)) in /var/www/api-s4/public/index.php (line 28)
  1. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  2. $request Request::createFromGlobals();
  3. $response $kernel->handle($request);
  4. $response->send();
  5. $kernel->terminate($request$response);

Stack Traces 2

[2/2] RuntimeException

RuntimeException:
No engine is able to work with the template "".

  at /var/www/api-s4/vendor/symfony/templating/DelegatingEngine.php:101
  at Symfony\Component\Templating\DelegatingEngine->getEngine(null)
     (/var/www/api-s4/vendor/symfony/framework-bundle/Templating/DelegatingEngine.php:44)
  at Symfony\Bundle\FrameworkBundle\Templating\DelegatingEngine->getEngine(null)
     (/var/www/api-s4/vendor/symfony/templating/DelegatingEngine.php:41)
  at Symfony\Component\Templating\DelegatingEngine->render(null, array('raw_exception' => object(RuntimeException), 'exception' => object(FlattenException), 'status' => 'error', 'status_code' => 500, 'status_text' => 'Internal Server Error', 'currentContent' => '', 'logger' => object(Logger)))
     (/var/www/api-s4/vendor/friendsofsymfony/rest-bundle/View/ViewHandler.php:378)
  at FOS\RestBundle\View\ViewHandler->renderTemplate(object(View), 'html')
     (/var/www/api-s4/vendor/friendsofsymfony/rest-bundle/View/ViewHandler.php:457)
  at FOS\RestBundle\View\ViewHandler->initResponse(object(View), 'html')
     (/var/www/api-s4/vendor/friendsofsymfony/rest-bundle/View/ViewHandler.php:431)
  at FOS\RestBundle\View\ViewHandler->createResponse(object(View), object(Request), 'html')
     (/var/www/api-s4/vendor/friendsofsymfony/rest-bundle/View/ViewHandler.php:315)
  at FOS\RestBundle\View\ViewHandler->handle(object(View))
     (/var/www/api-s4/vendor/friendsofsymfony/rest-bundle/Controller/ExceptionController.php:72)
  at FOS\RestBundle\Controller\ExceptionController->showAction(object(Request), object(RuntimeException), object(Logger))
     (/var/www/api-s4/vendor/symfony/http-kernel/HttpKernel.php:146)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 2)
     (/var/www/api-s4/vendor/symfony/http-kernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 2, false)
     (/var/www/api-s4/vendor/symfony/http-kernel/EventListener/ErrorListener.php:60)
  at Symfony\Component\HttpKernel\EventListener\ErrorListener->onKernelException(object(ExceptionEvent))
     (/var/www/api-s4/vendor/friendsofsymfony/rest-bundle/EventListener/ExceptionListener.php:80)
  at FOS\RestBundle\EventListener\ExceptionListener->onKernelException(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))
     (/var/www/api-s4/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))
     (/var/www/api-s4/vendor/symfony/event-dispatcher/EventDispatcher.php:264)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.exception', object(ExceptionEvent))
     (/var/www/api-s4/vendor/symfony/event-dispatcher/EventDispatcher.php:239)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.exception', object(ExceptionEvent))
     (/var/www/api-s4/vendor/symfony/event-dispatcher/EventDispatcher.php:73)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception')
     (/var/www/api-s4/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception')
     (/var/www/api-s4/vendor/symfony/http-kernel/HttpKernel.php:207)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable(object(RuntimeException), object(Request), 1)
     (/var/www/api-s4/vendor/symfony/http-kernel/HttpKernel.php:100)
  at Symfony\Component\HttpKernel\HttpKernel->terminateWithException(object(RuntimeException), object(Request))
     (/var/www/api-s4/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:116)
  at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}(object(RuntimeException))
     (/var/www/api-s4/vendor/symfony/error-handler/ErrorHandler.php:592)
  at Symfony\Component\ErrorHandler\ErrorHandler->handleException(object(RuntimeException))                

[1/2] RuntimeException

RuntimeException:
Unable to create the storage directory (/var/www/api-s4/var/cache/dev/profiler/86/06).

  at /var/www/api-s4/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php:143
  at Symfony\Component\HttpKernel\Profiler\FileProfilerStorage->write(object(Profile))
     (/var/www/api-s4/vendor/symfony/http-kernel/Profiler/Profiler.php:104)
  at Symfony\Component\HttpKernel\Profiler\Profiler->saveProfile(object(Profile))
     (/var/www/api-s4/vendor/symfony/http-kernel/EventListener/ProfilerListener.php:112)
  at Symfony\Component\HttpKernel\EventListener\ProfilerListener->onKernelTerminate(object(TerminateEvent), 'kernel.terminate', object(TraceableEventDispatcher))
     (/var/www/api-s4/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(TerminateEvent), 'kernel.terminate', object(TraceableEventDispatcher))
     (/var/www/api-s4/vendor/symfony/event-dispatcher/EventDispatcher.php:264)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener)), 'kernel.terminate', object(TerminateEvent))
     (/var/www/api-s4/vendor/symfony/event-dispatcher/EventDispatcher.php:239)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener)), 'kernel.terminate', object(TerminateEvent))
     (/var/www/api-s4/vendor/symfony/event-dispatcher/EventDispatcher.php:73)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(TerminateEvent), 'kernel.terminate')
     (/var/www/api-s4/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(TerminateEvent), 'kernel.terminate')
     (/var/www/api-s4/vendor/symfony/http-kernel/HttpKernel.php:88)
  at Symfony\Component\HttpKernel\HttpKernel->terminate(object(Request), object(Response))
     (/var/www/api-s4/vendor/symfony/http-kernel/Kernel.php:166)
  at Symfony\Component\HttpKernel\Kernel->terminate(object(Request), object(Response))
     (/var/www/api-s4/public/index.php:28)