-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors when using Application Default Credentials from within App Engine #45
Comments
Turns out this was a mistake on my part. In our maven project, we took a dependency on the |
OK. It may be worth creating a new issue along the lines of improving the error message in this case. |
@anthmgoogle is there a way to avoid pulling appengine-api-1.0-sdk (17Mb jar) when not necessary. Few options:
|
Getting an similar error when using an .Net Message":"An error has occurred.","ExceptionMessage":"The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.","ExceptionType":"System.InvalidOperationException","StackTrace":" at Google.Api.Gax.TaskExtensions.WaitWithUnwrappedExceptions(Task task)\r\n at Google.Api.Gax.Grpc.ChannelPool.GetChannel(ServiceEndpoint |
@Raviraj20 you code looks like C# - did you want https://github.com/googleapis/gax-dotnet ? |
@garrettjonesgoogle we cant put the credential file in root folder |
@garrettjonesgoogle |
@garrettjonesgoogle |
@Raviraj20 , what I meant was that you should file an issue using https://github.com/googleapis/gax-dotnet/issues/new to have the owners of gax-dotnet look at it for you. I can't help you here because this repository is for Java issues. |
@garrettjonesgoogle |
I solved the same problem here running: gcloud auth application-default login. I hope helps somebody. |
The original issue appears to be resolved and it's unclear why it was reopened. Closing this out, but feel free to re-open if this is not the case. |
When using Application Default Credentials from App Engine, both on the local development server (after logging in via
gcloud auth login
) and in production, I get the following error message:java.io.IOException: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
Based on that website, it seems like the behavior should be that the SDK credentials are used in the local development server and the App Engine credentials should be provided without setting the GOOGLE_APPLICATION_CREDENTIALS environment variable.
The text was updated successfully, but these errors were encountered: