Ghost says invalid ZIP when upload my theme


#1

Hello, I am developing my second Ghost theme named “Aakari”. Just before releasing the theme, I realized that Ghost is not allowing my theme to upload. I prepare the ZIP file of my theme with the npm run package command. Which actually runs gulp package .

The package task for Gulp is directly copied from the default Casper theme’s gulpfile.js. Here is the console output of Ghost when uploading my theme:

As the error says, I tested the generated archive using 7-Zip and WinRAR and both say that it is a valid archive. I also manually prepared an archive using 7-Zip and did not apply any compression. But still, I get this error. Please help me solve it and release my theme. This is a free theme and the whole source code is available for anybody who would like to use it, on GitHub.

https://github.com/vasanthdeveloper/aakari


Update 2: Tired of creating the ZIP archive in a Linux environment.

A co-developer I work with pointed out this issue on GitHub. After reading and doing a bit of experiment, I decided to create the ZIP archive in a Linux environment. I used WSL (Windows Subsystem for Linux), and installed Ubuntu 18.04 and ran the npm run package command once again.

And :frowning_face: sadly, the ZIP file did not get accepted by Ghost.


  • Version 2.5.0
  • Environment development
  • Database sqlite3
  • Mail Native

Thank You :slight_smile:


#2

Could you pls open the developer console in your browser and record the upload request?
The request will show you which content type is used in the form.

Thanks :slight_smile:


#3

Thanks for responding. Below is the screenshot of the error shown in Developer Tools Google Chrome Console:


#4

@vasanthdeveloper what we need is the network request headers to show which content type was sent by your browser. Eg:


#5

I am really sorry for not responding from last 3 days. My health was a bit upset.
Though I use the exact same GulpJS code from the Casper theme. It does not work. :frowning_face:
Below is the screenshot of the Network tab:

I really don’t know what is happening here though I am a web developer. The Content-Type seems to be different.
Please help me :frowning_face:


#6

The content-type is set by the browser/OS when uploading the file rather than by whatever generates the zip file. In this case your browser is sending .zip which is something we haven’t seen before so our content type validations are getting confused. Our validation will need to be updated to account for it.


#7

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.