azure-pipelines-tasks: [REGRESSION]: ArchiveFiles@2 w/ 7z-ultra compress the file in a format that ExtractFiles@1 can't open.

New issue checklist

Task name

ArchiveFilesV2

Breaking task version

231

Last working task version

229

Regression Description

We use heavily the ArchiveFiles@2 and ExtractFiles@1 and we found that since the version 231 ofr ArchiveFiles, the task ExtractFiles@1 is failing with the signature:

ERROR: Unsupported Method :

For binary files like dlls and exe files. Looks like the 7z tool is older now:

7-Zip 19.00 (x64) : Copyright © 1999-2018 Igor Pavlov : 2019-02-21

I found that if you upgrade to the 2024 version of 7-Zip, the extract works again.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows 11

Relevant log output

##[debug]   x
##[debug]   -oC:\Users\HCKTest\AppData\Local\Temp\leyend
##[debug]   C:\root\leyendAutomation\archive.7z
C:\agent\_work\_tasks\ExtractFiles_5e1e3830-fbfb-11e5-aab1-090c92bc4988\1.229.0\7zip\7z.exe x -oC:\Users\HCKTest\AppData\Local\Temp\leyend C:\root\leyendAutomation\archive.7z
ERROR: Unsupported Method : Bin\ARM64\Release\Automata.dll
ERROR: Unsupported Method : Bin\ARM64\Release\CsvConsumer.dll
ERROR: Unsupported Method : Bin\ARM64\Release\EtwProvider.dll
ERROR: Unsupported Method : Bin\ARM64\Release\GDIProvider.dll
ERROR: Unsupported Method : Bin\ARM64\Release\Leyend_cmd.exe
ERROR: Unsupported Method : Bin\ARM64\Release\Leyend_engine.dll
ERROR: Unsupported Method : Bin\ARM64\Release\msdia140.dll
ERROR: Unsupported Method : Bin\ARM64\Release\msvcdis140.dll
ERROR: Unsupported Method : Bin\ARM64\Release\msvcp140.dll
ERROR: Unsupported Method : Bin\ARM64\Release\msvcp140_atomic_wait.dll
ERROR: Unsupported Method : Bin\ARM64\Release\QProfilerInterface.dll
ERROR: Unsupported Method : Bin\ARM64\Release\QualcommProvider.dll

7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 12949856 bytes (13 MiB)

Extracting archive: C:\root\leyendAutomation\archive.7z
--
Path = C:\root\leyendAutomation\archive.7z
Type = 7z
Physical Size = 12949856
Headers Size = 2589
Method = 0A LZMA2:26 LZMA:20 BCJ2
Solid = +
Blocks = 3


Sub items Errors: 18

Archives with Errors: 1

Sub items Errors: 18
ERROR: Unsupported Method : Bin\ARM64\Release\SuperRes_bmp.exe
ERROR: Unsupported Method : Bin\ARM64\Release\vcruntime140.dll
ERROR: Unsupported Method : Bin\x64\Release\msvcdis140.dll
ERROR: Unsupported Method : Bin\x64\Release\msvcp140.dll
ERROR: Unsupported Method : Bin\x64\Release\msvcp140_atomic_wait.dll
ERROR: Unsupported Method : Bin\x64\Release\vcruntime140.dll
##[debug]execResult: {"code":2,"stdout":"\r\n7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21\r\n\r\nScanning the drive for archives:\r\n1 file, 12949856 bytes (13 MiB)\r\n\r\nExtracting archive: C:\\root\\leyendAutomation\\archive.7z\r\n--\r\nPath = C:\\root\\leyendAutomation\\archive.7z\r\nType = 7z\r\nPhysical Size = 12949856\r\nHeaders Size = 2589\r\nMethod = 0A LZMA2:26 LZMA:20 BCJ2\r\nSolid = +\r\nBlocks = 3\r\n\r\n\r\nSub items Errors: 18\r\n\r\nArchives with Errors: 1\r\n\r\nSub items Errors: 18\r\n","stderr":"ERROR: Unsupported Method : Bin\\ARM64\\Release\\Automata.dll\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\CsvConsumer.dll\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\EtwProvider.dll\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\GDIProvider.dll\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\Leyend_cmd.exe\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\Leyend_engine.dll\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\msdia140.dll\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\msvcdis140.dll\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\msvcp140.dll\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\msvcp140_atomic_wait.dll\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\QProfilerInterface.dll\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\QualcommProvider.dll\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\SuperRes_bmp.exe\r\nERROR: Unsupported Method : Bin\\ARM64\\Release\\vcruntime140.dll\r\nERROR: Unsupported Method : Bin\\x64\\Release\\msvcdis140.dll\r\nERROR: Unsupported Method : Bin\\x64\\Release\\msvcp140.dll\r\nERROR: Unsupported Method : Bin\\x64\\Release\\msvcp140_atomic_wait.dll\r\nERROR: Unsupported Method : Bin\\x64\\Release\\vcruntime140.dll\r\n"}
##[debug]Extraction failed for file: C:\root\leyendAutomation\archive.7z 
code: 2 
stdout: 
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 12949856 bytes (13 MiB)

Extracting archive: C:\root\leyendAutomation\archive.7z

Full task logs with system.debug enabled

UNSUCCESSFUL RUN
 [REPLACE THIS WITH YOUR INFORMATION] 
SUCCESSFUL RUN
 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 15 (3 by maintainers)

Most upvoted comments

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

The scenario I reported above was probably an edge case, that is not very obvious. After a while I realized the error only occurred when archiving in a Windows machine and extracting in a Linux one (we are reusing compiled artifacts to also run tests in Linux environments without compiling everything again).

After the update, Archive task would always use 23.03 (in Windows) while the Extract task in Linux would always fallback to 16.02. This would happen when using the 7z format. To workaround the error we basically made the archive type configurable in our templates and started using zip format instead.

This happened because of negligent reviews of #19842. Team must revert ArchiveFiles task or upgrade ExtractFiles task.