Error 500 Internal Server Error

GET https://dev.thelliervoyages.com/media/cache/resolve/destination_large/fb/e6/8ec71fe617de5e5f1a762f54720f.

Exceptions

The mime type of file fb/e6/8ec71fe617de5e5f1a762f54720f. must be image/xxx or application/pdf, got application/x-empty.

Exception

Liip\ImagineBundle\Exception\ LogicException

  1. if (null === $binary->getMimeType()) {
  2. throw new LogicException(\sprintf('The mime type of image %s was not guessed.', $path));
  3. }
  4. if (0 !== mb_strpos($binary->getMimeType(), 'image/') && 'application/pdf' !== $binary->getMimeType()) {
  5. throw new LogicException(\sprintf('The mime type of file %s must be image/xxx or application/pdf, got %s.', $path, $binary->getMimeType()));
  6. }
  7. return $binary;
  8. }
  1. /**
  2. * @throws NonExistingFilterException
  3. */
  4. private function createFilteredBinary(FilterPathContainer $filterPathContainer, string $filter): BinaryInterface
  5. {
  6. $binary = $this->dataManager->find($filter, $filterPathContainer->getSource());
  7. try {
  8. return $this->filterManager->applyFilter($binary, $filter, $filterPathContainer->getOptions());
  9. } catch (NonExistingFilterException $e) {
  10. $this->logger->debug(\sprintf(
in vendor/liip/imagine-bundle/Service/FilterService.php -> createFilteredBinary (line 205)
  1. ?string $resolver = null,
  2. bool $forced = false
  3. ): bool {
  4. if ($forced || !$this->cacheManager->isStored($filterPathContainer->getTarget(), $filter, $resolver)) {
  5. $this->cacheManager->store(
  6. $this->createFilteredBinary($filterPathContainer, $filter),
  7. $filterPathContainer->getTarget(),
  8. $filter,
  9. $resolver
  10. );
in vendor/liip/imagine-bundle/Service/FilterService.php -> warmUpCacheFilterPathContainer (line 123)
  1. * @return string
  2. */
  3. public function getUrlOfFilteredImage($path, $filter, $resolver = null, bool $webpSupported = false)
  4. {
  5. foreach ($this->buildFilterPathContainers($path) as $filterPathContainer) {
  6. $this->warmUpCacheFilterPathContainer($filterPathContainer, $filter, $resolver);
  7. }
  8. return $this->resolveFilterPathContainer(new FilterPathContainer($path), $filter, $resolver, $webpSupported);
  9. }
  1. $path = PathHelper::urlPathToFilePath($path);
  2. // TODO once we limit `symfony/http-foundation` to 6.4 or newer, use `$request->query->getString()`
  3. $resolver = $request->query->has('resolver') ? (string) $request->query->get('resolver') : null;
  4. return $this->createRedirectResponse(function () use ($path, $filter, $resolver, $request) {
  5. return $this->filterService->getUrlOfFilteredImage(
  6. $path,
  7. $filter,
  8. $resolver,
  9. $this->isWebpSupported($request)
  10. );
in vendor/liip/imagine-bundle/Controller/ImagineController.php -> {closure:Liip\ImagineBundle\Controller\ImagineController::filterAction():91} (line 163)
  1. }
  2. private function createRedirectResponse(\Closure $url, string $path, string $filter, ?string $hash = null): RedirectResponse
  3. {
  4. try {
  5. return new RedirectResponse($url(), $this->controllerConfig->getRedirectResponseCode());
  6. } catch (NotLoadableException $exception) {
  7. if (null !== $this->dataManager->getDefaultImageUrl($filter)) {
  8. return new RedirectResponse($this->dataManager->getDefaultImageUrl($filter));
  9. }
  1. {
  2. $path = PathHelper::urlPathToFilePath($path);
  3. // TODO once we limit `symfony/http-foundation` to 6.4 or newer, use `$request->query->getString()`
  4. $resolver = $request->query->has('resolver') ? (string) $request->query->get('resolver') : null;
  5. return $this->createRedirectResponse(function () use ($path, $filter, $resolver, $request) {
  6. return $this->filterService->getUrlOfFilteredImage(
  7. $path,
  8. $filter,
  9. $resolver,
  10. $this->isWebpSupported($request)
in vendor/symfony/http-kernel/HttpKernel.php -> filterAction (line 183)
  1. $this->dispatcher->dispatch($event, KernelEvents::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, $event);
  9. $this->dispatcher->dispatch($event, KernelEvents::VIEW);
  1. $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2. $this->requestStack->push($request);
  3. $response = null;
  4. try {
  5. return $response = $this->handleRaw($request, $type);
  6. } catch (\Throwable $e) {
  7. if ($e instanceof \Error && !$this->handleAllThrowables) {
  8. throw $e;
  9. }
  1. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
  1. ) {
  2. }
  3. public function run(): int
  4. {
  5. $response = $this->kernel->handle($this->request);
  6. if (Kernel::VERSION_ID >= 60400) {
  7. $response->send(false);
  8. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 29)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/var/www/vhosts/dev.thelliervoyages.com/httpdocs/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Logs

Level Channel Message
INFO 05:31:33 deprecation User Deprecated: The Liip\ImagineBundle\Templating\FilterTrait trait is deprecated since version 2.7 and will be removed in 3.0; use Twig instead.
{
    "exception": {}
}
INFO 05:31:33 deprecation User Deprecated: The Liip\ImagineBundle\Templating\FilterExtension class is deprecated since version 2.7 and will be removed in 3.0; configure "liip_imagine.twig.mode" to "lazy" instead.
{
    "exception": {}
}
INFO 05:31:33 deprecation User Deprecated: Class "Doctrine\ORM\Proxy\Autoloader" is deprecated. Use native lazy objects instead. (Autoloader.php:74 called by DoctrineBundle.php:136, https://github.com/doctrine/orm/pull/12005, package doctrine/orm)
{
    "exception": {}
}
INFO 05:31:33 deprecation User Deprecated: Version detection logic for MySQL will change in DBAL 4. Please specify the version as the server reports it, e.g. "10.9.3-MariaDB" instead of "mariadb-10.9". (AbstractMySQLDriver.php:176 called by AbstractMySQLDriver.php:45, https://github.com/doctrine/dbal/pull/5779, package doctrine/orm)
{
    "exception": {}
}
INFO 05:31:33 doctrine Connecting with parameters {params}
{
    "params": {
        "use_savepoints": true,
        "driver": "pdo_mysql",
        "idle_connection_ttl": 600,
        "host": "localhost",
        "port": 3306,
        "user": "thellier",
        "password": "<redacted>",
        "driverOptions": [],
        "defaultTableOptions": [],
        "dbname": "dev_thellier",
        "serverVersion": "mariadb-11.8.3",
        "charset": "utf8mb4"
    }
}
DEBUG 05:31:33 doctrine Executing query: SELECT t0.id AS id_1, t0.is_activate AS is_activate_2, t0.ips AS ips_3, t0.message AS message_4 FROM maintenance t0 LIMIT 1
{
    "sql": "SELECT t0.id AS id_1, t0.is_activate AS is_activate_2, t0.ips AS ips_3, t0.message AS message_4 FROM maintenance t0 LIMIT 1"
}
INFO 05:31:33 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "b8fc51"
    },
    "request_uri": "https://dev.thelliervoyages.com/_profiler/b8fc51",
    "method": "GET"
}

Stack Trace

LogicException
Liip\ImagineBundle\Exception\LogicException:
The mime type of file fb/e6/8ec71fe617de5e5f1a762f54720f. must be image/xxx or application/pdf, got application/x-empty.

  at vendor/liip/imagine-bundle/Imagine/Data/DataManager.php:146
  at Liip\ImagineBundle\Imagine\Data\DataManager->find()
     (vendor/liip/imagine-bundle/Service/FilterService.php:222)
  at Liip\ImagineBundle\Service\FilterService->createFilteredBinary()
     (vendor/liip/imagine-bundle/Service/FilterService.php:205)
  at Liip\ImagineBundle\Service\FilterService->warmUpCacheFilterPathContainer()
     (vendor/liip/imagine-bundle/Service/FilterService.php:123)
  at Liip\ImagineBundle\Service\FilterService->getUrlOfFilteredImage()
     (vendor/liip/imagine-bundle/Controller/ImagineController.php:92)
  at Liip\ImagineBundle\Controller\ImagineController->{closure:Liip\ImagineBundle\Controller\ImagineController::filterAction():91}()
     (vendor/liip/imagine-bundle/Controller/ImagineController.php:163)
  at Liip\ImagineBundle\Controller\ImagineController->createRedirectResponse()
     (vendor/liip/imagine-bundle/Controller/ImagineController.php:91)
  at Liip\ImagineBundle\Controller\ImagineController->filterAction()
     (vendor/symfony/http-kernel/HttpKernel.php:183)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:193)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:29)
  at require_once('/var/www/vhosts/dev.thelliervoyages.com/httpdocs/vendor/autoload_runtime.php')
     (public/index.php:5)