Azure / azure-cli

Azure Command-Line Interface
MIT License
4.01k stars 2.99k forks source link

Keep getting '[Errno 28] No space left on device' when using cli #23910

Open aswinl opened 2 years ago

aswinl commented 2 years ago

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az login

Errors:

The command failed with an unexpected error. Here is the traceback:
[Errno 28] No space left on device
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/profile/custom.py", line 139, in login
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 154, in login
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/auth/identity.py", line 142, in login_with_auth_code
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 1608, in acquire_token_interactive
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oidc.py", line 281, in obtain_token_by_browser
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 640, in obtain_token_by_browser
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 678, in _obtain_token_by_browser
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 138, in obtain_token_by_auth_code_flow
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oidc.py", line 205, in obtain_token_by_auth_code_flow
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 548, in obtain_token_by_auth_code_flow
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 732, in _obtain_token_by_authorization_code
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oidc.py", line 116, in _obtain_token
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 789, in _obtain_token
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 599, in <lambda>
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/token_cache.py", line 310, in add
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/token_cache.py", line 113, in add
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/token_cache.py", line 186, in __add
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal_extensions/token_cache.py", line 69, in modify
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal_extensions/persistence.py", line 216, in save
OSError: [Errno 28] No space left on device

To Reproduce:

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

Expected Behavior

Environment Summary

Windows-10-10.0.17763-SP0
Python 3.10.5
Installer: MSI

azure-cli 2.40.0

Additional Context

yonzhan commented 2 years ago

@jiasli for awareness

jiasli commented 2 years ago

I think perhaps your C:\ drive is full?

aswinl commented 2 years ago

No my c: drive has plenty of space left

aswinl commented 2 years ago

I uninstalled azure cli and removed the .azure directory under c:\users\. Then I reinstalled the cli but I'm still getting the same error.

rayluo commented 2 years ago

It is rare to see an IOError on line 216. Just to rule out the possibility of other process(es) somehow still holding that file handle, @aswinl would you mind reboot your computer and retry, if you haven't already?

ghost commented 2 years ago

Thank you for your feedback. This has been routed to the support team for assistance.

aswinl commented 2 years ago

I have rebooted my system before I took the action of reinstalling the cli an removing the .azure folder. After a while I rebooted again and it worked again. Some time thereafter I had to login again and I got a "decryption failed" error after login. I followed the same procedure of removing then .azure folder and rebooting again and now it works again but it's not very reassuring. These cli problems seem to come out of the blue. I never had problems before.

rayluo commented 2 years ago

:-o

That is indeed an elusive symptom. For "decryption failed", you could turn encryption (decryption) off. But it still won't explain the "OSError: [Errno 28] No space left on device". Sorry, we do not currently have concrete suggestions.

rayluo commented 2 years ago

:-o

That is indeed an elusive symptom. For "decryption failed", you could turn encryption (decryption) off. But it still won't explain the "OSError: [Errno 28] No space left on device". Sorry, we do not currently have concrete suggestions.