janjongboom / node-native-zip

Zipping in node.js with no external dependencies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OSX Archive Utility: Error 1 - Operation not permitted

nickmerwin opened this issue · comments

Hi, this seems to be the same issue as reported for PHPZip here:

Grandt/PHPZip#4

Other tools, such as Archive and even "unzip" via terminal, can open the zip file with no dramas - it's just the Archive Utility built into OSX that has dramas.

From the discusion:

The root cause is a mix between an odd behaviour of the deflate
algorithm in the PHP implementation of zlib, and a bug in the Mac OSX
"Archive Utility"

Has anyone else encountered this?

I've seen this only on the streaming branch. Master opens my files fine in archive utility.

I also received this error. Unzips fine from command line but archive utility complains that it is unable to unzip. Using the pull request with zlib compression fixed it for me (#3), I suspect it is some ascii character that is tripping up archive and the compression technique encodes it to something friendlier.

I'm also getting this error from latest on npm. I did as @CoolBlade did and used the fork that he used and the unzipping works great. I'm running node v0.8.19.

When I use that fork, I get a TypeError inside of the janzip.js file.

Nick, is it saying something about a callback in the stack? If so, thats the issue. I'm using his fork with great results on androidbootstrap.com. You can check out the source in this file: https://github.com/donnfelker/android-bootstrap-site/blob/master/routes/generate.js#L73

Instead of just getting a buffer you have to provide a callback. See the code above for a working example. Cheers

I'm experiencing this issue as well in 1.1.0.

yes, I have this issue too, and I tried other libs, like adm-zip, they'll have the same issue.

yes, I have this issue too, and I tried other libs, like adm-zip, they'll have the same issue.

++

I got the same error, finally, it works with onkis's version.

the only difference is that the part of writting .zip file should be put into the callback of .toBuffer method.

After assessing all other libraries out there, I've seen that this lib has been superseded by other, nicer libraries, more specifically node-archiver. Which would solve stuff like this. Sorry for that :-)

I've published the fork by onkis as node-native-zip-compression to npm, it solves this issue