R2Northstar / NorthstarLauncher

Launcher used to modify Titanfall 2 to allow mods to be loaded
MIT License
278 stars 125 forks source link

Parse error for some "verification timed out" response #607

Open GeckoEidechse opened 9 months ago

GeckoEidechse commented 9 months ago

When receiving

image

it produces

Failed reading masterserver authentication response: "Encountered parse error "Invalid value."

on launcher, i.e. it fails to parse the response correctly.

Related: https://github.com/R2Northstar/NorthstarLauncher/blob/da7061a846759cd63dd1907a9df163f4c5b17cf6/NorthstarDLL/masterserver/masterserver.cpp#L1267

pg9182 commented 9 months ago

This may not be reproducible, as I haven't seen it before the case today. Either way, something is odd in the launcher code.

GeckoEidechse commented 9 months ago

Seems I was able to reproduce it by just running a v1.20.2-rc1 docker image without port forwarding.

GeckoEidechse commented 8 months ago

Can also reproduce on Windows by just running a dedi without port forwarding.

GeckoEidechse commented 8 months ago

Printing the buffer returned from the master server by doing something like

...
if (result == CURLcode::CURLE_OK)
{
    rapidjson_document serverAddedJson;
    spdlog::error("############################################");
    spdlog::error("{}", readBuffer.c_str());
    spdlog::error("############################################");
    serverAddedJson.Parse(readBuffer.c_str());
...

I get

...
[2024-01-04] [22:25:08] [NORTHSTAR] [info] Attempting to register the local server to the master server.
[2024-01-04] [22:25:18] [NORTHSTAR] [error] ############################################
[2024-01-04] [22:25:20] [NORTHSTAR] [error] error code: 502
[2024-01-04] [22:25:20] [NORTHSTAR] [error] ############################################
[2024-01-04] [22:25:20] [NORTHSTAR] [error] Failed reading masterserver authentication response: encountered parse error "Invalid value."
[2024-01-04] [22:25:20] [NORTHSTAR] [error] Reached max ms server registration attempts.

implying the master server does not return valid JSON?

ASpoonPlaysGames commented 8 months ago

cc @pg9182 i guess?

pg9182 commented 8 months ago

Uh, you're saying it returned error code: 502 literally? Because nothing in atlas would do that... It's almost as if something is putting the http status into there.

GeckoEidechse commented 8 months ago

Uh, you're saying it returned error code: 502 literally?

At least that's what in that buffer here. Not sure what the easiest way is to dump the full response. Curl logging?

GeckoEidechse commented 1 month ago

Related: https://github.com/R2Northstar/Northstar/issues/685

Basically Cloudflare ingesting its own response here