Skip to content

Error Azure instance initilization failed, Error: Instance initialization failed #210

@bkniffler

Description

@bkniffler

Installed on MacOS and on a freeh Ubuntu machine, both times with same error. Made sure I

  • install azure CLI and login via az login, and check az account list result to be OK
  • install docker (OrbStack on Mac, docker on ubuntu)

Everything seems set up good, but I'm getting the below issues on both my machines.

2025-05-08 23:22:41.987	ERROR	/dist/src/cli/program.js:36	program	
 Error  Azure instance initilization failed, Error: Instance initialization failed
error stack:
  • cli.js	Command.<anonymous>
	/dist/src/providers/azure/cli.js:254
  • task_queues	process.processTicksAndRejections
	internal/process/task_queues:105
  • command.js	async Command.parseAsync
	/node_modules/commander/lib/command.js:1104
  • main.js	async main
	/dist/src/cli/main.js:20
2025-05-08 23:22:41.989	ERROR	/dist/src/cli/program.js:36	program	Caused by:

 Error  Instance initialization failed, Error: Failed to prompt input
error stack:
  • initializer.js	InteractiveInstanceInitializer.initializeInteractive
	/dist/src/cli/initializer.js:43
  • task_queues	process.processTicksAndRejections
	internal/process/task_queues:105
  • cli.js	async Command.<anonymous>
	/dist/src/providers/azure/cli.js:247
  • command.js	async Command.parseAsync
	/node_modules/commander/lib/command.js:1104
  • main.js	async main
	/dist/src/cli/main.js:20
2025-05-08 23:22:41.989	ERROR	/dist/src/cli/program.js:36	program	Caused by:

 Error  Failed to prompt input, AggregateAuthenticationError: ChainedTokenCredential authentication failed.
