Closed ayushnawani closed 6 years ago
same here, dunno why! the curious thing is that yesterday it was working great, but even if i did nothing special on the zip process, today it doesn't work anymore.
this is the error: https://cl.ly/1j0q0S3r3o1k i tried with version 1.1.1/2.0 and the latest release. i am on ios 11.
here is my code:
const unzippedPathName = response.data.substring(response.data.lastIndexOf('/') + 1).replace('.zip', '');
const unzippedPath = `${folder}/${unzippedPathName}`;
unzip(response.data, unzippedPath)
// TODO: Delete unzipped zip
.then(() => {
Actions.onDownloadComplete({
id: modelId,
path: unzippedPath
});
itemsSlice();
})
.catch((error) => {
Actions.onDownloadError({id: modelId, error});
itemsSlice();
});
ok, will check this tonight
Got the same error on iOS. unable to unzip any file...(works on android) iOS:11 "react-native": "^0.48.4", "react-native-zip-archive": "2.1.0",
This is really amazing. Without this package, it is practically impossible to unzip a file in react native...
This is the error I get:
2017-10-09 00:39:24.369 [info][tid:com.facebook.react.JavaScript] {"line":1766 "column":24 "sourceURL":"http://192.168.1.31.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false&hot=true" "framesToPop":1 "code":"unzip_error" "nativeStackIOS":["0 Anashim 0x0000000102cc7000 RCTJSErrorFromCodeMessageAndNSError + 152" "1 Anashim 0x0000000102c5295c __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.216 + 192" "2 Anashim 0x00000001033af08c -[RNZipArchive unzip:destinationPath:resolver:rejecter:] + 360" "3 CoreFoundation 0x000000018288b6a0
+ 144" "4 CoreFoundation 0x000000018276a820 + 292" "5 CoreFoundation 0x000000018276f22c + 60" "6 Anashim 0x0000000102c53dd0 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 1704" "7 Anashim 0x0000000102d09bc0 _ZN8facebook5react15RCTNativeModule11invokeInnerEjOKN5folly7dynamicE + 612" "8 Anashim 0x0000000102d0980c _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 84" "9 Anashim 0x0000000102d097ac ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28" "10 libdispatch.dylib 0x00000001042f949c _dispatch_call_block_and_release + 24" "11 libdispatch.dylib 0x00000001042f945c _dispatch_client_callout + 16" "12 libdispatch.dylib 0x0000000104308110 _dispatch_queue_serial_drain + 692" "13 libdispatch.dylib 0x00000001042fc9a4 _dispatch_queue_invoke + 332" "14 libdispatch.dylib 0x0000000104309104 _dispatch_root_queue_drain_deferred_wlh + 424" "15 libdispatch.dylib 0x0000000104310100 _dispatch_workloop_worker_thread + 652" "16 libsystem_pthread.dylib 0x00000001824aefe0 _pthread_wqthread + 932" "17 libsystem_pthread.dylib 0x00000001824aec30 start_wqthread + 4"] "userInfo":null "domain":"RCTErrorDomain"}
I found the problem in my case. I'm using react-native-document-picker. the file name received on iOS starts with file://. Removing it, fixed the problem...
[iOS] Still the same problem. @EyalSi my ios file start with: ""/private/var/mobile..." Any helps?
i zip succeed in ios11 !but i open this zip file failured in macOS.how to solve it?
Having an issue zipping in iOS. Verified file paths & iOS setup. Similar to what people report here, I end up w/ a 22 byte zip file that can't be opened. Original file (uncompressed) is formatted & of expected size.
just published the 2.2.6 which should fix this problem. sorry for such a late fix.
@plrthink Thanks for the fix! Can confirm that I'm now able to zip a single file.
for any size of source file , I am always getting zipped file of size 22 bytes.
It just happens in iOS, Android works fine. This problem happen again at exact version 5.0.2, when I fall back to version 5.0.1 solved it.
@MRDANX Can you show the code you're using? I can test it with the example and it works as expected.
@plrthink It's because I was zipping the plain text file, but v5.0.2 no longer supports zipping plain files, so I finally got the answer. the related issue here #204
@MRDANX Ok, that's indeed a problem which I would fix in the next release.
Hi, I am trying to zip a file then unzip the same file. But i am getting error while doing so. For folder is working perfectly fine but error is thrown in case of a file
Note : for any size of source file , I am always getting zipped file of size 22 bytes.
Any idea what i am doing wrong ? . Code :
Error Trace :