Well-known ADC file path is incorrect in some cases
See original GitHub issueI have set up a new PC with Python from the Windows Store and Google Cloud SDK 369.0.0 (released today). I then proceeded to run gcloud auth application-default login
. No issues with that. Then I tried to run my application and it failed with the typical exception indicating it could not find credentials. I was a bit perplexed as I remember this always working.
I did some digging and I found the problem. When installing the latest Python on Windows 11, the Roaming files are put in a different place on the file system.
What the gcloud command line told me: Credentials saved to file: [C:\Users\Eaton\AppData\Roaming\gcloud\application_default_credentials.json]
That is wrong! The gcloud folder doesn’t exist there! It’s actually here: C:\Users\Eaton\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\Roaming\gcloud\application_default_credentials.json
The code that handles the well-known Roaming path is here and it appears that support needs to be added for this different location.
Maybe you should also open an internal bug with the SDK team about the incorrect path display in gcloud.
Issue Analytics
- State:
- Created 2 years ago
- Comments:16
Top GitHub Comments
I’ve heard back now - the warning is now implemented in version 376.0.0. I believe it proved infeasible to actually load them from a different place, but you should get a warning message explaining various options if you run into this.
I’ll close this issue now as there’s nothing else to be done (certainly in this repo). Thanks for bearing with us, and raising it in the first place.
@EatonZ: Not that I’ve seen - I’ll have a look at the internal bug on Monday.