[1.1.61] Error connecting to server: "TransferTarget threw an exception on stopDownload: CRC mismatch"

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Post Reply
User avatar
NIronwolf
Inserter
Inserter
Posts: 42
Joined: Sat Jul 07, 2018 6:44 am
Contact:

[1.1.61] Error connecting to server: "TransferTarget threw an exception on stopDownload: CRC mismatch"

Post by NIronwolf »

What did you do?
Tried to connect to multiplayer server approximately 100 times in a row. Also, another player outside my home took dozens of attempts before a successful connection.

What happened?
The server saves the map to it's temp directory. Then begins transmitting it to the client. When the transmission is complete the client tries to load the downloaded multiplayer save from it's temp directory, but fails because there are CRC errors for some number of files in the downloaded zip file.

What did you expect to happen instead? It might be obvious to you, but do it anyway!
As stated in the wiki https://wiki.factorio.com/Multiplayer "The game builds its own "reliable delivery" layer built on UDP to deal with packet loss and reordering issues." I expected that even during the download phase this would ensure a proper and complete uncorrupted transfer. Then that the client would load the save and join the game.

A lot of discussion and troubleshooting on stream was done. https://www.twitch.tv/videos/1517293921?t=00h27m32s

I have attached the log and the temp save from the server (mp-save-142.zip) and also the corrupted save transferred to the client (mp-download.zip).

Network topology is my server is running in a docker container under unRAID connected to the main WAN switch (which is the path to the ISP that my friend finally received a good file) and another switch that connects to my PC. During testing I even switched which network port I used on my PC.

IMHO I think something is happening with the UDP connection and the logic to make sure it's robust is failing somehow. The zip file from the server is perfectly fine and playable. The file that shows up in the client temp folder though has CRC errors on up to multiple files running a test with 7zip. Both files do have the exact same file size though.

Please note this isn't a desync issue, the downloaded map itself is corrupted.

In another thread kovarex stated that this could happen "very rarely" but this is fairly repeatable in this instance. I would be happy to PM server password to staff.
Attachments
mp-download.zip
(84.39 MiB) Downloaded 75 times
mp-save-142.zip
(84.39 MiB) Downloaded 84 times
factorio-current.log
(760.67 KiB) Downloaded 59 times

Loewchen
Global Moderator
Global Moderator
Posts: 8319
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [1.1.61] Error connecting to server: "TransferTarget threw an exception on stopDownload: CRC mismatch"

Post by Loewchen »

Does the issue persist if you launch a completely new game on the server?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.61] Error connecting to server: "TransferTarget threw an exception on stopDownload: CRC mismatch"

Post by Rseding91 »

I’m confused; are you saying after hundreds of attempts and switching the network connection while downloading it failed? Or hundreds of attempts failed and finally switching the network connection made it work?
If you want to get ahold of me I'm almost always on Discord.

User avatar
NIronwolf
Inserter
Inserter
Posts: 42
Joined: Sat Jul 07, 2018 6:44 am
Contact:

Re: [1.1.61] Error connecting to server: "TransferTarget threw an exception on stopDownload: CRC mismatch"

Post by NIronwolf »

Nothing made it work. My friend was able to connect after a couple dozen attempts.

This is about the 5th map we've run under Docker. Fresh maps are usually fine. As the size grows it gets less reliable and at this point has completely failed. A previous map was abandoned as it was taking a handful of tries to connect, but we deemed it basically complete. This map, we'd really like to complete the whole space exploration mod so we're more committed to making it work.

Later we just took the save from the server and I hosted it directly from my client (Steam) and it loaded just fine and also my friend downloaded on the first try.

Could there be something different with the headless server?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.61] Error connecting to server: "TransferTarget threw an exception on stopDownload: CRC mismatch"

Post by Rseding91 »

NIronwolf wrote:
Wed Jun 29, 2022 3:18 pm
Nothing made it work. My friend was able to connect after a couple dozen attempts.

This is about the 5th map we've run under Docker. Fresh maps are usually fine. As the size grows it gets less reliable and at this point has completely failed. A previous map was abandoned as it was taking a handful of tries to connect, but we deemed it basically complete. This map, we'd really like to complete the whole space exploration mod so we're more committed to making it work.

