Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unzip() always return -1 on Android #89

Open
jammind opened this issue Apr 30, 2020 · 5 comments
Open

unzip() always return -1 on Android #89

jammind opened this issue Apr 30, 2020 · 5 comments

Comments

@jammind
Copy link

jammind commented Apr 30, 2020

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.

@jasonsultana
Copy link

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)

@AntonERG
Copy link

Same issue recently with Mi Note 8, also MIUI.

@mariapaulinar
Copy link

Same here :(

@Gabriel-des
Copy link

Same problem here :(

@mariapaulinar
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants