Page 1 of 1

Getting invalid status on uploading new version of mod

Posted: Mon Mar 18, 2019 2:01 am
by ProfoundDisputes
I am trying to upload the new version of my mod and it keeps telling me invalid as the status after I press the submit button.

I went to downloads and clicked "Edit". I then clicked on "Select a zip mod to Upload", selected my new mod version. It tells me that its ready. I than select submit and it tells me its invalid everytime. I have no idea why its invalid. Is there something I should know about releasing new versions?

Re: Getting invalid status on uploading new version of mod

Posted: Tue Mar 19, 2019 3:13 pm
by Sanqui
Hi, can you please upload your mod as an attachment here so I can take a look at the issue?

Also, you can try uploading it again. I have fixed the Releases page so it should now show the error more clearly (than just "Invalid").

Re: Getting invalid status on uploading new version of mod

Posted: Wed Mar 20, 2019 2:01 am
by ProfoundDisputes
I am getting this error now:
Capture.PNG
Capture.PNG (18.46 KiB) Viewed 2106 times
Honestly don't understand what to do about this. How do I prevent backslashes?

Re: Getting invalid status on uploading new version of mod

Posted: Wed Mar 20, 2019 9:49 am
by Sanqui
How convenient, this is a problem we were just now dealing with in the other thread! :)

Basically your mod is packaged in such a way that it's only compatible with Windows and not Linux... can you please tell me what program you're using to create the .zip archive? And please try 7zip instead.

Re: Getting invalid status on uploading new version of mod

Posted: Wed Mar 20, 2019 9:15 pm
by ProfoundDisputes
Sanqui wrote:
Wed Mar 20, 2019 9:49 am
How convenient, this is a problem we were just now dealing with in the other thread! :)

Basically your mod is packaged in such a way that it's only compatible with Windows and not Linux... can you please tell me what program you're using to create the .zip archive? And please try 7zip instead.
I am running this command from a batch script:

powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('C:\XXX', 'C:\User\AppData\Roaming\Factorio\mods\Adjustable-Personal-Roboport-Range_0.7.1.zip'); }"

I have a batch script that cleans up everything and compresses the file and sends it to factorio mod directory.

Re: Getting invalid status on uploading new version of mod

Posted: Thu Mar 21, 2019 10:58 am
by Sanqui
ProfoundDisputes wrote:
Wed Mar 20, 2019 9:15 pm
I am running this command from a batch script:

powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('C:\XXX', 'C:\User\AppData\Roaming\Factorio\mods\Adjustable-Personal-Roboport-Range_0.7.1.zip'); }"

I have a batch script that cleans up everything and compresses the file and sends it to factorio mod directory.
So this is a known bug in .NET's System.IO.Compression.ZipFile.CreateFromDirectory. It creates ZIP archives with windows-style directory separators (\) which are not portable (unreadable on Linux and macOS).
It has apparently been fixed in .NET Framework 4.6.1, but presumably your Powershell hasn't gotten the fix yet.

If you insist on using Powershell, there seem to be some workarounds. Simply 7zip should also be callable from the command line.

Sorry I don't have a better solution.