CredentialUnavailableError: EnvironmentCredential is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.
CredentialUnavailableError: ManagedIdentityCredential: Authentication failed. Message Attempted to use the IMDS endpoint, but it is not available.
CredentialUnavailableError: ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: Can't get attribute 'NormalizedResponse' on <module 'msal.throttled_http_client' from '/opt/az/lib/python3.12/site-packages/msal/throttled_http_client.py'>
Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/profile/custom.py", line 83, in get_access_token
    creds, subscription, tenant = profile.get_raw_token(subscription=subscription, resource=resource, scopes=scopes,
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/_profile.py", line 480, in get_raw_token
    sdk_cred = CredentialAdaptor(self._create_credential(account, tenant_id=tenant))
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/_profile.py", line 693, in _create_credential
    return identity.get_user_credential(username_or_sp_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 238, in get_user_credential
    return UserCredential(self.client_id, username, **self._msal_public_app_kwargs)
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 115, in _msal_public_app_kwargs
    return {**self._msal_app_kwargs, "enable_broker_on_windows": self._enable_broker_on_windows}
              ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 100, in _msal_app_kwargs
    Identity._msal_http_cache = self._load_msal_http_cache()
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 133, in _load_msal_http_cache
    http_cache = BinaryCache(self._msal_http_cache_file)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/binary_cache.py", line 28, in __init__
    self.load()
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/binary_cache.py", line 44, in load
    self.data = self._load()
                ^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/decorators.py", line 102, in _wrapped_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/binary_cache.py", line 35, in _load
    return pickle.load(f)
           ^^^^^^^^^^^^^^
AttributeError: Can't get attribute 'NormalizedResponse' on <module 'msal.throttled_http_client' from '/opt/az/lib/python3.12/site-packages/msal/throttled_http_client.py'>. Did you mean: '_msal_public_app_kwargs'?
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

CredentialUnavailableError: Error: Unable to execute PowerShell. Ensure that it is installed in your system. To troubleshoot, visit https://aka.ms/azsdk/js/identity/powershellcredential/troubleshoot.
CredentialUnavailableError: Azure Developer CLI couldn't be found. To mitigate this issue, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot.
error stack:
  • prompter.js	AzureInputPrompter.promptInput
	/dist/src/cli/prompter.js:76
  • task_queues	process.processTicksAndRejections
	internal/process/task_queues:105
  • prompter.js	async AzureInputPrompter.completeCliInput
	/dist/src/cli/prompter.js:191
  • initializer.js	async InteractiveInstanceInitializer.cliArgsToInput
	/dist/src/cli/initializer.js:48
  • initializer.js	async InteractiveInstanceInitializer.initializeInteractive
	/dist/src/cli/initializer.js:28
  • cli.js	async Command.<anonymous>
	/dist/src/providers/azure/cli.js:247
  • command.js	async Command.parseAsync
	/node_modules/commander/lib/command.js:1104
  • main.js	async main
	/dist/src/cli/main.js:20
2025-05-08 23:22:41.990	ERROR	/dist/src/cli/program.js:36	program	Caused by:

 AggregateAuthenticationError  ChainedTokenCredential authentication failed.
CredentialUnavailableError: EnvironmentCredential is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.
CredentialUnavailableError: ManagedIdentityCredential: Authentication failed. Message Attempted to use the IMDS endpoint, but it is not available.
CredentialUnavailableError: ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: Can't get attribute 'NormalizedResponse' on <module 'msal.throttled_http_client' from '/opt/az/lib/python3.12/site-packages/msal/throttled_http_client.py'>
Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/profile/custom.py", line 83, in get_access_token
    creds, subscription, tenant = profile.get_raw_token(subscription=subscription, resource=resource, scopes=scopes,
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/_profile.py", line 480, in get_raw_token
    sdk_cred = CredentialAdaptor(self._create_credential(account, tenant_id=tenant))
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/_profile.py", line 693, in _create_credential
    return identity.get_user_credential(username_or_sp_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 238, in get_user_credential
    return UserCredential(self.client_id, username, **self._msal_public_app_kwargs)
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 115, in _msal_public_app_kwargs
    return {**self._msal_app_kwargs, "enable_broker_on_windows": self._enable_broker_on_windows}
              ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 100, in _msal_app_kwargs
    Identity._msal_http_cache = self._load_msal_http_cache()
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 133, in _load_msal_http_cache
    http_cache = BinaryCache(self._msal_http_cache_file)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/binary_cache.py", line 28, in __init__
    self.load()
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/binary_cache.py", line 44, in load
    self.data = self._load()
                ^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/decorators.py", line 102, in _wrapped_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/binary_cache.py", line 35, in _load
    return pickle.load(f)
           ^^^^^^^^^^^^^^
AttributeError: Can't get attribute 'NormalizedResponse' on <module 'msal.throttled_http_client' from '/opt/az/lib/python3.12/site-packages/msal/throttled_http_client.py'>. Did you mean: '_msal_public_app_kwargs'?
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

CredentialUnavailableError: Error: Unable to execute PowerShell. Ensure that it is installed in your system. To troubleshoot, visit https://aka.ms/azsdk/js/identity/powershellcredential/troubleshoot.
CredentialUnavailableError: Azure Developer CLI couldn't be found. To mitigate this issue, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot., CredentialUnavailableError: EnvironmentCredential is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.,CredentialUnavailableError: ManagedIdentityCredential: Authentication failed. Message Attempted to use the IMDS endpoint, but it is not available.,CredentialUnavailableError: ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: Can't get attribute 'NormalizedResponse' on <module 'msal.throttled_http_client' from '/opt/az/lib/python3.12/site-packages/msal/throttled_http_client.py'>
Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/profile/custom.py", line 83, in get_access_token
    creds, subscription, tenant = profile.get_raw_token(subscription=subscription, resource=resource, scopes=scopes,
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/_profile.py", line 480, in get_raw_token
    sdk_cred = CredentialAdaptor(self._create_credential(account, tenant_id=tenant))
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/_profile.py", line 693, in _create_credential
    return identity.get_user_credential(username_or_sp_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 238, in get_user_credential
    return UserCredential(self.client_id, username, **self._msal_public_app_kwargs)
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 115, in _msal_public_app_kwargs
    return {**self._msal_app_kwargs, "enable_broker_on_windows": self._enable_broker_on_windows}
              ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 100, in _msal_app_kwargs
    Identity._msal_http_cache = self._load_msal_http_cache()
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 133, in _load_msal_http_cache
    http_cache = BinaryCache(self._msal_http_cache_file)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/binary_cache.py", line 28, in __init__
    self.load()
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/binary_cache.py", line 44, in load
    self.data = self._load()
                ^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/decorators.py", line 102, in _wrapped_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/binary_cache.py", line 35, in _load
    return pickle.load(f)
           ^^^^^^^^^^^^^^
AttributeError: Can't get attribute 'NormalizedResponse' on <module 'msal.throttled_http_client' from '/opt/az/lib/python3.12/site-packages/msal/throttled_http_client.py'>. Did you mean: '_msal_public_app_kwargs'?
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
,CredentialUnavailableError: Error: Unable to execute PowerShell. Ensure that it is installed in your system. To troubleshoot, visit https://aka.ms/azsdk/js/identity/powershellcredential/troubleshoot.,CredentialUnavailableError: Azure Developer CLI couldn't be found. To mitigate this issue, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot., AggregateAuthenticationError
error stack:
  • index.js	
	/node_modules/@azure/identity/dist/index.js:3150
  • task_queues	process.processTicksAndRejections
	internal/process/task_queues:105
  • tracingClient.js	async Object.withSpan
	/node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js:36
  • index.js	async DefaultAzureCredential.getToken
	/node_modules/@azure/identity/dist/index.js:3125
  • tokenCycler.js	async tryGetAccessToken
	/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/tokenCycler.js:37
  • tokenCycler.js	async beginRefresh
	/node_modules/@azure/core-rest-pipeline/dist/commonjs/util/tokenCycler.js:45
  • bearerTokenAuthenticationPolicy.js	async Object.defaultAuthorizeRequest [as authorizeRequest]
	/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js:48
  • bearerTokenAuthenticationPolicy.js	async Object.sendRequest
	/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/bearerTokenAuthenticationPolicy.js:116
  • serviceClient.js	async SubscriptionClient.sendOperationRequest
	/node_modules/@azure/core-client/dist/commonjs/serviceClient.js:110
Oops, something went wrong 😨 Full error is shown above.

If you think this is a bug, please file an issue with full error: https://github.com/PierreBeucher/cloudypad/issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions