tomasnorre/crawler

Exceptions in backend after activation

Closed this issue · 6 comments

Boa2 commented

Bug Report

Current Behavior
When activating version 11.0.1 or 11.0.2 I get an exception:
(1/1) ParseError
syntax error, unexpected 'EventDispatcher' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)

I deinstalled / reinstalled several times, tried to Flush Caches via the Install Tool which failed.
Also "Check for Broken Extensions" did not work - it processes endlessly.

I can install and activate Version 10.0.3.

Any ideas?

Environment

  • Crawler version(s): 11.0.1, 11.0.2
  • TYPO3 version(s): 10.4.23
  • Is your TYPO3 installation set up with Composer (Composer Mode): no
  • PHP Version 7.2.23

Possible Solution

Additional context
using indexed_search: yes

Hi there, thank you for taking your time to create your first issue. Please give us a bit of time to review it.

Hi @Boa2

Thanks for your report, can you please post a stack trace, I would be surprised if the stack trace didn't say where the syntax error is.

Boa2 commented

I hope this helps:

(1/1) ParseError

syntax error, unexpected 'EventDispatcher' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
in [...]/webseiten/dev/typo3conf/ext/crawler/Classes/Backend/RequestForm/StartRequestForm.php line 48

 * @var int
 */
private $reqMinute = 1000;

private EventDispatcher $eventDispatcher;

/**
 * @var array holds the selection of configuration from the configuration selector box
 */

at Composer\Autoload\includeFile('[...]/webseiten/dev/typo3conf/ext/crawler/Classes/Backend/RequestForm/StartRequestForm.php')
in [...]/typo3_src-10.4.23/vendor/composer/ClassLoader.php line 428

 */
