Closed josedlpozo closed 5 years ago
Thank you for your contribution!
There are some other open issues with a similar stacktrace, maybe this migration from Zip4j to stdlib will fix them too.
Do we need the debug.apk
added in this PR?
Hi @egor-n!
No, we don't need debug.apk
, I'm removing it. Also I'm fixing travis build.
Thanks!
Hi @egor-n !
Are you okay with the changes? Our builds to Fabric are blocked by this issue :cry:
Thank you!
@josedlpozo yes, more than okay 👍 I will test and merge the PR on this weekend.
@josedlpozo thank you, I have released 2.1 which includes this fix.
Hi! After our migration to AndroidX, we realize that we can't use your plugin to upload our apks to Fabric Beta. This is the stacktrace when we try to upload an apk:
Fabric Beta Publisher Plugin: Temporary crashlytics390902122369488431.zip got deleted = true ERROR: Build step failed with exception java.lang.ArrayIndexOutOfBoundsException: 3 at net.lingala.zip4j.util.Raw.readShortLittleEndian(Raw.java:57) at net.lingala.zip4j.core.HeaderReader.readExtraDataRecords(HeaderReader.java:471) at net.lingala.zip4j.core.HeaderReader.readAndSaveExtraDataRecord(HeaderReader.java:420) at net.lingala.zip4j.core.HeaderReader.readCentralDirectory(HeaderReader.java:338) at net.lingala.zip4j.core.HeaderReader.readAllHeaders(HeaderReader.java:94) at net.lingala.zip4j.core.ZipFile.readZipInfo(ZipFile.java:425) at net.lingala.zip4j.core.ZipFile.getFileHeader(ZipFile.java:707) at fabric.beta.publisher.AppRelease.from(AppRelease.java:28) at fabric.beta.publisher.FabricBetaPublisher.uploadApkFile(FabricBetaPublisher.java:162) at fabric.beta.publisher.FabricBetaPublisher.publishFabric(FabricBetaPublisher.java:134) at fabric.beta.publisher.FabricBetaPublisher.perform(FabricBetaPublisher.java:87) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1840) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Build step 'Upload .apk to Fabric Beta' marked build as failure
Zip4j is not able to unzip the apk and it crashes. My fix is to remove Zip4j library and replace it with classes from java standard library.