webamp icon indicating copy to clipboard operation
webamp copied to clipboard

Skin (forced_to_be.wsz) fails to parse

Open msikma opened this issue 6 years ago • 5 comments

Just happened to notice this tweet with a neat skin. Clicked through to try it out and got a "failed to parse skin" error.

I've attached the skin file.

2e146de10eef96773ea222fefad52eeb.wsz.zip

msikma avatar Nov 21 '19 21:11 msikma

Interesting. The error I get is:

Error: End of data reached (data length = 226274, asked index = 234498). Corrupted zip ?
    at i.checkIndex (jszip.js:1814)
    at i.checkOffset (jszip.js:1805)
    at i.readData (jszip.js:1980)
    at u.readBlockEndOfCentral (jszip.js:3567)
    at u.readEndOfCentral (jszip.js:3685)
    at u.load (jszip.js:3763)
    at jszip.js:1118
    at async Ka (skinParser.js:143)
    at /async https:/webamp.org/webamp-5aaa843739d91e520508.js:52

When I try to unzip at the CLI I get:

╰─➤ unzip 2e146de10eef96773ea222fefad52eeb.wsz.zip
Archive:  2e146de10eef96773ea222fefad52eeb.wsz.zip

caution:  zipfile comment truncated
warning [2e146de10eef96773ea222fefad52eeb.wsz.zip]:  zipfile claims to be last disk of a multi-part archive;
  attempting to process anyway, assuming all parts have been concatenated
  together in order.  Expect "errors" and warnings...true multi-part support
  doesn't exist yet (coming soon).
error [2e146de10eef96773ea222fefad52eeb.wsz.zip]:  missing 1075838976 bytes in zipfile
  (attempting to process anyway)
error [2e146de10eef96773ea222fefad52eeb.wsz.zip]:  attempt to seek before beginning of zipfile
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)

I wonder how we were able to take the screenshot in the first place...

captbaritone avatar Nov 21 '19 21:11 captbaritone

I'm afraid that might be my fault, somehow? I downloaded the wsz and zipped it myself using The Unarchiver on OSX. However, it seems to be unzipping fine for me. md5sum of the files:

2e146de10eef96773ea222fefad52eeb  2e146de10eef96773ea222fefad52eeb.wsz
862a6420e9d72f86d7c3dc0f702998d3  2e146de10eef96773ea222fefad52eeb.wsz.zip

The unzipped sha1sum is the exact same as for the file when I directly download it from the link in the tweet. Could it be that your download of the Github attachment failed?

msikma avatar Nov 21 '19 22:11 msikma

Looks like you zipped the wsz and uploaded here, but I am getting that error when trying to unzip the actual wsz as well.

─[14:27]: jeldredge at jeldredge-mbp in ~/Downloads/test
╰─➤ md5 2e146de10eef96773ea222fefad52eeb.wsz
MD5 (2e146de10eef96773ea222fefad52eeb.wsz) = 2e146de10eef96773ea222fefad52eeb

╭─[14:27]: jeldredge at jeldredge-mbp in ~/Downloads/test
╰─➤ unzip 2e146de10eef96773ea222fefad52eeb.wsz
Archive:  2e146de10eef96773ea222fefad52eeb.wsz

caution:  zipfile comment truncated
warning [2e146de10eef96773ea222fefad52eeb.wsz]:  zipfile claims to be last disk of a multi-part archive;
  attempting to process anyway, assuming all parts have been concatenated
  together in order.  Expect "errors" and warnings...true multi-part support
  doesn't exist yet (coming soon).
error [2e146de10eef96773ea222fefad52eeb.wsz]:  missing 1075838976 bytes in zipfile
  (attempting to process anyway)
error [2e146de10eef96773ea222fefad52eeb.wsz]:  attempt to seek before beginning of zipfile
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)

If you rename the .wsz to .zip and unzip that does it work?

captbaritone avatar Nov 21 '19 22:11 captbaritone

Ah, no, you are correct. I didn't know .wsz files are actually zip files. I get precisely the same error as you do, down to the byte.

Maybe it's the upload/mirroring to AWS that failed?

msikma avatar Nov 21 '19 22:11 msikma

I suspect that the archive is corrupt. I get the same error downloading directly from AWS: https://cdn.webampskins.org/skins/2e146de10eef96773ea222fefad52eeb.wsz

I don't think the file got corrupted during upload since the md5 of the file I download still works. I would say the file is just corrupt, except for the fact that we apparently generated a screenshot for it at some point.

captbaritone avatar Sep 23 '20 23:09 captbaritone