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.
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
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.
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.
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.
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.
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
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'.
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