Skip to content

[Bug] az artifacts universal download: Bad CPU type in executable: 'artifacttool'Β #30395

@seung-hyun-moon

Description

@seung-hyun-moon

Describe the bug

  • When using az artifacts universal download command on apple silicon M2 machine, I get the following error.
  • The azcli is downloaded via homebrew using Formula, Not the API.

[Errno 86] Bad CPU type in executable: '/Users/ansible-pipeline/.azure/azuredevops/cli/tools/artifacttool/ArtifactTool_osx-x64_0.2.372/artifacttool'

Related command

Steps to reproduce the behavior:

  1. set homebrew to use Formula to download.
    $ HOMEBREW_NO_INSTALL_FROM_API=1 then $ brew tap --force homebrew/core
  2. download azcli
    $ brew install --build-from-source azure-cli
  3. add extention
    $ az extension add --name azure-devops
  4. az login
    az login --service-principal -u {} -p {} --tenant {}
  5. run az command
az artifacts universal download \
--organization "https://dev.azure.com/YourOrganizationURL/" \
--project "your-project-id" \
--scope project \
--feed "your-feed" \
--name "your-package" \
--version "your-version" \
--debug \
--path .

Errors

[Errno 86] Bad CPU type in executable: '/Users/{}/.azure/azuredevops/cli/tools/artifacttool/ArtifactTool_osx-x64_0.2.372/artifacttool'

Issue script & Debug output

command:

$ az artifacts universal download \
--organization "https://dev.azure.com/YourOrganizationURL/" \
--project "your-project-id" \
--scope project \
--feed "your-feed" \
--name "your-package" \
--version "your-version" \
--debug \
--path .

out put:

