Open jammind opened 4 years ago
I'll add my 2 cents to this, since I noticed a similar issue. Running in an emulator, it seems to work fine. But running on a device yields the following (obtained from adb logcat):
06-03 21:17:33.162 18084 21917 E Zip : An error occurred while unzipping.
06-03 21:17:33.162 18084 21917 E Zip : java.io.EOFException
06-03 21:17:33.162 18084 21917 E Zip : at libcore.io.Streams.readFully(Streams.java:83)
06-03 21:17:33.162 18084 21917 E Zip : at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:235)
06-03 21:17:33.162 18084 21917 E Zip : at org.apache.cordova.Zip.unzipSync(Zip.java:119)
06-03 21:17:33.162 18084 21917 E Zip : at org.apache.cordova.Zip.access$000(Zip.java:23)
06-03 21:17:33.162 18084 21917 E Zip : at org.apache.cordova.Zip$1.run(Zip.java:39)
06-03 21:17:33.162 18084 21917 E Zip : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
06-03 21:17:33.162 18084 21917 E Zip : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
06-03 21:17:33.162 18084 21917 E Zip : at java.lang.Thread.run(Thread.java:818)
Same issue recently with Mi Note 8, also MIUI.
Same here :(
Same problem here :(
@Gabriel-des I didn't find the solution using this plugin, but I did solve it using this package: https://stuk.github.io/jszip/ supplemented with https://capacitorjs.com/docs/v2/apis/filesystem
Mi Phone Mi MAX - Android 7.0 - MIUI 10.2 Stable No matter unzip() is successful or not or even with a wrong filename, it always returns -1. It works correctly on iOS.