1.6 KiB
1.6 KiB
UE 5.7 HTTPServer Crashes PIE When Binding Root Route
Date: 2026-05-26
Project: garage / kamaz5360
Environment: Unreal Engine 5.7, Windows qore
Symptoms
- The editor opened normally.
- Pressing Play / PIE crashed immediately.
- The crash happened after adding a lightweight C++ HTTP telemetry server.
Crash Signature
Crash log excerpt:
Assertion failed: HttpPath.IsValidPath()
File: Engine\Source\Runtime\Online\HTTPServer\Private\HttpRouter.cpp
The failing route was:
Router->BindRoute(FHttpPath(TEXT("/")), EHttpServerRequestVerbs::VERB_GET, Handler);
Root Cause
In UE 5.7, FHttpPath::IsValidPath() returns false for root / because IsRoot() is treated as invalid for route binding. FHttpRouter::BindRoute uses check(HttpPath.IsValidPath()), so PIE asserts instead of returning a recoverable error.
Verified Solution
Do not bind / with HTTPServer. Use a non-root route:
Router->BindRoute(
FHttpPath(TEXT("/dashboard")),
EHttpServerRequestVerbs::VERB_GET,
FHttpRequestHandler::CreateUObject(this, &UMyServer::HandleDashboard));
Router->BindRoute(
FHttpPath(TEXT("/api/telemetry")),
EHttpServerRequestVerbs::VERB_GET,
FHttpRequestHandler::CreateUObject(this, &UMyServer::HandleTelemetry));
For kamaz5360, the working URLs are:
http://127.0.0.1:8765/dashboardhttp://127.0.0.1:8765/api/telemetry
Avoid
- Do not assume the root path is safe because most web frameworks allow it.
- Do not leave HTTP route registration untested until the user presses Play.
- If a route must behave like a landing page, bind
/dashboard,/index, or/uiand document the URL.