public function loadClass($class)
{
    if ($file = $this->findFile($class)) {
        includeFile($file);

        return true;
    }

at Composer\Autoload\ClassLoader->loadClass('AOE\Crawler\Backend\RequestForm\StartRequestForm')
in [...]/typo3_src-10.4.23/vendor/typo3/class-alias-loader/src/ClassAliasLoader.php line 135

 * @return bool|null
 */
public function loadClass($className)
{
    $classFound = $this->composerClassLoader->loadClass($className);
    if (!$classFound && !$this->caseSensitiveClassLoading) {
        $classFound = $this->composerClassLoader->loadClass(strtolower($className));
    }
    return $classFound;

at TYPO3\ClassAliasLoader\ClassAliasLoader->loadClass('AOE\Crawler\Backend\RequestForm\StartRequestForm')
in [...]/typo3_src-10.4.23/vendor/typo3/class-alias-loader/src/ClassAliasLoader.php line 123

public function loadClassWithAlias($className)
{
    $originalClassName = $this->getOriginalClassName($className);

    return $originalClassName ? $this->loadOriginalClassAndSetAliases($originalClassName) : $this->loadClass($className);
}

/**
 * Load class with the option to respect case insensitivity

at TYPO3\ClassAliasLoader\ClassAliasLoader->loadClassWithAlias('AOE\Crawler\Backend\RequestForm\StartRequestForm')
at spl_autoload_call('AOE\Crawler\Backend\RequestForm\StartRequestForm')
at class_exists('AOE\Crawler\Backend\RequestForm\StartRequestForm')
in [...]/typo3_src-10.4.23/vendor/symfony/config/Resource/ClassExistenceResource.php line 84

        $autoloadedClass = self::$autoloadedClass;
        self::$autoloadedClass = ltrim($this->resource, '\\');

        try {
            $exists[0] = class_exists($this->resource) || interface_exists($this->resource, false) || trait_exists($this->resource, false);
        } catch (\Exception $e) {
            $exists[1] = $e->getMessage();

            try {

at Symfony\Component\Config\Resource\ClassExistenceResource->isFresh(0)
in [...]/typo3_src-10.4.23/vendor/symfony/dependency-injection/ContainerBuilder.php line 347

        if (isset($this->classReflectors[$class])) {
            $classReflector = $this->classReflectors[$class];
        } elseif (class_exists(ClassExistenceResource::class)) {
            $resource = new ClassExistenceResource($class, false);
            $classReflector = $resource->isFresh(0) ? false : new \ReflectionClass($class);
        } else {
            $classReflector = class_exists($class) ? new \ReflectionClass($class) : false;
        }
    } catch (\ReflectionException $e) {

at Symfony\Component\DependencyInjection\ContainerBuilder->getReflectionClass('AOE\Crawler\Backend\RequestForm\StartRequestForm')
in [...]/typo3_src-10.4.23/vendor/symfony/dependency-injection/Loader/FileLoader.php line 199

            continue;
        }

        try {
            $r = $this->container->getReflectionClass($class);
        } catch (\ReflectionException $e) {
            $classes[$class] = $e->getMessage();
            continue;
        }

at Symfony\Component\DependencyInjection\Loader\FileLoader->findClasses('AOE\Crawler\', '../Classes/*', array())
in [...]/typo3_src-10.4.23/vendor/symfony/dependency-injection/Loader/FileLoader.php line 99

    if (!preg_match('/^(?:[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+\\\\)++$/', $namespace)) {
        throw new InvalidArgumentException(sprintf('Namespace is not a valid PSR-4 prefix: "%s".', $namespace));
    }

    $classes = $this->findClasses($namespace, $resource, (array) $exclude);
    // prepare for deep cloning
    $serializedPrototype = serialize($prototype);

    foreach ($classes as $class => $errorMessage) {

at Symfony\Component\DependencyInjection\Loader\FileLoader->registerClasses(object(Symfony\Component\DependencyInjection\Definition), 'AOE\Crawler\', '../Classes/*', null)
in [...]/typo3_src-10.4.23/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php line 611

            throw new InvalidArgumentException(sprintf('A "resource" attribute must be of type string for service "%s" in "%s". Check your YAML syntax.', $id, $file));
        }
        $exclude = isset($service['exclude']) ? $service['exclude'] : null;
        $namespace = isset($service['namespace']) ? $service['namespace'] : $id;
        $this->registerClasses($definition, $namespace, $service['resource'], $exclude);
    } else {
        $this->setDefinition($id, $definition);
    }
}

at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->parseDefinition('AOE\Crawler\', array('resource' => '../Classes/*'), '[...]/webseiten/dev/typo3conf/ext/crawler/Configuration//Services.yaml', array('autowire' => true, 'autoconfigure' => true, 'public' => false))
in [...]/typo3_src-10.4.23/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php line 233

    $this->isLoadingInstanceof = false;
    $defaults = $this->parseDefaults($content, $file);
    foreach ($content['services'] as $id => $service) {
        $this->parseDefinition($id, $service, $file, $defaults);
    }
}

/**

at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->parseDefinitions(array('services' => array('AOE\Crawler' => array('resource' => '../Classes/*'), 'AOE\Crawler\Command\BuildQueueCommand' => array('tags' => array(array('name' => 'console.command', 'command' => 'crawler:buildQueue', 'description' => 'Create entries in the queue that can be processed at once'))), 'AOE\Crawler\Command\FlushQueueCommand' => array('tags' => array(array('name' => 'console.command', 'command' => 'crawler:flushQueue', 'description' => 'Remove queue entries and perform a cleanup'))), 'AOE\Crawler\Command\ProcessQueueCommand' => array('tags' => array(array('name' => 'console.command', 'command' => 'crawler:processQueue', 'description' => 'Trigger the crawler to process the queue entries'))))), '[...]/webseiten/dev/typo3conf/ext/crawler/Configuration//Services.yaml')
in [...]/typo3_src-10.4.23/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php line 153

    $this->anonymousServicesCount = 0;
    $this->anonymousServicesSuffix = '~'.ContainerBuilder::hash($path);
    $this->setCurrentDir(\dirname($path));
    try {
        $this->parseDefinitions($content, $path);
    } finally {
        $this->instanceof = [];
        $this->registerAliasesForSinglyImplementedInterfaces();
    }

at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->load('Services.yaml')
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/DependencyInjection/ContainerBuilder.php line 119

            $phpFileLoader->load('Services.php');
        }
        if (file_exists($diConfigDir . 'Services.yaml')) {
            $yamlFileLoader = new YamlFileLoader($containerBuilder, new FileLocator($diConfigDir));
            $yamlFileLoader->load('Services.yaml');
        }
    }
    // Store defaults entries in the DIC container
    // We need to use a workaround using aliases for synthetic services

at TYPO3\CMS\Core\DependencyInjection\ContainerBuilder->buildContainer(object(TYPO3\CMS\Core\Package\PackageManager), object(TYPO3\CMS\Core\DependencyInjection\ServiceProviderRegistry))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/DependencyInjection/ContainerBuilder.php line 84

    $containerClassName = $cacheIdentifier;

    $hasCache = $cache->requireOnce($cacheIdentifier) !== false;
    if (!$hasCache) {
        $containerBuilder = $this->buildContainer($packageManager, $serviceProviderRegistry);
        $this->dumpContainer($containerBuilder, $cache, $cacheIdentifier);
        $cache->requireOnce($cacheIdentifier);
    }
    $container = new $containerClassName();

at TYPO3\CMS\Core\DependencyInjection\ContainerBuilder->createDependencyInjectionContainer(object(TYPO3\CMS\Core\Package\PackageManager), object(TYPO3\CMS\Core\Cache\Frontend\PhpFrontend), false)
in [...]/typo3_src-10.4.23/typo3/sysext/install/Classes/Service/LateBootService.php line 79

    $failsafe = false;

    // Build a non-failsafe container which is required for loading ext_localconf
    return $this->container = $this->containerBuilder->createDependencyInjectionContainer($packageManager, $dependencyInjectionContainerCache, $failsafe);
}

/**
 * Switch global context to a new context, or revert

at TYPO3\CMS\Install\Service\LateBootService->prepareContainer()
in [...]/typo3_src-10.4.23/typo3/sysext/install/Classes/Service/LateBootService.php line 65

 * @return ContainerInterface
 */
public function getContainer(): ContainerInterface
{
    return $this->container ?? $this->prepareContainer();
}

/**
 * @return ContainerInterface

at TYPO3\CMS\Install\Service\LateBootService->getContainer()
in [...]/typo3_src-10.4.23/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php line 198

        $this->cacheManager->flushCachesInGroup('system');
    }

    // Load a new container as reloadCaches will load ext_localconf
    $container = $this->lateBootService->getContainer();
    $backup = $this->lateBootService->makeCurrent($container);

    $this->reloadCaches();
    $this->updateDatabase();

at TYPO3\CMS\Extensionmanager\Utility\InstallUtility->install('crawler')
in [...]/typo3_src-10.4.23/typo3/sysext/extensionmanager/Classes/Service/ExtensionManagementService.php line 385

        return [];
    }
    $this->eventDispatcher->dispatch(new BeforePackageActivationEvent($installQueue));
    $resolvedDependencies = [];
    $this->installUtility->install(...array_keys($installQueue));
    foreach ($installQueue as $extensionKey => $_) {
        if (!isset($resolvedDependencies['installed']) || !is_array($resolvedDependencies['installed'])) {
            $resolvedDependencies['installed'] = [];
        }

at TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService->installDependencies(array('crawler' => object(TYPO3\CMS\Extensionmanager\Domain\Model\Extension)))
in [...]/typo3_src-10.4.23/typo3/sysext/extensionmanager/Classes/Service/ExtensionManagementService.php line 244

    $this->downloadQueue->addExtensionToInstallQueue($extension);
    $installQueue += $this->downloadQueue->resetExtensionInstallStorage();
    $installedDependencies = [];
    if ($this->automaticInstallationEnabled) {
        $installedDependencies = $this->installDependencies($installQueue);
    }

    return array_merge($downloadedDependencies, $updatedDependencies, $installedDependencies);
}

at TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService->installExtension(object(TYPO3\CMS\Extensionmanager\Domain\Model\Extension))
in [...]/typo3_src-10.4.23/typo3/sysext/extensionmanager/Classes/Controller/UploadExtensionFileController.php line 231

public function activateExtension($extensionKey)
{
    $this->managementService->reloadPackageInformation($extensionKey);
    $extension = $this->managementService->getExtension($extensionKey);
    return is_array($this->managementService->installExtension($extension));
}

/**
 * Extracts a given t3x file and installs the extension

at TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController->activateExtension('crawler')
in [...]/typo3_src-10.4.23/typo3/sysext/extensionmanager/Classes/Controller/UploadExtensionFileController.php line 160

                $this->translate('extensionList.uploadFlashMessage.title'),
                FlashMessage::OK
            );
        } else {
            if ($this->activateExtension($extensionData['extKey'])) {
                $this->addFlashMessage(
                    $this->translate('extensionList.installedFlashMessage.message', [$extensionData['extKey']]),
                    '',
                    FlashMessage::OK

at TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController->extractAction(true)
in [...]/typo3_src-10.4.23/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php line 498

    }
    $validationResult = $this->arguments->validate();
    if (!$validationResult->hasErrors()) {
        $this->eventDispatcher->dispatch(new BeforeActionCallEvent(static::class, $this->actionMethodName, $preparedArguments));
        $actionResult = $this->{$this->actionMethodName}(...$preparedArguments);
    } else {
        $actionResult = $this->{$this->errorMethodName}();
    }

at TYPO3\CMS\Extbase\Mvc\Controller\ActionController->callActionMethod()
in [...]/typo3_src-10.4.23/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php line 426

    $this->view = $this->resolveView();
    if ($this->view !== null) {
        $this->initializeView($this->view);
    }
    $this->callActionMethod();
    $this->renderAssetsForRequest($request);
}

/**

at TYPO3\CMS\Extbase\Mvc\Controller\ActionController->processRequest(object(TYPO3\CMS\Extbase\Mvc\Web\Request), object(TYPO3\CMS\Extbase\Mvc\Web\Response))
in [...]/typo3_src-10.4.23/typo3/sysext/extbase/Classes/Mvc/Dispatcher.php line 89

            throw new InfiniteLoopException('Could not ultimately dispatch the request after ' . $dispatchLoopCount . ' iterations. Most probably, a @' . IgnoreValidation::class . ' annotation is missing on re-displaying a form with validation errors.', 1217839467);
        }
        $controller = $this->resolveController($request);
        try {
            $controller->processRequest($request, $response);
        } catch (StopActionException $ignoredException) {
        }
    }

at TYPO3\CMS\Extbase\Mvc\Dispatcher->dispatch(object(TYPO3\CMS\Extbase\Mvc\Web\Request), object(TYPO3\CMS\Extbase\Mvc\Web\Response))
in [...]/typo3_src-10.4.23/typo3/sysext/extbase/Classes/Mvc/Web/BackendRequestHandler.php line 36

{
    $request = $this->requestBuilder->build();
    /** @var \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response */
    $response = $this->objectManager->get(Response::class);
    $this->dispatcher->dispatch($request, $response);
    return $response;
}

/**

at TYPO3\CMS\Extbase\Mvc\Web\BackendRequestHandler->handleRequest()
in [...]/typo3_src-10.4.23/typo3/sysext/extbase/Classes/Core/Bootstrap.php line 226

    $this->initialize($configuration);

    $requestHandler = $this->requestHandlerResolver->resolveRequestHandler();
    /** @var ExtbaseResponse $extbaseResponse */
    $extbaseResponse = $requestHandler->handleRequest();

    // Convert to PSR-7 response and hand it back to TYPO3 Core
    $response = $this->convertExtbaseResponseToPsr7Response($extbaseResponse);
    $this->resetSingletons();

at TYPO3\CMS\Extbase\Core\Bootstrap->handleBackendRequest(object(TYPO3\CMS\Core\Http\ServerRequest))
at call_user_func_array(array(object(TYPO3\CMS\Extbase\Core\Bootstrap), 'handleBackendRequest'), array(object(TYPO3\CMS\Core\Http\ServerRequest)))
in [...]/typo3_src-10.4.23/typo3/sysext/backend/Classes/Http/RouteDispatcher.php line 66

    }
    $targetIdentifier = $route->getOption('target');
    $target = $this->getCallableFromTarget($targetIdentifier);
    $arguments = [$request];
    return call_user_func_array($target, $arguments);
}

