Comments (13)
nice, thanks!
from react-native-zip-archive.
The same seems to happen with the file exists but is not a valid zip.
from react-native-zip-archive.
@cancan101 I will fix this ASAP.
from react-native-zip-archive.
Also seeing this problem...
But even when the file exists and is a valid zip, this doesn't seem to work... any tips on debugging?
from react-native-zip-archive.
@WestleyArgentum I'm using react-native-fs
to get access to the zip file on the simulator to check the it. I think any methods which can get path to the zip file is ok.
I would improve this.
from react-native-zip-archive.
I'm using react-native-fs
to download the zip, and I use RNFS.readDir
to check and make sure the zip file is downloaded correctly... but then when I try to unzip it nothing happens and I don't see any errors...
from react-native-zip-archive.
@WestleyArgentum You mean the promise is just hanging?
from react-native-zip-archive.
@WestleyArgentum I think maybe you're dong something wrong wth promise code, e.g. not return the promise from the inner promise chain which I have ran into before.
from react-native-zip-archive.
Sorry I disappeared there, but in this case I don't think the error is promise related -- my code is just like the example:
ZipArchive.unzip(RNFS.DocumentDirectoryPath + '/images.zip', RNFS.DocumentDirectoryPath)
.then(() => {
// check to see what exists in the directory...
RNFS.readDir(RNFS.DocumentDirectoryPath)
.then((result) => {
// shows images.zip, but not an unzipped folder or any of the contents of the zip...
console.log('things in directory:', result);
});
})
.catch((err) => {
cb(err);
});
Does that look ok?
from react-native-zip-archive.
Ah, I realized I can use xcode to step through the code and my problem was with directories. Would be really cool to have those errors raised through .catch
though
Thanks for your help!
from react-native-zip-archive.
@WestleyArgentum oh, can you explain a little bit about your resolution? So I can collect errors should be raised.
from react-native-zip-archive.
So, I've never spent much time in objective c, but I think the problem is here: https://github.com/plrthink/react-native-zip-archive/blob/master/RNZipArchive.m#L19
It looks like these methods take in a pointer to a pointer to an error: https://github.com/plrthink/react-native-zip-archive/blob/fb47345d3094e7e85bf49af747758acea7fe43d3/SSZipArchive/SSZipArchive.m#L47
And that you should pass that in, check if it gets set, and raise an error instead of calling the callback
from react-native-zip-archive.
fixed with b622cb0
from react-native-zip-archive.
Related Issues (20)
- Android warning: "new NativeEventEmitter() was called with a non-null argument without the required addListener method"
- ld: library not found for -lRNZipArchive - iOS HOT 5
- Uncaught Exception in zip4j HOT 3
- Old SSZipArchive dependency in iOS podspec HOT 5
- Invariant Violation: `new NativeEventEmitter()` requires a non-null argument. | Expo HOT 2
- charset GBK or UTF-8 is no work in ios HOT 4
- skipping some files and folders in unarchiving HOT 3
- problem with dependencies
- Failed to extract file Found Zip Path Traversal Vulnerability
- Convert a single file (.txt / .pdf / .xls) to a zip file from a specific path. HOT 1
- Supplying an encoded URI containing %20 in IOS causes a 'failed to open zip file'
- Undefined is not an object on unzip() - Android HOT 1
- Error: Failed to extract file invalid END header HOT 1
- How to upload completly folder with subfolders? HOT 1
- [IOS] Crash app when zip or unzip on Xcode 15 HOT 2
- There are always 25 files in my link, but when using this component to extract, only 23 are left HOT 1
- Progress on Android from 0 to 1 HOT 1
- Unzip file with expo HOT 4
- Android unzip process slower than iOS HOT 2
- Request - more fine grained error messages on iOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-zip-archive.