Repository navigation
Unhelpful error message #325
Description
Activity
(copied and pasted from someone else, I'll be asking the reporter to come add more detail here)
I ran into this while testing out GAE dev + gcloud for #328. This error comes from https://github.com/stephenplusplus/google-service-account/blob/v1.0.3/connection.js#L80:
if (/*G[AC]E*/!this.keyFile && !this.credentials) return request({ method: "get", uri: METADATA_TOKEN_URL, headers: { "Metadata-Flavor": "Google" }, json: true }, function (err, res, body) { if (err || !body.access_token) return callback(err) var exp = new Date(Date.now() + body.expires_in * 1000) callback(null, new Token(body.access_token, exp)) })
In
gcloud, we didn't get akeyFilenameorcredentialsobject from the user, so we passedundefinedvalues for them to google-service-account (GSA). To GSA, that's interpreted as "we're on GCE, where a user doesn't have to provide that information," so it pings the metadata server to get a token. When it gets an error that that endpoint doesn't exist, it just sends the error back to gcloud, which is then handed back to the user.Long story short: #331 is a new PR that will listen specifically for that error and throw a more helpful error.
- addedtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.and removed
on Feb 2, 2015 - added🚨This issue needs some love.This issue needs some love.triage meI really want to be triaged.I really want to be triaged.
on Apr 7, 2020 - added a commit that references this issue
on Aug 22, 2022 31 remaining items
- added a commit that references this issue
on Feb 24, 2026 - added 2 commits that reference this issue
on Feb 25, 2026 - added 2 commits that reference this issue
on Mar 5, 2026 - added 2 commits that reference this issue
on Mar 9, 2026 - added a commit that references this issue
on Mar 27, 2026 - added a commit that references this issue
on May 5, 2026
I'm using gcloud-node and yesterday my code worked, today it doesn't work anymore. The problem is that the only error message I am getting is the following:
{ [Error: getaddrinfo ENOTFOUND] code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo' }
It turns out that this was caused by me (I've moved the initialization with project id and key file name to a place where it apparently has no effect).
What did you expect to happen?
Better error message! Which address are you trying to resolve? Any likely causes that you can think of?