/**
 * Wrapper method for static form protection utility

at TYPO3\CMS\Backend\Http\RouteDispatcher->dispatch(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/backend/Classes/Http/RequestHandler.php line 94

    // there are Core classes that need the Request object but do not get it handed in
    $this->resetGlobalsToCurrentRequest($request);
    try {
        // Check if the router has the available route and dispatch.
        return $this->dispatcher->dispatch($request);
    } catch (InvalidRequestTokenException $e) {
        // When token was invalid redirect to login
        $loginPage = GeneralUtility::makeInstance(UriBuilder::class)->buildUriFromRoute('login');
        return new RedirectResponse((string)$loginPage);

at TYPO3\CMS\Backend\Http\RequestHandler->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/extbase/Classes/Middleware/SignalSlotDeprecator.php line 49

 */
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
    $this->dispatcher->reportDeprecatedSignalSlots();
    return $handler->handle($request);
}

}

at TYPO3\CMS\Extbase\Middleware\SignalSlotDeprecator->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(TYPO3\CMS\Backend\Http\RequestHandler))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172

            if (!$middleware instanceof MiddlewareInterface) {
                throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
            }
            return $middleware->process($request, $this->next);
        }
    };
}

}

at class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/backend/Classes/Middleware/SiteResolver.php line 69

        }
        $site = $this->siteMatcher->matchByPageId($pageId, $rootLine);
        $request = $request->withAttribute('site', $site);
    }
    return $handler->handle($request);
}

}

