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.

MacBook

Posted on Oct 13, 2019 10:08 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 1, 2019 12:56 AM

The bug is in the Archive Utility provided with MacOS Catalina.


I have used "The Unarchiver" app downloaded from the App Store. Worked like a charm!

It asks you during unarchiving to choose the encoding for the characters causing the Archive Utility to crash.

77 replies

Jan 19, 2020 12:56 PM in response to Mackytack

Mackytack wrote:

I'm not really sure I know what to do? Pretend i'm a kindergartener and walk me through it?


Please read through the thread.


Start at the original question and first post, read through the investigation and the findings, and see if any of that seems familiar to your particular case, then continue reading through the replies and to the “here’s how to use...” replies listing the various options and alternatives, and links to more info.


This including using add-on tools, and using the integrated ditto command line tool.


If you have questions after reading the thread and having more background on this, and the options available here, post’m up.


Jan 20, 2020 4:03 AM in response to MrHoffman

One of what downloaded apps? You mean like ditto? Or are you telling me to type those commands into terminal? And will that automatically unzip ALL the files, or will I have to do each file/doc one at a time? As you can see, this is all very confusing, and most frustrating to me. I can't begin to tell you how SORRY and ANGRY I am about updating to catalina

Jan 20, 2020 4:20 AM in response to MrHoffman

Sooo, i've tried typing in these 2 command you gave...

mkdir ~/bar

ditto -x -k ~/foo.zip ~/bar

When I do the first one it says 'file exists', if I do the 'ditto' one, it says 'no such file or directory'

Either way, this means nothing to me. Nothing has changed. Am I supposed to highlight something?

I don't understand.

This all happened upon the update. I NEVER had ANY zipped files prior to the catalina update

Jan 20, 2020 9:53 AM in response to Mackytack

Okay, so you’ve somehow gotten zipped files? You’re not creating and transferring these around intentionally? If so, that’s something else. Quite possibly completely different than this whole preceding discussion.



As for the previous questions—and the following answers may not even be relevant here, given this apparently isn’t the intentional transfer of zip archives around among various computers—then you’re probably headed for somebody that can provide you with some custom scripts or tools to deal with whatever sequence and transfers you’re working with here. Otherwise, you’re going to be learning more about the command line and related scripting.


Apple has some dated command line primer documentation available, but little new documentation covering the shell they’re now using. Exactly none of which is likely appropriate for your situation and requirements here.


So... how are these zips appearing, and from where?



Jan 20, 2020 10:57 AM in response to MrHoffman

Ok so maybe I should start over. I updated my MacBook to Catalina. My microsoft word no longer works, and I am looking to upgrade. (this doesn't matter, but I thought i'd fill you in) I opened up a folder to print something for my class, and saw my files were zipped. (the example I sent you shows that some are, and some are not). When I clicked to open, the automatic zip app created another doc, but cannot be opened. Now I have installed The Unarchiver and tried that, but it seems my documents duplicate themselves, though can still not be opened. They don't look zipped, but they still don't open. The duplicate folders show all kinds of stuff I don't understand, but I still can't retrieve any of the documents themselves.


Jan 27, 2020 10:26 AM in response to Mackytack

Mackytack wrote:

@Namronksly, I downloaded the 'unarchiver' and it's still not helping. When I click to open the file, the unarchiver (or previously windup) pops up for a moment and disappears. Not unzipping


Your issue is not related to the rest of this thread.


You need to acquire and install a current Microsoft Office package or subscription, or install a recent LibreOffice, or maybe use the Apple iWork apps


Office and some other tools use zip as a storage container.


If you have a current Microsoft Office for Catalina loaded or an analog, you will be able to open and process these documents.


If you do manage to unzip these Office files without using Office or an equivalent, you’ll still be left with a wad of Office internal data, and not a meaningful file.


Feb 10, 2020 9:10 AM in response to STremby

STremby wrote:

Unable to unzip using the native zip utility. I'm attempting to unzip a file of text files. Never had this problem before Catalina.


1: read the whole thread. You’ll see how I debugged the details of the particular case being reported here, too.

2: What error messages shown, background and details, zip and unzip versions, sequences used, what have you tried?

Mar 17, 2020 1:06 AM in response to QuietMacFan

QuietMacFan wrote:

mine works fine with .zip files

i used Apples archive tool and have zero "3rd party apps" installed. worked one click no problem:


Many zips work just fine.


It’s the compatibility of some that’s at issue...


If it wasn’t one of the zips you’ve tested here, download the problematic zip from earlier in this thread, and try that.


Assuming that zip is still posted.


Also post your Catalina version, in the off chance this has been patched recently.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

unzip error 22: invalid argument

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.