react-native-zip-archive icon indicating copy to clipboard operation
react-native-zip-archive copied to clipboard

Can not unzip file(file was ziped by macOS)

Open ChauVV opened this issue 5 years ago • 6 comments

-React-native 0.63.0 -react-native-zip-archive v.5.0.6

when i zip a file by (react-native-zip-archive) then i unzip, every thing is ok.

but when i zip a file by my macbook(MacOS) then i download to my app, then i unzip by (react-native-zip-archive), it show error: ExceptionsManager.js:179 Error: failed to open zip file

any ideal, help please!

ChauVV avatar Nov 09 '20 10:11 ChauVV

Can you provide the zipped file you're using? I just tested on my Mac and it works well.

plrthink avatar Nov 10 '20 15:11 plrthink

I have faced the similar issue I'm trying to unzip a file which was created on windows machine and uploaded to server, when i dowloaded the same file in iOS and try to unzip with library it is throwing an error. [Error: failed to open zip file] But when i opened the file from mac folder path, it worked fine.

Madhu02 avatar Dec 21 '21 06:12 Madhu02

I have faced the similar issue

I'm trying to unzip a file which was created on windows machine and uploaded to server, when i dowloaded the same file in iOS and try to unzip with library it is throwing an error.

[Error: failed to open zip file]

But when i opened the file from mac folder path, it worked fine.

Could you please share the file you're trying to unzip?

plrthink avatar Dec 26 '21 11:12 plrthink

I have a similar problem. Described it in https://github.com/mockingbot/react-native-zip-archive/issues/254

ZIP File: https://disk.yandex.ru/d/6GSwFkS1Hr2s4g

valery-lavrik avatar Dec 30 '21 11:12 valery-lavrik

I have faced the similar issue I'm trying to unzip a file which was created on windows machine and uploaded to server, when i dowloaded the same file in iOS and try to unzip with library it is throwing an error. [Error: failed to open zip file] But when i opened the file from mac folder path, it worked fine.

Could you please share the file you're trying to unzip?

I have found out the root cause of the issue, when i called this unzip method inside resolve of promise, it din't work, i have to put this unzipping inside a function and called that function in resolve of promise then it worked.

Madhu02 avatar Dec 30 '21 15:12 Madhu02

I have faced the similar issue I'm trying to unzip a file which was created on windows machine and uploaded to server, when i dowloaded the same file in iOS and try to unzip with library it is throwing an error. [Error: failed to open zip file] But when i opened the file from mac folder path, it worked fine.

Could you please share the file you're trying to unzip?

I have found out the root cause of the issue, when i called this unzip method inside resolve of promise, it din't work, i have to put this unzipping inside a function and called that function in resolve of promise then it worked.

This doesn't make sense. Can you show the code you have trouble with? Maybe we can find the right solution.

plrthink avatar Jan 20 '22 05:01 plrthink