Cannot create RouteContext before routing has been completed

Hi
Does anyone know in 2021 how to fix the below.
i have remove all page redirection events
debug does not show anything as the page goes not load.
thanks

( ! ) Fatal error: Uncaught RuntimeException: Cannot create RouteContext before routing has been completed in C:\wamp64\www\demo-2021\vendor\slim\slim\Slim\Routing\RouteContext.php on line 40
( ! ) RuntimeException: Cannot create RouteContext before routing has been completed in C:\wamp64\www\demo-2021\vendor\slim\slim\Slim\Routing\RouteContext.php on line 40
Call Stack

Time Memory Function Location

1 0.0005 407624 {main}( ) …\index.php:0
2 0.0724 2364912 Slim\App->run( ) …\index.php:98
3 0.0729 2373760 Slim\App->handle( ) …\App.php:199
4 0.0729 2373760 Slim\MiddlewareDispatcher->handle( ) …\App.php:215
5 0.0729 2373760 {anonymous-class:C:\wamp64\www\demo-2021\vendor\slim\slim\Slim\MiddlewareDispatcher.php:127-142}->handle( ) …\MiddlewareDispatcher.php:81
6 0.0729 2373760 Slim\Middleware\ErrorMiddleware->process( ) …\MiddlewareDispatcher.php:140
7 5.5083 6159168 Slim\Middleware\ErrorMiddleware->handleException( ) …\ErrorMiddleware.php:109
8 5.5083 6159168 PHPMaker2021\PST_2020\HttpErrorHandler->__invoke( ) …\ErrorMiddleware.php:127
9 5.5084 6159208 PHPMaker2021\PST_2020\HttpErrorHandler->respond( ) …\ErrorHandler.php:179
10 5.6262 19887936 Slim\Routing\RouteContext::fromRequest( ) …\HttpErrorHandler.php:71

( ! ) Fatal error: Uncaught RuntimeException: Cannot create RouteContext before routing has been completed in C:\wamp64\www\demo-2021\vendor\slim\slim\Slim\Routing\RouteContext.php on line 40
( ! ) RuntimeException: Cannot create RouteContext before routing has been completed in C:\wamp64\www\demo-2021\vendor\slim\slim\Slim\Routing\RouteContext.php on line 40
Call Stack

Time Memory Function Location

1 5.6322 19902968 PHPMaker2021\PST_2020\ShutdownHandler->__invoke( ) …\ShutdownHandler.php:0
2 5.6329 19911704 PHPMaker2021\PST_2020\HttpErrorHandler->__invoke( ) …\ShutdownHandler.php:73
3 5.6329 19911704 PHPMaker2021\PST_2020\HttpErrorHandler->respond( ) …\ErrorHandler.php:179
4 5.6330 19912712 Slim\Routing\RouteContext::fromRequest( ) …\HttpErrorHandler.php:71

hello i import and upload my project(2020) for testing in my local server using version 2021, but after upload to web host i get this:

Fatal error: Uncaught RuntimeException: Cannot create RouteContext before routing has been completed in C:\xampp\htdocs\2021\vendor\slim\slim\Slim\Routing\RouteContext.php:40 Stack trace: #0 C:\xampp\htdocs\2021\src\HttpErrorHandler.php(71): Slim\Routing\RouteContext::fromRequest(Object(Slim\Http\ServerRequest)) #1 C:\xampp\htdocs\2021\vendor\slim\slim\Slim\Handlers\ErrorHandler.php(179): PHPMaker2021\HR_FileCenter_3\HttpErrorHandler->respond() #2 C:\xampp\htdocs\2021\vendor\slim\slim\Slim\Middleware\ErrorMiddleware.php(127): Slim\Handlers\ErrorHandler->__invoke(Object(Slim\Http\ServerRequest), Object(FastRoute\BadRouteException), false, false, false) #3 C:\xampp\htdocs\2021\vendor\slim\slim\Slim\Middleware\ErrorMiddleware.php(109): Slim\Middleware\ErrorMiddleware->handleException(Object(Slim\Http\ServerRequest), Object(FastRoute\BadRouteException)) #4 C:\xampp\htdocs\2021\vendor\slim\slim\Slim\MiddlewareDispatcher.php(140): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) in C:\xampp\htdocs\2021\vendor\slim\slim\Slim\Routing\RouteContext.php on line 40

i disable all my reports and work , so i will start figure out what happen

Click Tools → Advanced Settings, turn on “Debug” and “Log error to file”, run the app again, check the error log file (e.g. log-2020-09-09.log) under \log.

I can’t get mine to run either. Mine will not even start. I’m on IIS. I had to install the URL Rewriter and then I got this. I turned on debug. No log file is generated.

404
Error
Route ‘index.php’ not found.

govconbiz wrote:

No log file is generated.

Have you already checked from the .log file inside the “log” sub-folder under your root of web application?

This error is due to a PHP error occurred before routing. Click Tools → Update Template and try again. The error should be shown. (The error will also be logged in the log file if logging enabled, see previous post above.)

Thank you. That was a great tip.