Symfony Exception

InvalidArgumentException

HTTP 500 Internal Server Error

The directory "/var/www/vhosts/hosting128659.a2e0d.netcup.net/httpdocs/Sulu-ALL/var/cache/website/dev/jms_serializer" does not exist.

Exception

InvalidArgumentException

  1.     private $dir;
  2.     public function __construct(string $dir)
  3.     {
  4.         if (!is_dir($dir)) {
  5.             throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist.'$dir));
  6.         }
  7.         $this->dir rtrim($dir'\\/');
  8.     }
  1.         $a = new \Metadata\MetadataFactory(new \Metadata\Driver\LazyLoadingDriver(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($this->getService, [
  2.             'metadata_driver' => ['services''jms_serializer.metadata_driver''getJmsSerializer_MetadataDriverService'true],
  3.         ], [
  4.             'metadata_driver' => '?',
  5.         ]), 'metadata_driver'), 'Metadata\\ClassHierarchyMetadata'true);
  6.         $a->setCache(new \Metadata\Cache\FileCache(($this->targetDir.''.'/jms_serializer')));
  7.         $b = ($this->services['fos_rest.serializer.jms_handler_registry'] ?? $this->load('getFosRest_Serializer_JmsHandlerRegistryService'));
  8.         $c = new \Symfony\Component\ExpressionLanguage\ExpressionLanguage();
  9.         $c->registerProvider(new \JMS\SerializerBundle\ExpressionLanguage\BasicSerializerFunctionsProvider());
  10.         $d = new \JMS\Serializer\Expression\ExpressionEvaluator($c, ['container' => $this]);
  1.      *
  2.      * @return \Sulu\Component\Serializer\ArraySerializer
  3.      */
  4.     protected function getSuluCore_ArraySerializerService()
  5.     {
  6.         return $this->services['sulu_core.array_serializer'] = new \Sulu\Component\Serializer\ArraySerializer(($this->services['jms_serializer'] ?? $this->getJmsSerializerService()));
  7.     }
  8.     /**
  9.      * Gets the public 'sulu_core.webspace.request_analyzer' shared service.
  10.      *
in var/cache/website/dev/ContainerY7keB1k/App_KernelDevDebugContainer.php -> getSuluCore_ArraySerializerService (line 2641)
  1.         $this->services['twig'] = $instance = new \Twig\Environment(($this->privates['twig.loader.native_filesystem'] ?? $this->getTwig_Loader_NativeFilesystemService()), ['autoescape' => 'name''cache' => ($this->targetDir.''.'/twig'), 'charset' => 'UTF-8''debug' => true'strict_variables' => true]);
  2.         $a = ($this->services['request_stack'] ?? ($this->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack()));
  3.         $b = ($this->privates['router.request_context'] ?? $this->getRouter_RequestContextService());
  4.         $c = ($this->privates['debug.file_link_formatter'] ?? $this->getDebug_FileLinkFormatterService());
  5.         $d = ($this->services['sulu_core.array_serializer'] ?? $this->getSuluCore_ArraySerializerService());
  6.         $e = new \Sulu\Component\Cache\Memoize(new \Doctrine\Common\Cache\ArrayCache(), 1);
  7.         $f = ($this->services['sulu.content.mapper'] ?? $this->getSulu_Content_MapperService());
  8.         $g = ($this->services['sulu_core.webspace.request_analyzer'] ?? $this->getSuluCore_Webspace_RequestAnalyzerService());
  9.         $h = ($this->services['sulu_website.resolver.structure'] ?? $this->getSuluWebsite_Resolver_StructureService());
  10.         $i = ($this->services['sulu_snippet.default_snippet.manager'] ?? $this->getSuluSnippet_DefaultSnippet_ManagerService());
  1.         $instance->add(new \Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector($a, ($this->targetDir.''.'/App_KernelDevDebugContainer'), $c));
  2.         $instance->add(new \Symfony\Component\HttpKernel\DataCollector\EventDataCollector(NULL$c));
  3.         $instance->add(($this->privates['data_collector.router'] ?? ($this->privates['data_collector.router'] = new \Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector())));
  4.         $instance->add($d);
  5.         $instance->add(new \Symfony\Component\Translation\DataCollector\TranslationDataCollector(($this->services['translator'] ?? $this->getTranslatorService())));
  6.         $instance->add(new \Symfony\Bridge\Twig\DataCollector\TwigDataCollector(($this->privates['twig.profile'] ?? ($this->privates['twig.profile'] = new \Twig\Profiler\Profile())), ($this->services['twig'] ?? $this->getTwigService())));
  7.         $instance->add($e);
  8.         $instance->add($f);
  9.         $instance->add(new \Doctrine\Bundle\PHPCRBundle\DataCollector\PHPCRDataCollector(($this->services['doctrine_phpcr'] ?? $this->getDoctrinePhpcrService())));
  10.         $instance->add(new \Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector($this));
  11.         $instance->add(($this->services['data_collector.dump'] ?? $this->getDataCollector_DumpService()));
  1.      *
  2.      * @return \Symfony\Component\HttpKernel\EventListener\ProfilerListener
  3.      */
  4.     protected function getProfilerListenerService()
  5.     {
  6.         return $this->privates['profiler_listener'] = new \Symfony\Component\HttpKernel\EventListener\ProfilerListener(($this->services['profiler'] ?? $this->getProfilerService()), ($this->services['request_stack'] ?? ($this->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack())), NULLfalsefalse);
  7.     }
  8.     /**
  9.      * Gets the private 'property_info' shared service.
  10.      *
  1.         }, => 'onKernelRequest'], 48);
  2.         $instance->addListener('kernel.response', [=> function () {
  3.             return ($this->privates['profiler_listener'] ?? $this->getProfilerListenerService());
  4.         }, => 'onKernelResponse'], -100);
  5.         $instance->addListener('kernel.exception', [=> function () {
  6.             return ($this->privates['profiler_listener'] ?? $this->getProfilerListenerService());
  7.         }, => 'onKernelException'], 0);
  8.         $instance->addListener('kernel.terminate', [=> function () {
  9.             return ($this->privates['profiler_listener'] ?? $this->getProfilerListenerService());
  10.         }, => 'onKernelTerminate'], -1024);
  11.         $instance->addListener('kernel.controller', [=> function () {
in vendor/symfony/event-dispatcher/EventDispatcher.php -> ContainerY7keB1k\{closure} (line 267)
  1.             foreach ($listeners as &$listener) {
  2.                 $closure = &$this->optimized[$eventName][];
  3.                 if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && >= \count($listener)) {
  4.                     $closure = static function (...$args) use (&$listener, &$closure) {
  5.                         if ($listener[0] instanceof \Closure) {
  6.                             $listener[0] = $listener[0]();
  7.                             $listener[1] = $listener[1] ?? '__invoke';
  8.                         }
  9.                         ($closure = \Closure::fromCallable($listener))(...$args);
  10.                     };
  11.                 } else {
in vendor/symfony/event-dispatcher/EventDispatcher.php :: Symfony\Component\EventDispatcher\{closure} (line 230)
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  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()) {
in vendor/symfony/http-kernel/HttpKernel.php -> handleThrowable (line 90)
  1.                 $this->finishRequest($request$type);
  2.                 throw $e;
  3.             }
  4.             return $this->handleThrowable($e$request$type);
  5.         }
  6.     }
  7.     /**
  8.      * {@inheritdoc}
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in public/index.php (line 66)
  1. // When using the HttpCache, you need to call the method in your front controller
  2. // instead of relying on the configuration parameter
  3. // https://symfony.com/doc/3.4/reference/configuration/framework.html#http-method-override
  4. Request::enableHttpMethodParameterOverride();
  5. $request Request::createFromGlobals();
  6. $response $kernel->handle($request);
  7. $response->send();
  8. $kernel->terminate($request$response);

Logs 3

Level Channel Message
CRITICAL 09:00:40 request Uncaught PHP Exception ProxyManager\Exception\InvalidProxyDirectoryException: "Provided directory "/var/www/vhosts/hosting128659.a2e0d.netcup.net/httpdocs/Sulu-ALL/var/cache/website/dev/sulu/proxies" does not exist" at /var/www/vhosts/hosting128659.a2e0d.netcup.net/httpdocs/Sulu-ALL/vendor/ocramius/proxy-manager/src/ProxyManager/Exception/InvalidProxyDirectoryException.php line 19
{
    "exception": {}
}
CRITICAL 09:00:40 php Uncaught Exception: The directory "/var/www/vhosts/hosting128659.a2e0d.netcup.net/httpdocs/Sulu-ALL/var/cache/website/dev/jms_serializer" does not exist.
{
    "exception": {}
}
CRITICAL 09:00:40 request Uncaught PHP Exception InvalidArgumentException: "The directory "/var/www/vhosts/hosting128659.a2e0d.netcup.net/httpdocs/Sulu-ALL/var/cache/website/dev/jms_serializer" does not exist." at /var/www/vhosts/hosting128659.a2e0d.netcup.net/httpdocs/Sulu-ALL/vendor/jms/metadata/src/Cache/FileCache.php line 19
{
    "exception": {}
}

Stack Trace

InvalidArgumentException

InvalidArgumentException:
The directory "/var/www/vhosts/hosting128659.a2e0d.netcup.net/httpdocs/Sulu-ALL/var/cache/website/dev/jms_serializer" does not exist.

  at vendor/jms/metadata/src/Cache/FileCache.php:19
  at Metadata\Cache\FileCache->__construct('/var/www/vhosts/hosting128659.a2e0d.netcup.net/httpdocs/Sulu-ALL/var/cache/website/dev/jms_serializer')
     (var/cache/website/dev/ContainerY7keB1k/App_KernelDevDebugContainer.php:1570)
  at ContainerY7keB1k\App_KernelDevDebugContainer->getJmsSerializerService()
     (var/cache/website/dev/ContainerY7keB1k/App_KernelDevDebugContainer.php:2271)
  at ContainerY7keB1k\App_KernelDevDebugContainer->getSuluCore_ArraySerializerService()
     (var/cache/website/dev/ContainerY7keB1k/App_KernelDevDebugContainer.php:2641)
  at ContainerY7keB1k\App_KernelDevDebugContainer->getTwigService()
     (var/cache/website/dev/ContainerY7keB1k/App_KernelDevDebugContainer.php:1692)
  at ContainerY7keB1k\App_KernelDevDebugContainer->getProfilerService()
     (var/cache/website/dev/ContainerY7keB1k/App_KernelDevDebugContainer.php:3234)
  at ContainerY7keB1k\App_KernelDevDebugContainer->getProfilerListenerService()
     (var/cache/website/dev/ContainerY7keB1k/App_KernelDevDebugContainer.php:1372)
  at ContainerY7keB1k\App_KernelDevDebugContainer->ContainerY7keB1k\{closure}()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:267)
  at Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}(object(ExceptionEvent), 'kernel.exception', object(EventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure)), 'kernel.exception', object(ExceptionEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception')
     (vendor/symfony/http-kernel/HttpKernel.php:218)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable(object(InvalidProxyDirectoryException), object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:90)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:196)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:66)