Skip to content

Could not find a suitable TLS CA certificate bundle after update from 2.43 to 2.47 #26105

@ChadRoberts21

Description

@ChadRoberts21

After updating my install of Azure CLI on my work Mac (macOS Ventura 13.3). I can no longer use it as it produces the following error:

Could not find a suitable TLS CA certificate bundle, invalid path: /usr/local/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/certifi/cacert.pem
The command failed with an unexpected error. Here is the traceback:
Could not find a suitable TLS CA certificate bundle, invalid path: /usr/local/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/certifi/cacert.pem
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 588, in execute
    parsed_args = self.parser.parse_args(args)
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/knack/parser.py", line 261, in parse_args
    return super().parse_args(args)
  File "/usr/local/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/argparse.py", line 1826, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/parser.py", line 281, in parse_known_args
    self._namespace, self._raw_arguments = super().parse_known_args(args=args, namespace=namespace)
  File "/usr/local/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/argparse.py", line 1859, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/argparse.py", line 2075, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/usr/local/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/argparse.py", line 2031, in consume_positionals
    take_action(action, args)
  File "/usr/local/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/argparse.py", line 1920, in take_action
    argument_values = self._get_values(action, argument_strings)
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/parser.py", line 272, in _get_values
    value = super(AzCliCommandParser, self)._get_values(action, arg_strings)
  File "/usr/local/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/argparse.py", line 2465, in _get_values
    self._check_value(action, value[0])
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/parser.py", line 324, in _check_value
    recommendations = recommender.provide_recommendations()
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/command_recommender.py", line 278, in provide_recommendations
    self._set_aladdin_recommendations()
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/command_recommender.py", line 168, in _set_aladdin_recommendations
    response = requests.get(
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/requests/adapters.py", line 416, in send
    self.cert_verify(conn, request.url, verify, cert)
  File "/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/requests/adapters.py", line 227, in cert_verify
    raise IOError("Could not find a suitable TLS CA certificate bundle, "
OSError: Could not find a suitable TLS CA certificate bundle, invalid path: /usr/local/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/certifi/cacert.pem
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
To open a new issue, please run `az feedback`

Looking in the path, flagged in the stack trace, shows that it is looking for a missing folder.

/usr/local/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/certifi/cacert.pem -> folder 2.43.0 does not exist
/usr/local/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/certifi/cacert.pem -> valid

Looking through the configuration docs. i could not see any way to manually change the folder that the app checks for the cert.

I have tried the following commands but all lead to the same error:

  • az login
  • az configure
  • az feedback - reports the same issue but still props the user for interaction

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions