question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Well-known ADC file path is incorrect in some cases

See original GitHub issue

I 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:closed
  • Created 2 years ago
  • Comments:16

github_iconTop GitHub Comments

1reaction
jskeetcommented, Apr 4, 2022

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.

1reaction
jskeetcommented, Apr 1, 2022

@EatonZ: Not that I’ve seen - I’ll have a look at the internal bug on Monday.

Read more comments on GitHub >

github_iconTop Results From Across the Web

path.exists() is returning False - python
If you read the Python documentation of os.path.exists(), it says that there are specific cases in which a file or folder exists but...
Read more >
Solved: LabVIEW using wrong paths - NI Community
When I open this file, I see several VIs referencing the EOL Tool directory. Since the files are gone, the message pops up...
Read more >
Is there a conventional way to combine file path strings?
In any and all cases, when they come from different sources, you have to consider several different possible cases regarding the separators on ......
Read more >
Wrong file path when file rotation - Beats
I was testing how fiebeat handles file roration case. I found two problems, and I'm not sure if that's caused by my configuration...
Read more >
Google Auth Library: Node.js Client
For OIDC providers, the Auth library can retrieve OIDC tokens either from a local file location (file-sourced credentials) or from a local ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found