Getting invalid status on uploading new version of mod

A place to talk about the official Factorio mod portal (https://mods.factorio.com)
Post Reply
ProfoundDisputes
Inserter
Inserter
Posts: 22
Joined: Mon Jun 27, 2016 4:20 pm
Contact:

Getting invalid status on uploading new version of mod

Post 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?

User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 268
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: Getting invalid status on uploading new version of mod

Post 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").
ovo

ProfoundDisputes
Inserter
Inserter
Posts: 22
Joined: Mon Jun 27, 2016 4:20 pm
Contact:

Re: Getting invalid status on uploading new version of mod

Post by ProfoundDisputes »

I am getting this error now:
Capture.PNG
Capture.PNG (18.46 KiB) Viewed 2083 times
Honestly don't understand what to do about this. How do I prevent backslashes?
Attachments
Adjustable-Personal-Roboport-Range_0.7.1.zip
(47.96 KiB) Downloaded 84 times

User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 268
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: Getting invalid status on uploading new version of mod

Post 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.
ovo

ProfoundDisputes
Inserter
Inserter
Posts: 22
Joined: Mon Jun 27, 2016 4:20 pm
Contact:

Re: Getting invalid status on uploading new version of mod

Post 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.

User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 268
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: Getting invalid status on uploading new version of mod

Post 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.
ovo

Post Reply

Return to “Mod portal Discussion”