google-api-dotnet-client: Vague Authentication failure
I’m getting a vague authentication failure from GetApplicationDefaultAsync()
.
{“Error reading credential file from location C:\ArtofShell\Google\Vision\GoogleCred.json: Bad Data.\r\n\nPlease check the value of the Environment Variable GOOGLE_APPLICATION_CREDENTIALS”}
Here’s my code:
Environment.SetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS", @"C:\ArtofShell\Google\Vision\GoogleCred.json");
var credential = await GoogleCredential.GetApplicationDefaultAsync();
Repro steps:
- I created a Service Account
- I downloaded the credential file
- I set the environment variable to the path of the credential file
- Attempted to call GetApplicationDefaultAsync()
Cheers, Trevor Sullivan Microsoft MVP: Cloud & Data Center Management https://trevorsullivan.net https://twitter.com/pcgeek86
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 23 (2 by maintainers)
Our mistake – we thought we saw a pattern of failures after the latest release, but it turned out to be a problem in our own code. Please excuse the false alarm.