8 – Errors when migrating a project

I am migrating a Drupal project within a site, but I get the following error.

The website encountered an unexpected error. Please try again later.
Error: Call to a member function all() on null in DrupalCorePathPathValidator->getUrl() (line 129 of corelibDrupalCorePathPathValidator.php).
DrupalCorePathPathValidator->getUrl('node/5992', ) (Line: 89)
DrupalCorePathPathValidator->getUrlIfValidWithoutAccessCheck('node/5992') (Line: 415)
DrupalCoreUrl::fromInternalUri(Array, Array) (Line: 307)
DrupalCoreUrl::fromUri('internal:/node/5992', Array) (Line: 209)
DrupalCoreUrl::fromUserInput('/node/5992') (Line: 96)
DrupalCoreEventSubscriberCustomPageExceptionHtmlSubscriber->makeSubrequestToCustomPath(Object, '/node/5992', 403) (Line: 71)
DrupalCoreEventSubscriberCustomPageExceptionHtmlSubscriber->on403(Object) (Line: 109)
DrupalCoreEventSubscriberHttpExceptionSubscriberBase->onException(Object, 'kernel.exception', Object) (Line: 111)
DrupalComponentEventDispatcherContainerAwareEventDispatcher->dispatch('kernel.exception', Object) (Line: 221)
SymfonyComponentHttpKernelHttpKernel->handleException(Object, Object, 1) (Line: 75)
SymfonyComponentHttpKernelHttpKernel->handle(Object, 1, 1) (Line: 57)
DrupalCoreStackMiddlewareSession->handle(Object, 1, 1) (Line: 47)
DrupalCoreStackMiddlewareKernelPreHandle->handle(Object, 1, 1) (Line: 207)
Drupalpage_cacheStackMiddlewarePageCache->fetch(Object, 1, 1) (Line: 121)
Drupalpage_cacheStackMiddlewarePageCache->lookup(Object, 1, 1) (Line: 75)
Drupalpage_cacheStackMiddlewarePageCache->handle(Object, 1, 1) (Line: 47)
DrupalCoreStackMiddlewareReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
DrupalCoreStackMiddlewareNegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
StackStackedHttpKernel->handle(Object, 1, 1) (Line: 656)
DrupalCoreDrupalKernel->handle(Object) (Line: 19)

I cannot solve it. I hope you can support me.