Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.


Question: unzip error 22: invalid argument

Upgraded to MacOS Catalina and now I cannot unzip any zipped file. I had no problems before. Also, moving the file or redownloading is not fixing it. Multiple files of different sizes failed. MacBook user here.


Posted on Oct 13, 2019 10:08 PM


There’s more to the conversation

Read all replies

Oct 15, 2019 8:47 AM in response to galking In response to galking

It’s either a corrupt zip archive, or your installed zip is old, or whatever is pretending to be zip is buggy.

Use zip -v and unzip -v and see if it’s older than InfoZip zip 3.0 and unzip 6.0.

If older, upgrade using homebrew or otherwise.

And if it’s not InfoZip zip and unzip you’re finding, homebrew yourself copies of InfoZip zip and unzip, and check again.

Oct 15, 2019 8:47 AM

Reply Helpful

Oct 15, 2019 9:35 AM in response to galking In response to galking

galking wrote:

After testing, I found that it was under windows, and the file contained the Chinese, this problem occurred when unzip. I unzipped it with catalina own zip tool.

Not sure what that sequence is, but guessing there’s an encoding problem with the Catalina GUI tools that are providing unzip support on Catalina, and you’ll want to log some feedback with Apple with as much detail on the character encoding and the rest of a reproducer as can be available.

Oct 15, 2019 9:35 AM

Reply Helpful

Oct 21, 2019 2:04 AM in response to galking In response to galking

It is NOT just Chinese Characters. All zipped files within the zip that have either extended ASCII letters or UTF in the filenames will not expand - at least if one uses the cli to unzip -- then the filenames with only ASCII in the names DO expand and are usable.

I have used the apple feedback link listed below.

Oct 21, 2019 2:04 AM

Reply Helpful (1)

Oct 23, 2019 9:13 AM in response to Chemostat In response to Chemostat

I just spoke to support. I was told this is happening because Catalina no longer reads 32 bit and if the file was compressed on a Microsoft computer a Mac running Catalina will not be able to read it. I was not given any fix for this, I guess they just assume the 32 bit will be phased out. I was told to try 7zip as a workaround, about to try that.

Oct 23, 2019 9:13 AM

Reply Helpful

Oct 23, 2019 10:03 AM in response to saul613 In response to saul613

32-bit apps and 32-bit archives are entirely different topics.

zip archives are transportable across a wide variety of platforms, and zip and unzip was 32-bit until zip 3 / unzip 6. (I’m still playing Whac-A-Mole with some folks running older versions, too.)

If the “real” unzip tool is hitting this crash, then there’s a bug or incompatibility in whatever tool compressed the file, or there’s a bug or limit in unzip, or a hole in the zip archive design. And it’ll still be necessary to read the older 32-bit zip archives for the foreseeable future, too.

Do you have an example zip archive file you can post somewhere? Folks here can take a look, and maybe this then gets identified and maybe then involves the Info-Zip folks? Also details on what OS and tool and command was used to generate it?

Based solely on what’s been posted, I’m wondering if there’s a filename-encoding incompatibility somewhere. Which would be entirely unrelated to 32-bit apps.

Oct 23, 2019 10:03 AM

Reply Helpful

Oct 23, 2019 10:40 AM in response to MrHoffman In response to MrHoffman

Unfortunately I cannot share the zip file due to the contents being secure. The file was sent from a Microsoft computer, I am not sure how it was generated. however I do know that the issue is only prevalent on mine and a co-workers Mac, it should also be noted we are the only two who have updated to Catalina. Others who haven't yet updated to Catalina can open the zip with no issue.

I did send myself another zip file from a MacBook Pro (not updated to Catalina) and was able to open this zip file without issue. I did with the apple tech on the phone and this is when he advised me about Catalina not being able to unzip a 32 bit file.

Mind you I am not at all IT support so don't have much knowledge, I am just the guy that has to deal with tech problems when they happen.

if anyone else has a similar issue and has found a fix that doesn't involve a third party app, I would love to hear it.

Oct 23, 2019 10:40 AM

Reply Helpful (2)

Oct 23, 2019 12:54 PM in response to saul613 In response to saul613

Well, if you should happen get another one that you can post, it’d be interesting to try to reproduce it, and pull apart the (broken?) archive. But this isn’t anything related to a 32-bit app, based on what I know of zip and of its archives. I’d look at the filenames within the archive, as an initial suspicion.

Oct 23, 2019 12:54 PM

Reply Helpful

Oct 24, 2019 7:17 AM in response to MrHoffman In response to MrHoffman

I can confirm it is the filenames with extended ASCII characters (letters with more than 8 bits). I have a collection of files in a single zip -- the files with ASCII filenames uncompress fine (via cli) - those with German characters and other extended ASCII and UTF-8 charcters do not. Only GUI gives the 22 error.

Oct 24, 2019 7:17 AM

Reply Helpful

Oct 24, 2019 7:45 AM in response to btihen In response to btihen

There are various schemes for Extended ASCII and character sets with eight or more bits lit and that aren’t UTF-8 or UTF-16 and Unicode, and that’s all an increasingly dead-end for portability, outside of maybe existing ISO Latin 1 ISO 8859-1 use. Microsoft Windows had (has?) its own extensions to ISO Latin 1.

Seems the GUI unzip tool has a problem (“limitation”?) with the character encoding in the filename.

Or the archive-generating tool (whatever tool and version that is, here) isn’t tagging the encoding correctly.

Package up the details and a reproducer and a link to this thread and lob some feedback at Apple, or call Apple Support with the details, or log a bug directly if you should have developer access to the bug reporter.

Oct 24, 2019 7:45 AM

Reply Helpful
User profile for user: Chemostat

Question: unzip error 22: invalid argument