Azure Dev Ops Task version 8.2.1 causing pipeline failures

The SonarQube Server extension in Azure Dev Ops updated to 8.2.1 this morning at 8:04AM CDT. Since then any pipeline running SonarQube tasks has been failing in the initialize stage.

Starting: Initialize job
Agent name: ‘<agent>’
Agent machine name: ‘<agentServer>’
Current agent version: ‘4.255.0’
Agent running as: ‘<agentUserName>’
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: SonarQubePrepare (8.2.1)
Downloading task: SonarQubeAnalyze (8.2.1)
##\[error\]Offset to Central Directory cannot be held in an Int64.
Finishing: Initialize job

I resolved this for now by pinning the template task version to 8.2.0 specifically.
e.g.

steps:
- task: SonarQubeAnalyze@8.2.0
  continueOnError: ${{ parameters.continueOnError }}
  retryCountOnTaskFailure: ${{ parameters.retryCountOnTaskFailure }}
  inputs:
    jdkVersion: '${{ parameters.jdkversion }}'
    
- task: SonarQubePublish@8.2.0
  continueOnError: ${{ parameters.continueOnError }}
  retryCountOnTaskFailure: ${{ parameters.retryCountOnTaskFailure }}
  inputs:
    pollingTimeoutSec: '${{ parameters.pollingTimeoutSec }}'
1 Like

We experience this issue as well. Very frustrating as all our builds now have to be edited to target v8.2.0. Additional information:

##[error]Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory.
##[debug]System.IO.InvalidDataException: Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory.
   at System.IO.Compression.ZipArchive.ReadCentralDirectory()
   at System.IO.Compression.ZipArchive.get_Entries()
   at System.IO.Compression.ZipFileExtensions.ExtractToDirectory(ZipArchive source, String destinationDirectoryName, Boolean overwriteFiles)
   at System.IO.Compression.ZipFile.ExtractToDirectory(String sourceArchiveFileName, String destinationDirectoryName, Encoding entryNameEncoding, Boolean overwriteFiles)
   at Microsoft.VisualStudio.Services.Agent.Worker.TaskManager.ExtractZip(String zipFile, String destinationDirectory) in D:\a\_work\1\s\src\Agent.Worker\TaskManager.cs:line 464
   at Microsoft.VisualStudio.Services.Agent.Worker.TaskManager.DownloadAsync(IExecutionContext executionContext, TaskStepDefinitionReference task) in D:\a\_work\1\s\src\Agent.Worker\TaskManager.cs:line 307
   at Microsoft.VisualStudio.Services.Agent.Worker.TaskManager.DownloadAsync(IExecutionContext executionContext, IEnumerable`1 steps) in D:\a\_work\1\s\src\Agent.Worker\TaskManager.cs:line 90
   at Microsoft.VisualStudio.Services.Agent.Worker.JobExtension.InitializeJob(IExecutionContext jobContext, AgentJobRequestMessage message) in D:\a\_work\1\s\src\Agent.Worker\JobExtension.cs:line 151

I hope this issue gets fixed soon.

1 Like

Hi all,

Thanks for these reports, and welcome to the community @Jeff_Sondag!

We’ve declared an incident for this and are marshaling the troops. I’ll update here when I have more.

 
Ann

4 Likes

Hi again,

For transparency: since the blast-radius looks limited at the moment, this is currently queued for first-thing-in-the-morning, EU-time.

Meanwhile, we think it might help to clear the CI workers’ caches. Could you try that and let us know?

 
Thx!
Ann

This doesn’t appear to be a cache issue. We use Microsoft hosted agents, each one is ephemeral, and the issue started with 8.2.1 as stated by the OP. Our pipelines also started failing immediately with this release earlier today. Pinning version 8.2.0 appears to be the only solution. Any pipelines that specify the major version like SonarQubePublish@8 will be affected.

1 Like

It blocked all our Jobs too, were just gonna adjust our template… If you pushed it globally to all ADO Orgs, your basically telling all users to wait till tommorrow, or just pin Versions…

We use both MS Hosted agents, and Self hosted agent VMs, both were affected. Pinning the version to the last known working version was what worked for now.

Thankfully we had just finished moving everything to using a template, and could just change it there. Our initial implementation had been 200 separate pipelines with SQ tasks. I hope nobody is in that situation today.

1 Like

Agree sir, Also Affects Managed Dev Pools (Managed Microsoft Service) which falls under Self Hosted Vms for visibility for everyone.

1 Like

Hi there,

Thank you for your patience with this issue. We acknowledge how painful it can be to pin the version number.

We are still trying to understand what in the environment could cause this issue, since it affects only a small subset of the users.

Could you please do the following actions:

  • clear all caches, just in case the download was corrupted for some reason
  • Enable the debug mode on your pipeline
  • Share the logs of the “Initialize job” step so we can try to identify what is in common between all your environments that could explain the failure

Thanks in advance,

Clearing the caches doesn’t help. When you download the SonarAnalyze task version 8.2.1 from Azure DevOps Services you get a binary BLOB that doesn’t seem to be a ZIP package. Ran it through VirusTotal and luckily it also doesn’t seem to be malware.

The download link for the task: https://dev.azure.com/<DevOpsOrganization>/_apis/distributedtask/tasks/6d01813a-9589-4b15-8491-8164aeb38055/8.2.1

1 Like

Thank you so much for your feedback and for the download link.

For some reason, some organizations are getting a corrupted ZIP, but not all of them.

Could you try to uninstall and reinstall the extension please?

I just tried it on my private DevOps instance and indeed, I get a valid ZIP file! Maybe Microsoft somehow messed up on their side. I will ask my colleagues, who posted above, to try this.

2 Likes

That’s super great news! Thank you for testing this!

@Jeff_Sondag @Eelco @mstaszew @thavecker Could you please try to uninstall and reinstall the extension too?

Could you please confirm which country your servers are hosted on also as we try to narrow down the issue with Microsoft?

Eelco and I are on the same team. We are based in The Netherlands.

1 Like

When trying to extract the zip manually:

Archive:  6d01813a-9589-4b15-8491-8164aeb38055.8.2.1.zip
error [6d01813a-9589-4b15-8491-8164aeb38055.8.2.1.zip]:  missing 5898240 bytes in zipfile
  (attempting to process anyway)
error [6d01813a-9589-4b15-8491-8164aeb38055.8.2.1.zip]:  attempt to seek before beginning of zipfile
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)
  (attempting to re-compensate)
  inflating: icon.png
  inflating: lib.json
  inflating: package.json
  inflating: sonar-scanner/bin/sonar-scanner
  inflating: sonar-scanner/bin/sonar-scanner-debug
  inflating: sonar-scanner/bin/sonar-scanner-debug.bat
  inflating: sonar-scanner/conf/sonar-scanner.properties
  inflating: sonar-scanner/bin/sonar-scanner.bat
  inflating: SonarQubeAnalyze.js
  inflating: task.json
  inflating: sonar-scanner/lib/sonar-scanner-cli-8.0.1.6346.jar
  error:  invalid compressed data to inflate
 bad CRC 500a81d6  (should be ac3aa19f)

Cleaning cache does nothing for us either, to reinstall I will need to contact someone who manages our devops. We (not related to Eelco and Leon) are also Dutch so I expect our servers are in some westeurope DC

1 Like

I can confirm that reinstalling the extension does fix it for us:

Downloading task: SonarQubeAnalyze (8.2.1)
##[debug]Task 'SonarQubeAnalyze' has been downloaded into '/azp/_work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/8.2.1'.
Downloading task: SonarQubePublish (8.2.1)
##[debug]Task 'SonarQubePublish' has been downloaded into '/azp/_work/_tasks/SonarQubePublish_291ed61f-1ee4-45d3-b1b0-bf822d9095ef/8.2.1'.
##[debug]Task 'PublishCodeCoverageResults' already downloaded at '/azp/_work/_tasks/PublishCodeCoverageResults_2a7ebc54-c13e-490e-81a5-d7561ab7cd97/2.267.0'.
2 Likes

That’s great news, thank you!

Great! We will have to time this, as we have many running pipelines that are dependent on working SonarQube-tasks.

We also had this with SonarQube Cloud 4.2.1 - a re-installation fixes it.

1 Like

SonarQubeAnalyze Task Download Failure on Azure Pipelines Hosted Agent

Issue Summary

Following the SonarQube extension update to version 8.2.1, the Azure Pipelines job initialization process encounters a critical failure during task download. The specific error encountered is:

##[error]Offset to Central Directory cannot be held in an Int64.

Problem Description

The pipeline’s “Initialize job” step, responsible for downloading required tasks, experiences a failure with the SonarQubeAnalyze task. Other tasks (PowerShell, UseNode, Cache, CmdLine, SonarQubePrepare, PublishTestResults) download successfully without error.

Environment Details

  • Agent Type: Azure Pipelines Hosted Agent
  • Image: windows-2025
  • Extension for Azure DevOps Version: 8.2.1
  • Affected Task: SonarQubeAnalyze

Root Cause Analysis

The error manifests during the extraction phase of the downloaded SonarQubeAnalyze task zip archive. This indicates a potential issue with either:

  • Archive corruption during the download process
  • Archive size exceeding the capacity limits of the .NET ZipArchive class implementation
  • Incompatibility between the task archive format and the extraction mechanism

The error stack trace points to the System.IO.Compression.ZipArchive class, which is responsible for handling zip file operations. The specific exception suggests that the archive’s central directory offset exceeds the maximum value that can be represented by an Int64, which may indicate a malformed or excessively large archive. As SonarQube Extension for Azure DevOps was recently updated, it’s possible that the new version of the SonarQubeAnalyze task has introduced changes that affect the archive structure or size, leading to this extraction failure, hence I reach out to you instead of Microsoft support. The Task SonarQubeAnalyze@7 does not have this error.

Starting: Initialize job
...
Current agent version: '4.271.0'
Runner Image Provisioner
Hosted Compute Agent
Version: 20260213.493
Commit: 5c115507f6dd24b8de37d8bbe0bb4509d0cc0fa3
Build Date: 2026-02-13T00:28:41Z
Worker ID: {d98664cb-0d1a-4c1c-ab1f-549398f8eeb2}
Azure Region: westeurope
_internal_runner_telemetry
ProcessLifetimeId: f043ec5f-779e-48a0-8bca-7b6de1963b5c
Azure Region: westeurope
Operating System
Microsoft Windows Server 2025
10.0.26100
Datacenter
Runner Image
Image: windows-2025
Version: 20260405.77.1
Included Software: https://github.com/actions/runner-images/blob/win25/20260405.77/images/windows/Windows2025-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/win25%2F20260405.77
Current image version: '20260405.77.1'
Agent running as: 'VssAdministrator'
...
Prepare build directory.
...
Set build variables.
Download all required tasks.
Downloading task: PowerShell (2.268.1)
##[debug]Task 'PowerShell' has been downloaded into 'D:\a\_tasks\PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1\2.268.1'.
Downloading task: UseNode (1.268.0)
##[debug]Task 'UseNode' has been downloaded into 'D:\a\_tasks\UseNode_31c75bbb-bcdf-4706-8d7c-4da6a1959bc2\1.268.0'.
Downloading task: Cache (2.198.0)
##[debug]Task 'Cache' has been downloaded into 'D:\a\_tasks\Cache_d53ccab4-555e-4494-9d06-11db043fb4a9\2.198.0'.
Downloading task: CmdLine (2.268.0)
##[debug]Task 'CmdLine' has been downloaded into 'D:\a\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.268.0'.
Downloading task: SonarQubePrepare (8.2.1)
##[debug]Task 'SonarQubePrepare' has been downloaded into 'D:\a\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\8.2.1'.
Downloading task: PublishTestResults (2.270.0)
##[debug]Task 'PublishTestResults' has been downloaded into 'D:\a\_tasks\PublishTestResults_0b0f01ed-7dde-43ff-9cbb-e48954daf9b1\2.270.0'.
Downloading task: SonarQubeAnalyze (8.2.1)
##[error]Offset to Central Directory cannot be held in an Int64.
##[debug]System.IO.InvalidDataException: Offset to Central Directory cannot be held in an Int64.
at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()
at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)
at System.IO.Compression.ZipFile.Open(String archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding)
at System.IO.Compression.ZipFile.ExtractToDirectory(String sourceArchiveFileName, String destinationDirectoryName, Encoding entryNameEncoding, Boolean overwriteFiles)
at Microsoft.VisualStudio.Services.Agent.Worker.TaskManager.ExtractZip(String zipFile, String destinationDirectory) in D:\a\_work\1\s\src\Agent.Worker\TaskManager.cs:line 464
at Microsoft.VisualStudio.Services.Agent.Worker.TaskManager.DownloadAsync(IExecutionContext executionContext, TaskStepDefinitionReference task) in D:\a\_work\1\s\src\Agent.Worker\TaskManager.cs:line 307
at Microsoft.VisualStudio.Services.Agent.Worker.TaskManager.DownloadAsync(IExecutionContext executionContext, IEnumerable`1 steps) in D:\a\_work\1\s\src\Agent.Worker\TaskManager.cs:line 90
at Microsoft.VisualStudio.Services.Agent.Worker.JobExtension.InitializeJob(IExecutionContext jobContext, AgentJobRequestMessage message) in D:\a\_work\1\s\src\Agent.Worker\JobExtension.cs:line 173
Finishing: Initialize job