Later we just took the save from the server and I hosted it directly from my client (Steam) and it loaded just fine and also my friend downloaded on the first try.

Could there be something different with the headless server?
In the last 7 years I've heard of 1 other person having this specific issue which makes me think there's something very wrong with your Docker setup. If this issue was as common as it sounds like it is for you we would be flooded with bug reports about failing to connect to servers yet we aren't. Not that there can't be something wrong with how the networking works but it seems very unlikely or at a minimum what ever is going on is being exasperated by this specific setup.
If you want to get ahold of me I'm almost always on Discord.

User avatar
NIronwolf
Inserter
Inserter
Posts: 42
Joined: Sat Jul 07, 2018 6:44 am
Contact:

Re: [1.1.61] Error connecting to server: "TransferTarget threw an exception on stopDownload: CRC mismatch"

Post by NIronwolf »

Rseding91 wrote:
Wed Jun 29, 2022 9:05 pm
In the last 7 years I've heard of 1 other person having this specific issue which makes me think there's something very wrong with your Docker setup. If this issue was as common as it sounds like it is for you we would be flooded with bug reports about failing to connect to servers yet we aren't. Not that there can't be something wrong with how the networking works but it seems very unlikely or at a minimum what ever is going on is being exasperated by this specific setup.
I definitely agree with this. I can't think of anything I can do differently in the setup though.

The weirdest thing to me though is that it's saving a valid file on the server side but it just isn't making it to the client.

I'd like to keep trying other things here and I'll report back if anything seems to make a change. But as you've said, with no other reports, it does seem like a me thing unfortunately.

User avatar
NIronwolf
Inserter
Inserter
Posts: 42
Joined: Sat Jul 07, 2018 6:44 am
Contact:

Re: [1.1.61] Error connecting to server: "TransferTarget threw an exception on stopDownload: CRC mismatch"

Post by NIronwolf »

So I was curious how messed up the downloaded file was and did a binary diff over it. I don't know the internal coding for .zip, but I see that the corrupted download has a pattern in all three places it failed.

00 ?? ?? ?? ?? 88 ff ff

Don't suppose this makes any sense in how the client receives things?
javaw_2022-06-30_23-39-24.png
javaw_2022-06-30_23-39-24.png (60.64 KiB) Viewed 1846 times

arneyeric
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Feb 28, 2023 8:31 pm
Contact:

Re: [1.1.61] Error connecting to server: "TransferTarget threw an exception on stopDownload: CRC mismatch"

Post by arneyeric »

I'm also running into this problem...

I'm on a local LAN playing with my girlfriend. This our second factorio game with this problem. I believe as we play the game, saving takes longer and the transfer of the saved game gets bigger and bigger as we play. Seems like around the 300 hour mark we run into this problem. At first a reboot of the router helped, now we might get lucky after trying to down load for 30 mins. I have tryed many switchs with and without internet. I even disabled windows firewall.

I'm not sure UDP was the best option for sending the files over a network.


55.990 Info ClientMultiplayerManager.cpp:747: Received mapReadyForDownload
55.990 Downloading file C:\Users\earney\AppData\Roaming\Factorio\temp\mp-download.zip (494886478 B, auxiliary 143 B, 983871 blocks)
56.073 Info ClientMultiplayerManager.cpp:610: UpdateTick(4294967295) changing state from(ConnectedWaitingForMap) to(ConnectedDownloadingMap)
98.925 Finished download (42 s, 494 MB, 11.5 MB/s)
104.364 Info ClientMultiplayerManager.cpp:714: TransferTarget threw an exception on stopDownload: CRC mismatch. Expected 56f4fdfc, got b036bbff
104.364 Error ClientMultiplayerManager.cpp:99: MultiplayerManager failed: "Downloading map from other peers failed. Please try again."
104.365 Info ClientMultiplayerManager.cpp:610: UpdateTick(4294967295) changing state from(ConnectedDownloadingMap) to(Failed)

I might also mention we have the space exploration and a couple of other mods.
1.1.76

Any thoughts?
Last edited by arneyeric on Tue Feb 28, 2023 8:54 pm, edited 1 time in total.

Post Reply

Return to “Pending”