cli.knack.cli: Command arguments: ['artifacts', 'universal', 'download', '--organization', '', '--project', '', '--scope', 'project', '--feed', '', '--name', '', '--version', '', '--path', '.', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x1024caf20>, <function OutputProducer.on_global_arguments at 0x102d9fce0>, <function CLIQuery.on_global_arguments at 0x102de13a0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'artifacts': ['azext_devops']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: Total (0)                 0.000         0         0
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: azure-devops              0.056        60       192  /Users/ansible-pipeline/.azure/cliextensions/azure-devops
cli.azure.cli.core: Total (1)                 0.056        60       192  
cli.azure.cli.core: Loaded 60 groups, 192 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : artifacts universal download
cli.azure.cli.core: Command table: artifacts universal download
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x103b8a980>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/ansible-pipeline/.azure/commands/2024-11-21.11-32-49.artifacts_universal_download.38300.log'.
az_command_data_logger: command args: artifacts universal download --organization {} --project {} --scope {} --feed {} --name {} --version {} --path {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x103bead40>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x103beade0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x103beaf20>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x103beafc0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x102d9fd80>, <function CLIQuery.handle_query_parameter at 0x102de1440>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x103beae80>, <function DevCommandsLoader.post_parse_args at 0x103c38ea0>]
az_command_data_logger: extension name: azure-devops
az_command_data_logger: extension version: 1.0.1
cli.azext_devops.dev.common.artifacttool_updater: Checking for a new ArtifactTool
cli.azext_devops.dev.common.artifacttool_updater: Checking for ArtifactTool updates
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli:https://dev.azure.com/ypsomedag
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli: default
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.azext_devops.dev.common.services: trying to get token (temp) for tenant dd2d7414-f2df-449b-b338-05cf4a6b1ae5 and user 8fcc7939-2a05-4549-9827-99afeb13fd25 
cli.azure.cli.core.auth.persistence: build_persistence: location='/Users/ansible-pipeline/.azure/service_principal_entries.json', encrypt=False
cli.azure.cli.core.auth.persistence: build_persistence: location='/Users/ansible-pipeline/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /Users/ansible-pipeline/.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5
msal.authority: openid_config("https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? None
cli.azure.cli.core.auth.msal_credentials: ServicePrincipalCredential.get_token: scopes=('499b84ac-1321-427f-aa17-267ca6975798/.default',), kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 46b555d0-cffb-479e-8a18-719ac4661ecd
msrest.universal_http.requests: Configuring retry: max_retries=3, backoff_factor=0.8, max_backoff=90
cli.azext_devops.dev.common.telemetry: Azure devops telemetry enabled.
cli.azext_devops.dev.common.telemetry: Logging telemetry to azure devops server.
msrest.universal_http.requests: Configuring retry: max_retries=3, backoff_factor=0.8, max_backoff=90
azext_devops.devops_sdk._file_cache: Loading cache file: /Users/ansible-pipeline/.azure-devops/python-sdk/cache/options.json
azext_devops.devops_sdk._file_cache: attempting to read file /Users/ansible-pipeline/.azure-devops/python-sdk/cache/options.json as utf-8-sig
azext_devops.devops_sdk.client: File cache hit for options on: https://dev.azure.com/ypsomedag
azext_devops.devops_sdk.client: Route template: _apis/{area}/{resource}
azext_devops.devops_sdk.client: Api version '5.0-preview.1'
azext_devops.devops_sdk.client: POST https://dev.azure.com/ypsomedag/_apis/CustomerIntelligence/Events
azext_devops.devops_sdk.client: Request content: [{'area': 'AzureDevopsCli', 'feature': 'artifacts', 'properties': {'Command': 'universal download', 'Args': 'feed name version path scope organization project', 'ShellType': '/bin/zsh', 'IsInteractive': 'True', 'OutputType': 'json', 'OrgPresentInCommand': True, 'ProjectPresentInCommand': True, 'RepoPresentInCommand': False}}]
msrest.universal_http: Configuring redirects: allow=True, max=30
msrest.universal_http: Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http: Configuring proxies: ''
msrest.universal_http: Evaluate proxies against ENV settings: True
msrest.universal_http.requests: Configuring retry: max_retries=3, backoff_factor=0.8, max_backoff=90
azext_devops.devops_sdk._file_cache: Loading cache file: /Users/ansible-pipeline/.azure-devops/python-sdk/cache/resources.json
azext_devops.devops_sdk._file_cache: attempting to read file /Users/ansible-pipeline/.azure-devops/python-sdk/cache/resources.json as utf-8-sig
azext_devops.devops_sdk.connection: File cache hit for resources on: https://dev.azure.com/ypsomedag
msrest.universal_http.requests: Configuring retry: max_retries=3, backoff_factor=0.8, max_backoff=90
cli.azext_devops.dev.common.artifacttool_updater: Looking up current version of ArtifactTool...
urllib3.connectionpool: Starting new HTTPS connection (1): dev.azure.com:443
azext_devops.devops_sdk.client: File cache hit for options on: https://vsblob.dev.azure.com/ypsomedag
azext_devops.devops_sdk.client: Route template: _apis/{area}/{toolName}/{resource}
azext_devops.devops_sdk.client: Api version '5.0-preview'
azext_devops.devops_sdk.client: GET https://vsblob.dev.azure.com/YPSOMEDAG/_apis/clienttools/ArtifactTool/release?osName=Darwin&arch=x86_64&distroName=darwin&distroVersion=24.1.0
azext_devops.devops_sdk.client: Request content: None
msrest.universal_http: Configuring redirects: allow=True, max=30
msrest.universal_http: Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http: Configuring proxies: ''
msrest.universal_http: Evaluate proxies against ENV settings: True
urllib3.connectionpool: Starting new HTTPS connection (1): vsblob.dev.azure.com:443
urllib3.connectionpool: https://dev.azure.com:443 "POST /ypsomedag/_apis/CustomerIntelligence/Events HTTP/1.1" 204 0
urllib3.connectionpool: https://vsblob.dev.azure.com:443 "GET /YPSOMEDAG/_apis/clienttools/ArtifactTool/release?osName=Darwin&arch=x86_64&distroName=darwin&distroVersion=24.1.0 HTTP/1.1" 200 543
azext_devops.devops_sdk.client: Response content: b'{"name":"ArtifactTool","rid":"osx-x64","version":"0.2.372","uri":"https://08wvsblobprodsu6weus73.vsblob.vsassets.io/artifacttool/artifacttool-osx-x64-Release_0.2.372.zip?sv=2019-07-07&sr=b&sig=leUrKHd7beS%2FtKlL8xl6MrHwHjAh68O0328EDHdlPT4%3D&skoid=1f0e47ec-eb12-46ce-bd9d-075103651fb8&sktid=33e01921-4d64-4f8c-a055-5bdaffd5e33d&skt=2024-11-21T06%3A16%3A38Z&ske=2024-11-23T07%3A16%3A38Z&sks=b&skv=2019-07-07&se=2024-11-21T11%3A32%3A50Z&sp=r&P1=1732188470&P2=11&P3=2&P4=sffLHth5TZfsWb9%2bvVaW6V8gTExkOnajaur37UED69c%3d"}'
cli.azext_devops.dev.common.artifacttool_updater: Checking if we already have ArtifactTool release 'ArtifactTool_osx-x64_0.2.372'
cli.azext_devops.dev.common.artifacttool_updater: Not updating ArtifactTool because the current release already exists at '/Users/ansible-pipeline/.azure/azuredevops/cli/tools/artifacttool/ArtifactTool_osx-x64_0.2.372'
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli:https://dev.azure.com/ypsomedag
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli: default
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.azext_devops.dev.common.services: trying to get token (temp) for tenant dd2d7414-f2df-449b-b338-05cf4a6b1ae5 and user 8fcc7939-2a05-4549-9827-99afeb13fd25 
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5
msal.authority: openid_config("https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/dd2d7414-f2df-449b-b338-05cf4a6b1ae5/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? None
cli.azure.cli.core.auth.msal_credentials: ServicePrincipalCredential.get_token: scopes=('499b84ac-1321-427f-aa17-267ca6975798/.default',), kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 3ce6f454-54e4-4cca-a0ea-5bf5712a4c96
cli.azext_devops.dev.common.external_tool: Running external command: /Users/ansible-pipeline/.azure/azuredevops/cli/tools/artifacttool/ArtifactTool_osx-x64_0.2.372/artifacttool universal download --service https://dev.azure.com/YPSOMEDAG/ --patvar AZURE_DEVOPS_EXT_ARTIFACTTOOL_PATVAR --feed smartMDI --package-name openjdk-mac --package-version 0.0.1 --path . --project 89d13375-4607-4bce-b0f5-94320d4f027b
cli.azext_devops.dev.common.exception_handler: handling generic error
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 725, in _run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/exception_handler.py", line 31, in azure_devops_exception_handler
    reraise(*sys.exc_info())
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/six.py", line 719, in reraise
    raise value
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/artifacts/universal.py", line 98, in download_package
    return artifact_tool.download_universal(organization, project, feed, name, version, path, file_filter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 42, in download_universal
    return self.run_artifacttool(organization, args, "Downloading")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 67, in run_artifacttool
    proc = self._tool_invoker.run(command_args, new_env, initial_progress_message, _process_stderr)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/external_tool.py", line 74, in run
    self.start(command_args, env)
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/external_tool.py", line 33, in start
    self._proc = subprocess.Popen(
                 ^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 86] Bad CPU type in executable: '/Users/ansible-pipeline/.azure/azuredevops/cli/tools/artifacttool/ArtifactTool_osx-x64_0.2.372/artifacttool'

cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: [Errno 86] Bad CPU type in executable: '/Users/ansible-pipeline/.azure/azuredevops/cli/tools/artifacttool/ArtifactTool_osx-x64_0.2.372/artifacttool'
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 725, in _run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/exception_handler.py", line 31, in azure_devops_exception_handler
    reraise(*sys.exc_info())
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/six.py", line 719, in reraise
    raise value
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/artifacts/universal.py", line 98, in download_package
    return artifact_tool.download_universal(organization, project, feed, name, version, path, file_filter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 42, in download_universal
    return self.run_artifacttool(organization, args, "Downloading")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 67, in run_artifacttool
    proc = self._tool_invoker.run(command_args, new_env, initial_progress_message, _process_stderr)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/external_tool.py", line 74, in run
    self.start(command_args, env)
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/external_tool.py", line 33, in start
    self._proc = subprocess.Popen(
                 ^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 86] Bad CPU type in executable: '/Users/ansible-pipeline/.azure/azuredevops/cli/tools/artifacttool/ArtifactTool_osx-x64_0.2.372/artifacttool'
az_command_data_logger: [Errno 86] Bad CPU type in executable: '/Users/ansible-pipeline/.azure/azuredevops/cli/tools/artifacttool/ArtifactTool_osx-x64_0.2.372/artifacttool'
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 725, in _run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/exception_handler.py", line 31, in azure_devops_exception_handler
    reraise(*sys.exc_info())
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/six.py", line 719, in reraise
    raise value
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/artifacts/universal.py", line 98, in download_package
    return artifact_tool.download_universal(organization, project, feed, name, version, path, file_filter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 42, in download_universal
    return self.run_artifacttool(organization, args, "Downloading")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 67, in run_artifacttool
    proc = self._tool_invoker.run(command_args, new_env, initial_progress_message, _process_stderr)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/external_tool.py", line 74, in run
    self.start(command_args, env)
  File "/Users/ansible-pipeline/.azure/cliextensions/azure-devops/azext_devops/dev/common/external_tool.py", line 33, in start
    self._proc = subprocess.Popen(
                 ^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 86] Bad CPU type in executable: '/Users/ansible-pipeline/.azure/azuredevops/cli/tools/artifacttool/ArtifactTool_osx-x64_0.2.372/artifacttool'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x103b8ac00>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 0.943 seconds (init: 0.070, invoke: 0.873)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 8226 in cache file under /Users/ansible-pipeline/.azure/telemetry/20241121113250472
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/bin/python /opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/telemetry/__init__.py /Users/ansible-pipeline/.azure /Users/ansible-pipeline/.azure/telemetry/20241121113250472"
telemetry.process: Return from creating process 38306
telemetry.main: Finish creating telemetry upload process.

Expected behavior

az cli downloads successfully the desired universal package.

Environment Summary

version check:

$ az -v

out put:

azure-cli                         2.67.0

core                              2.67.0
telemetry                          1.1.0

Extensions:
azure-devops                       1.0.1

Dependencies:
msal                              1.31.0
azure-mgmt-resource               23.1.1

Python location '/opt/homebrew/Cellar/ypso-azure-cli2/2.67.0/libexec/bin/python'
Extensions directory '/Users/ansible-pipeline/.azure/cliextensions'

Python (Darwin) 3.12.7 (main, Oct  1 2024, 02:05:46) [Clang 16.0.0 (clang-1600.0.26.3)]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Assignees

Labels

Artifactsaz artifactsAuto-AssignAuto assign by botPossible-SolutionService AttentionThis issue is responsible by Azure service team.Similar-IssuebugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions