Repository navigation
Not access data from Google Play #651
Description
Activity
Is that bucket owned by you? If so, are you sure that particular service account (specified in
keyFilename) has access to the bucket?- addedapi: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.
on Jun 10, 2015 Yep, the bucket and the app owned by one account.
Using gsutil everything works as expected.Hmm. Are you able to list buckets ?
var gcloud = require('gcloud'); var storage = gcloud.storage({ projectId: '1xxxxxxxx', keyFilename: './json_api_key.json' }); storage.getBuckets(function(err, buckets, next) { console.log('Buckets were: ', buckets); });
The list is empty, the response status of 200.
{ response: { debugId: 1, headers: { expires: 'Wed, 10 Jun 2015 13:28:33 GMT', date: 'Wed, 10 Jun 2015 13:28:33 GMT', 'cache-control': 'private, max-age=0, must-revalidate, no-transform', vary: 'Origin, X-Origin', 'content-type': 'application/json; charset=UTF-8', 'x-content-type-options': 'nosniff', 'x-frame-options': 'SAMEORIGIN', 'x-xss-protection': '1; mode=block', 'content-length': '31', server: 'GSE', 'alternate-protocol': '443:quic,p=1', connection: 'close' }, statusCode: 200, body: '{\n "kind": "storage#buckets"\n}\n' } }
btw, APIs Explorer (https://cloud.google.com/storage/docs/json_api/v1/buckets/list) shows the same response, the request (https://cloud.google.com/storage/docs/json_api/v1/objects/list) generates a list of files.
This really seems like an access problem for that specific service account... You're 100% certain that the project ID is correct (and owns that bucket)? And that the service account is in that project?
What happens if you run
gcloud auth loginlocally and comment out thekeyFilenameproperty? (This tells gcloud-node to pull credentials from whatever the cloud SDK is using.)After using the command "gcloud auth login" and comment out the keyFilename property, request responded with 200 status and brought the list of files.
It turns out that is not authenticated through a "service_account".
I doubled checked and even created another json key, but still won't work.
Gotcha. Do you see the service account in the list on the permissions page? (https://console.developers.google.com/project/_/permissions)
I just ran a quick test to double check this:
- Create a bucket
- Upload a file to that bucket
- Create a new set of credentials (service account, with JSON keyfile)
- Check whether the new credentials could see the bucket listing
The hope was to see if there was some bug on Google's side where maybe they weren't granting access to the bucket if you created the credentials after the fact.
It looks like this did exactly what it was supposed to do: I was able to see the bucket listing using the service account.
Any other info you can provide to help us track down whether this was a bug or not would be super useful... but I'm out of ideas (outside of simple mistakes like using the wrong
.jsonfile).We don't have account in Google Cloud Storage and we can't create a bucket :(
We have another account for a android application.This is weird. Just throwing out a couple ideas:
- The project id is different than the project number. Typically it starts with a letter, so it's strange yours starts with a number unless you changed it. For example
purple-spaceman-123is a good example of what a default project id looks like. - Try going to
https://console.developers.google.com/project/{{projectID}}/apiui/credential
You should see a screen like:
Click the "Generate new JSON key" button and set
keyFilenameto point to that file. The file should contain the line:"type": "service_account".We don't have account in Google Cloud Storage and we can't create a bucket :(
What do you mean you don't have an account in Google Cloud Storage? There is no such thing as a Google Cloud Storage account. There are Google accounts and Google Service Accounts. With those two things, and the right credentials, you should be all set to use this library.
- The project id is different than the project number. Typically it starts with a letter, so it's strange yours starts with a number unless you changed it. For example
FWIW Cloud Storage did see a blip of 500's yesterday on https://status.cloud.google.com/ but, despite the overall vague-ness of the status report, it seems unrelated to the issue presented here.
57 remaining items
- added a commit that references this issue
on Jul 23, 2025 - added 5 commits that reference this issue
on Jan 27, 2026 - added a commit that references this issue
on Jan 28, 2026 - added a commit that references this issue
on Feb 17, 2026 - added a commit that references this issue
on Feb 26, 2026 - added a commit that references this issue
on Mar 12, 2026




When requesting files from the bucket "pubsite_prod_rev_ххххх" answer is always "Forbidden" (status code 403).
Example code: