jenkinsci / allure-plugin

Allure Jenkins Plugin
https://plugins.jenkins.io/allure-jenkins-plugin/
Other
84 stars 63 forks source link

java.util.zip.ZipException error in Allure stage #285

Open pespinel opened 3 years ago

pespinel commented 3 years ago

Version report

Jenkins and plugins versions report:

Jenkins: 2.263.1
Allure: 2.29.0
macOS Catalina 10.15.7

Reproduction steps

We have a pipeline with some stages that run Appium tests and after that, there is a stage that reads the allure report and upload it as an artifact of the build:

allure ([
    includeProperties: false,
    jdk: '',
    properties: [],
    reportBuildPolicy: 'ALWAYS',
    results: [[path: 'acceptance/_output/allure']]
])

Allure commandline is already configured and it's been working for months but now we are getting errors as pointed below.

MicrosoftTeams-image (3)

Results

Expected result:

The report is correctly generated and uploaded as an artifact of the build

Actual result:

We are getting the following errors:

java.util.zip.ZipException: invalid CEN header (bad signature)
java.util.zip.ZipException: invalid LOC header (bad signature)
AvalakhGit commented 2 years ago

The same error. Using: Jenkins 2.315 and Allure commandline 2.15.0 Jenkins command: allure commandline: 'Allure2_15_0',jdk: '', properties: [[key: 'ALLURE_JIRA_ENABLED', value: 'False']], results: [[path: '/allure-results']] Getting errror:

java.util.zip.ZipException: invalid LOC header (bad signature)
    at java.util.zip.ZipFile.read(Native Method)
    at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
    at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:734)
    at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:434)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
    at com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.ensureLoaded(ByteSourceJsonBootstrapper.java:539)
    at com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.detectEncoding(ByteSourceJsonBootstrapper.java:133)
    at com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.constructParser(ByteSourceJsonBootstrapper.java:256)
    at com.fasterxml.jackson.core.JsonFactory._createParser(JsonFactory.java:1655)
    at com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:1083)
    at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:3056)
    at ru.yandex.qatools.allure.jenkins.utils.FilePathUtils.isHistoryNotEmpty(FilePathUtils.java:85)
    at ru.yandex.qatools.allure.jenkins.utils.FilePathUtils.getPreviousReportWithHistory(FilePathUtils.java:70)
    at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.addHistory(AllureReportPublisher.java:420)
    at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.prepareResults(AllureReportPublisher.java:389)
    at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:230)
    at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
    at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:100)
    at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:70)
    at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
AvalakhGit commented 2 years ago

The same error. Using: Jenkins 2.315 and Allure commandline 2.15.0 Jenkins command: allure commandline: 'Allure2_15_0',jdk: '', properties: [[key: 'ALLURE_JIRA_ENABLED', value: 'False']], results: [[path: '/allure-results']] Getting errror:

java.util.zip.ZipException: invalid LOC header (bad signature)
  at java.util.zip.ZipFile.read(Native Method)
  at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
  at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:734)
  at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:434)
  at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
  at com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.ensureLoaded(ByteSourceJsonBootstrapper.java:539)
  at com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.detectEncoding(ByteSourceJsonBootstrapper.java:133)
  at com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.constructParser(ByteSourceJsonBootstrapper.java:256)
  at com.fasterxml.jackson.core.JsonFactory._createParser(JsonFactory.java:1655)
  at com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:1083)
  at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:3056)
  at ru.yandex.qatools.allure.jenkins.utils.FilePathUtils.isHistoryNotEmpty(FilePathUtils.java:85)
  at ru.yandex.qatools.allure.jenkins.utils.FilePathUtils.getPreviousReportWithHistory(FilePathUtils.java:70)
  at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.addHistory(AllureReportPublisher.java:420)
  at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.prepareResults(AllureReportPublisher.java:389)
  at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:230)
  at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
  at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:100)
  at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:70)
  at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  at java.lang.Thread.run(Thread.java:748)

Solved by deleting all previouse build folders.

dron4ik86 commented 2 years ago

I have the same issue, I solved this issue as @AvalakhGit solved using this plugin https://plugins.jenkins.io/purge-job-history/