Describe the bug
I was fine running 2.2.0 and decided to upgrade recently, but now I can't get anything to work at all.
All commands that do any talking to Azure respond with: cli.azure.cli.core.util : and literally no error output other than that (in the --debug --verbose logs).
Is there anything I can do to get any more detailed logs?
On further exploration az rest works, for example: az rest --method get --uri https://management.azure.com/subscriptions/<sub id>/providers/Microsoft.Storage/storageAccounts?api-version=2019-06-01
To Reproduce
Any az command that talks to Azure, such as az storage account list.
Expected behavior
az should work.
Environment summary
Windows 10
Cygwin 3.1.4
Python 3.6
I've tried various versions of the CLI 2.4.0, 2.3.0, 2.2.0, and also a known working from source installed into a venv, all fail with the same errors.
I've also tried re-installing python and pip through the Cygwin setup, and I've tried removing and reinstalling all pip packages after that too.
(P.S. Nope I don't want to use WSL, WSL is hacky compared to Cygwin 馃檪)
hi @qianwens could you pls have a look? thanks
add to S170
I'm not sure this issue is the same as the others that are linked to this BTW, at least I get absolutely no exception logs except cli.azure.cli.core.util :.
@ElvenSpellmaker I tried to run az storage account list (2.3.1) in cygwin but I cannot repro your error. Could you please try this in another machine or re-install cygwin?
Hi there, reinstalling the whole of cygwin will be quite painful due to lots of eventual customisations and packages used haha. I'll try to see if I can possibly do it, but it's not as simple as it might seem.
However, I'm trying to get it to install in python2 (native windows version) and it's complaining that mock 4.0 doesn't exist and can't install it.
EDIT: I have to install version 2.2.0, all higher versions fail on python2.
I get this error on the native Windows Python2 as well, so it's _not_ a Cygwin problem.
As it's no longer a Cygwin problem I thought about the only thing that Windows Python 2, Cygwin Python 3, and Cygwin Python 3 with venv share, which is the ~/.azure directory.
I moved my ~/.azure directory out of the way and re-logged in and the commands now seem to be working again.
Is there anyway we can debug why it fails with my current ~/.azure directory?
It might be nice to get a better error message out of it than nothing, and just me starting again?
@ElvenSpellmaker you can use azdev to debug cli code. In this case, will it fail if you run command in windows terminal? Besides, python2 support is deprecated in Az CLI now so you can only use Python3.
@qianwens I'll have a look with azdev when I can!
This problem happened with both python 3 and 2 and on Cygwin and Windows. So it wasn't a version problem.
@ElvenSpellmaker do you happen to work with multiple tenants by chance?
I've just had the exact same issue, and like you, deleting ~/.azure fixed it. It reminds me of a similar problem I had a while back, #6147...
@cocowalla, interestingly enough I _did_ have two tenants at the time of the bug. (I was a guest in another Tenant for doing some consulting work.)
I wonder if it's related... 馃
@qianwens why has this been closed without comment?
Deleting the .azure folder is nothing more than a workaround - the underlying issue remains to be fixed, or at the very least in the interim, a meaningful error message would be helpful :confused:
I have the same issue so I can confirm it's not solved. However I think I will go for the workaround in order to be able to continue using azure cli.
Most helpful comment
@qianwens why has this been closed without comment?
Deleting the
.azurefolder is nothing more than a workaround - the underlying issue remains to be fixed, or at the very least in the interim, a meaningful error message would be helpful :confused: