MobileChromeApps / cordova-plugin-zip

Zip plugin for Cordova apps
Other
168 stars 207 forks source link

Unzip failed in iOS #66

Open safanmomin opened 8 years ago

safanmomin commented 8 years ago

I've successfully downloaded and installed your plugin on iOS but whenever I try to unzip it gives me the following error: "Error occurred during unzipping - failed to open zip file". This is what I've done so far;

I successfully downloaded my zip file using the cordova file transfer plugin and my code looks like this:

zip.unzip("file:///var/mobile/Containers/Data/Application/21347191-2DFA-4E0D-A6F6-54C25B0A4F1F/Library/files/file.zip", fileEntry.toURL(), function () { alert('success'); }); The source URL is where my zip file rests. I'm working on iOS 9.3.4. Is there something i'm doing wrong?

achimkoellner commented 6 years ago

It would be a great help if in case status -1 is returned an error callback or any kind of error message would be available.

panwenxin commented 4 years ago

2020-03-02 10:53:48.949065+0800 lookbook[15967:8224984] [SSZipArchive] Error: The file couldn’t be saved. 2020-03-02 10:53:48.964625+0800 lookbook[15967:8224984] Error occurred during unzipping - *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0] ( 0 CoreFoundation 0x000000020595debc + 252 1 libobjc.A.dylib 0x0000000204b2da50 objc_exception_throw + 56 2 CoreFoundation 0x00000002058d5384 _CFArgv + 0 3 CoreFoundation 0x000000020585b870 + 352 4 CoreFoundation 0x000000020584c3b4 + 64 5 lookbook 0x000000010090fe08 +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:progressHandler:completionHandler:] + 3220 6 lookbook 0x000000010090ee48 +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:] + 220 7 lookbook 0x0000000100904a24 __19-[ZipPlugin unzip:]_block_invoke + 400 8 libdispatch.dylib 0x000000010108f824 _dispatch_call_block_and_release + 24 9 libdispatch.dylib 0x0000000101090dc8 _dispatch_client_callout + 16 10 libdispatch.dylib 0x0000000101093c90 _dispatch_queue_override_invoke + 888 11 libdispatch.dylib 0x00000001010a21dc _dispatch_root_queue_drain + 376 12 libdispatch.dylib 0x00000001010a2bc8 _dispatch_worker_thread2 + 156 13 libsystem_pthread.dylib 0x000000020557917c _pthread_wqthread + 472 14 libsystem_pthread.dylib 0x000000020557bcec start_wqthread + 4 )

panwenxin commented 4 years ago

This is the error I reported when I decompressed the file. Is anyone in the same situation as me?My file is 800MB