Repository navigation
storage: Followed the simple storage example and keep getting an error #71
Description
Activity
Looking at it.
I think the problem is that the path to the key is invalid, @shacharz can you update to 0.1.0 and try again? You should get a less cryptic error. Note that the interfaces to write to storage change in 0.1.0, so instead of
bucket.writeBuffer("testLog.txt", { data: 'Hello World' }, callback)you should usebucket.write("testLog.txt", { data: 'Hello World' }, callback).It seems like you're depending on 0.0.5 which used to require a pem key and service account email. The auth falls back to Compute Engine's metaserver to retrieve an access token and errors while resolving the name.
Upgrade to 0.1.0 to be able to use
keyFilename.Reinstalled gCloud, this time the npm is updated to 0.1.0.
The error was indeed less cryptic, path to key was invalid (directory separators need to be '' and not '').
Thanks- addedapi: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.type: 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.
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 6, 2020 - added a commit that references this issue
on Aug 26, 2022 - added a commit that references this issue
on Sep 12, 2022 72 remaining items
- added a commit that references this issue
on Feb 26, 2026 - added a commit that references 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 11, 2026 - added a commit that references this issue
on Mar 12, 2026 - added a commit that references this issue
on Mar 12, 2026 - added a commit that references this issue
on Mar 18, 2026 - added a commit that references this issue
on Mar 27, 2026 - added a commit that references this issue
on May 5, 2026
bucket = new gcloud.storage.Bucket({
bucketName: 'BUCKET_NAME',
keyFilename: 'path/to/key.json'
});
And tried different methods:
bucket.list(function(err, files, nextQuery) {
// if more results, nextQuery will be non-null.
console.log("callback returned");
});
//
//bucket.writeBuffer("testLog.txt", { data: 'Hello World' }, function(err){
// console.log("callback returned");
//});
All return with "getaddrinfo ENOTFOUND" message