azure-cli
azure-cli copied to clipboard
EOFError: Ran out of input
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az account get-access-token
Errors:
The command failed with an unexpected error. Here is the traceback:
Ran out of input
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/profile/custom.py", line 77, in get_access_token
tenant=tenant)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/_profile.py", line 383, in get_raw_token
credential = self._create_credential(account, tenant)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/_profile.py", line 593, in _create_credential
return identity.get_user_credential(username_or_sp_id)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/auth/identity.py", line 209, in get_user_credential
return UserCredential(self.client_id, username, **self._msal_app_kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/auth/identity.py", line 84, in _msal_app_kwargs
Identity._msal_http_cache = self._load_msal_http_cache()
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/auth/identity.py", line 113, in _load_msal_http_cache
persisted_http_cache = pickle.load(f)
EOFError: Ran out of input
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Put any pre-requisite steps here...
az account get-access-token --resource {} --subscription {} -o={}
Expected Behavior
Environment Summary
Linux-4.4.0-19041-Microsoft-x86_64-with-debian-bullseye-sid, Ubuntu 20.04.3 LTS
Python 3.6.10
Installer: DEB
azure-cli 2.31.0 *
Extensions:
account 0.2.1
dataprotection 0.5.0
ssh 1.0.0
storage-preview 0.7.4
Additional Context
@jiasli for awareness
Could you please delete this file and try again? ~/.azure/msal_http_cache.bin
Related issue: https://github.com/Azure/azure-cli/issues/20707
This seems to be unofficial Azure CLI. Please see https://github.com/Azure/azure-cli/issues/19640. We have implemented an optimistic lock for MSAL HTTP cache (https://github.com/Azure/azure-cli/pull/20847). Please install the official Azure CLI.