at TYPO3\CMS\Backend\Middleware\SiteResolver->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172

            if (!$middleware instanceof MiddlewareInterface) {
                throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
            }
            return $middleware->process($request, $this->next);
        }
    };
}

}

at class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/backend/Classes/Middleware/AdditionalResponseHeaders.php line 41

 * @return ResponseInterface
 */
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
    $response = $handler->handle($request);
    foreach ($GLOBALS['TYPO3_CONF_VARS']['BE']['HTTP']['Response']['Headers'] ?? [] as $header) {
        [$headerName, $value] = explode(':', $header, 2);
        $response = $response->withAddedHeader($headerName, trim($value));
    }

at TYPO3\CMS\Backend\Middleware\AdditionalResponseHeaders->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172

            if (!$middleware instanceof MiddlewareInterface) {
                throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
            }
            return $middleware->process($request, $this->next);
        }
    };
}

}

at class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/backend/Classes/Middleware/OutputCompression.php line 47

    ob_clean();
    // Initialize output compression if configured
    $this->initializeOutputCompression();

    return $handler->handle($request);
}

/**
 * Initialize output compression if configured

at TYPO3\CMS\Backend\Middleware\OutputCompression->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172

            if (!$middleware instanceof MiddlewareInterface) {
                throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
            }
            return $middleware->process($request, $this->next);
        }
    };
}

}

at class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php line 79

    $GLOBALS['LANG'] = LanguageService::createFromUserPreferences($GLOBALS['BE_USER']);
    // Re-setting the user and take the workspace from the user object now
    $this->setBackendUserAspect($GLOBALS['BE_USER']);

    $response = $handler->handle($request);

    // If no backend user is logged-in, the cookie should be removed
    if (!GeneralUtility::makeInstance(Context::class)->getAspect('backend.user')->isLoggedIn()) {
        $GLOBALS['BE_USER']->removeCookie($GLOBALS['BE_USER']->name);

at TYPO3\CMS\Backend\Middleware\BackendUserAuthenticator->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172

            if (!$middleware instanceof MiddlewareInterface) {
                throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
            }
            return $middleware->process($request, $this->next);
        }
    };
}

}

at class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/backend/Classes/Middleware/BackendRouteInitialization.php line 58

    // Add the route path to the request
    $request = $request->withAttribute('routePath', $pathToRoute);

    return $handler->handle($request);
}

}

at TYPO3\CMS\Backend\Middleware\BackendRouteInitialization->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172

            if (!$middleware instanceof MiddlewareInterface) {
                throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
            }
            return $middleware->process($request, $this->next);
        }
    };
}

}

at class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/backend/Classes/Middleware/ForcedHttpsBackendRedirector.php line 55

        [$server, $address] = explode('/', $url, 2);
        return new RedirectResponse('https://' . $server . $sslPortSuffix . '/' . $address);
    }

    return $handler->handle($request);
}

}

at TYPO3\CMS\Backend\Middleware\ForcedHttpsBackendRedirector->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172

            if (!$middleware instanceof MiddlewareInterface) {
                throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
            }
            return $middleware->process($request, $this->next);
        }
    };
}

}

at class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/backend/Classes/Middleware/LockedBackendGuard.php line 75

        $request->getAttribute('normalizedParams')->getRemoteAddress(),
        trim((string)$GLOBALS['TYPO3_CONF_VARS']['BE']['IPmaskList'])
    );

    return $handler->handle($request);
}

/**
 * Check adminOnly configuration variable and redirects to an URL in file typo3conf/LOCK_BACKEND

at TYPO3\CMS\Backend\Middleware\LockedBackendGuard->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172

            if (!$middleware instanceof MiddlewareInterface) {
                throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
            }
            return $middleware->process($request, $this->next);
        }
    };
}

}

at class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Middleware/NormalizedParamsAttribute.php line 45

 */
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
    $request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($request));
    return $handler->handle($request);
}

}

at TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172

            if (!$middleware instanceof MiddlewareInterface) {
                throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
            }
            return $middleware->process($request, $this->next);
        }
    };
}

}

at class@anonymous[...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0xf5a0241b->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 78

 * @return ResponseInterface
 */
public function handle(ServerRequestInterface $request): ResponseInterface
{
    return $this->tip->handle($request);
}

/**
 * Seed the middleware stack with the inner request handler

at TYPO3\CMS\Core\Http\MiddlewareDispatcher->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/AbstractApplication.php line 85

 * @return ResponseInterface
 */
protected function handle(ServerRequestInterface $request): ResponseInterface
{
    return $this->requestHandler->handle($request);
}

/**
 * Set up the application and shut it down afterwards

at TYPO3\CMS\Core\Http\AbstractApplication->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/backend/Classes/Http/Application.php line 72

    $request = $request->withAttribute('applicationType', $applicationType);

    // Set up the initial context
    $this->initializeContext();
    return parent::handle($request);
}

/**
 * Check if LocalConfiguration.php and PackageStates.php exist

at TYPO3\CMS\Backend\Http\Application->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in [...]/typo3_src-10.4.23/typo3/sysext/core/Classes/Http/AbstractApplication.php line 97

final public function run(callable $execute = null)
{
    try {
        $response = $this->handle(
            ServerRequestFactory::fromGlobals()
        );
        if ($execute !== null) {
            call_user_func($execute);
        }

at TYPO3\CMS\Core\Http\AbstractApplication->run()
in [...]/typo3_src-10.4.23/typo3/index.php line 25

// Set up the application for the backend
call_user_func(function () {
$classLoader = require dirname(DIR).'/vendor/autoload.php';
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE);
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Backend\Http\Application::class)->run();
});

at {closure}()
in [...]/typo3_src-10.4.23/typo3/index.php line 26

call_user_func(function () {
$classLoader = require dirname(DIR).'/vendor/autoload.php';
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE);
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Backend\Http\Application::class)->run();
});

Thanks.

That helps. I overlooked the version at first.

TYPO3 Crawler 11.x isn't compatible with PHP 7.2 so that's why you're running into problems.
https://github.com/tomasnorre/crawler/#versions-and-support

Boa2 commented

Thank you for the info.

No problem. Thanks for your fast responses.