Page 1 of 1

Very poor error message when attempting to load a not-mod

Posted: Sat Nov 05, 2016 12:44 am
by 274Below
So, on my server, I went and downloaded a mod:

Code: Select all

$ wget https://mods.factorio.com/api/downloads/data/mods/57/Flow%20Control_2.1.2.zip
Started the server, and got the following incredibly not-useful error message and a server crash:

Code: Select all

Error Util.cpp:57: Opening zip /opt/factorio/data/instance2/write/mods/Flow Control_2.1.2.zip failed: Success
This is not a helpful error message when you save a copy of the mods.factorio.com login page as the .zip file instead, which is exactly what happens when you use wget to download the files without also passing it your related cookies. I would hope that factorio whines in the log appropriately about it not being able to open a .zip (as it isn't a .zip) and then continue loading the server.

I also definitely didn't spend more than a day trying to fix this.

Also happened over here: https://www.reddit.com/r/factorio/comme ... tall_mods/

Re: Very poor error message when attempting to load a not-mod

Posted: Sun Nov 06, 2016 3:20 pm
by Rseding91
What kind of error would you expect? If the zip fails to open the best we can do is say "it failed to open". We don't know why - maybe it's corrupt - maybe someone downloaded a webpage and saved it with the extension .zip.

Re: Very poor error message when attempting to load a not-mod

Posted: Sun Nov 06, 2016 7:06 pm
by 274Below
I wouldn't expect "Failed: Success" to be the error message plus a server crash. Ideally it'd say something akin to "Unable to parse .zip file."

The 'bug' here is the "Failed: Success" bit. It doesn't actually tell you what the problem is, just that something failed while succeeding.