You might encounter an error when running an app that was uploaded to Sauce Storage with the following error:
An unknown server-side error occurred while processing the command. Original
error: The file signature '--' of '/tmp/tmpye49Us/myapp.app.zip' is not equal
to the expected ZIP archive signature 'PK'
where --
is any set of characters other than PK.
PK represent the file signature which Appium does before every test to ensure that the zip file provided is correctly structured.
Checking for issue
Easy way to check if this happened and is the cause of your issue:
- Re-upload your application and take note of the MD5 has that is outputted by our storage request.
Example:
{"username":"myusername","filename":"myapp.app.zip","size":23140917,"md5":"bb93cd10eef72caa570e8d21b50e37f4","etag":"10c9c1a7680478d130c41011226e7d15"}
- With the help of a tool like md5sum on macOS and Linux or CertUtil on Windows calculate the MD5 sum of your app.
macOS/Linux
md5sum /path/to/myapp.app.zip
Windows
CertUtil -hashfile C:\path\to\myapp.app.zip MD5
The resulting hash should match with the output from your upload.
Fixing problem
This issue is generally caused by something other than the binary blob being sent to our server.
Some possible causes:
- Your curl command is sending more data than the --data-binary contents. This could be an additional -d flag that should not be sent
- Your curl command or REST client is sending the application as a multi-part content as opposed to a simple binary blob.
- Some other utility that is adding data to the data binary stream sent to us