azure-devops-cli-extension: az artifacts universal download fails with Access denied and file not found

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az artifacts universal download Extension Name: azure-devops. Version: 0.12.0.

Errors:

First error when using verbose logging:

An error occurred while extracting the Universal Packages tooling: [WinError 5] Access is denied: 'C:\\Users\\WS19312\\.azure\\azuredevops\\cli\\tools\\artifacttool\\a445ec82-2166-4964-946e-d868ead0c4e3' -> 'C:\\Users\\WS19312\\.azure\\azuredevops\\cli\\tools\\artifacttool\\ArtifactTool_win10-x64_0.2.104'

Error trace reported by tool:

[WinError 2] The system cannot find the file specified
Traceback (most recent call last):
pip-install-76yvurxi\knack\knack\cli.py, ln 206, in invoke
cli\core\commands\__init__.py, ln 575, in execute
cli\core\commands\__init__.py, ln 633, in _run_jobs_serially
cli\core\commands\__init__.py, ln 624, in _run_job
azext_devops\dev\common\exception_handler.py, ln 26, in azure_devops_exception_handler
    reraise(*sys.exc_info())
Temp\pip-install-76yvurxi\six\six.py, ln 693, in reraise
cli\core\commands\__init__.py, ln 603, in _run_job
...
Azure\CLI2\lib\subprocess.py, ln 709, in __init__
    restore_signals, start_new_session)
Azure\CLI2\lib\subprocess.py, ln 997, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • az login
  • az extension add --name azure-DevOps
  • az artifacts universal download --organization {} --feed {} --name {} --version {} --path {} --debug

Expected Behavior

Environment Summary

Windows-10-10.0.16299-SP0
Python 3.6.6
Shell: powershell.exe

azure-cli 2.0.68 *

Extensions:
azure-devops 0.12.0

Additional Context

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 24 (5 by maintainers)

Most upvoted comments

I’ve got it working by obtaining the binary ArtifactTool_win10-x64_0.2.128 (via a less secure Windows system) and placing it into the correct directory manually. Another person in my org used the --debug data to identify the .zip and manually download the zip and do the same thing.

I suspect @marklindell would have success by running the az command again with the --debug flag, capture the output, find the line with “ArtifactTool”, grab that URL, download with curl (or maybe a browser), unzip the contents into USER/.azure/azuredevops/cli/tools/artifacttool/ArtifactTool_win10-x64_0.2.128 (or whatever the zip file root name is).

No idea why I have to do this, but I think there is behind the scenes security software involved.

The fix was to add retries to the file handling and adding additional logging to get more information out of this error. If you are using azure devops extension 0.17.0 and still seeing the issue then please paste the detailed logs and we can investigate this further.

@atbagga Let’s keep this open for now and we will check the new logs to determine if this is the same issue or not.

Adding @satbai as well.