Skip to content

"Backend Error" when setting file ACL #794

Description

@knation

Trying to set ACL after uploading and consistently getting a "Backend Error" when trying to set ACL. File uploads fine each time.

var image = myBucket.file('foo.jpg');
var imageWriteStream = image.createWriteStream({ contentType: 'image/jpeg' });

imageWriteStream.on('complete', function() {
  // Set ACL
  image.acl.add({
    scope: 'allUsers',
    role:  gcloud.storage.acl.READER_ROLE
  }, function(err) {
    // FAILING HERE
    console.log(err);
  });
});

my Stream.pipe(imageWriteStream);

Activity

  1. stephenplusplus commented on Aug 12, 2015

    @stephenplusplus
    Contributor

    Thanks for reporting, I'll check it out!

    Just confirming, are you on gcloud version 0.18?

  2. knation commented on Aug 12, 2015

    @knation
    Author

    Sorry about that. No, I'm on v0.15.0. The version installed through NPM. Is there an ETA of when v0.18 will be in NPM?

  3. stephenplusplus commented on Aug 12, 2015

    @stephenplusplus
    Contributor

    It's actually out now. What value do you have in your package.json?

  4. knation commented on Aug 12, 2015

    @knation
    Author

    My bad. I must have previously installed it so it was stuck on v0.15. I updated and the problem persists.

  5. stephenplusplus commented on Aug 12, 2015

    @stephenplusplus
    Contributor

    Is the messaging still Backend error? We actually changed how errors are patched from the API - maybe it's more helpful this time around. At the very least, it should be "Error during request".

  6. knation commented on Aug 12, 2015

    @knation
    Author
    Error: Backend Error
        at Object.parseApiResp (/Users/kirk/Projects/slashpath/src/node_modules/gcloud/lib/common/util.js:184:22)
        at Object.handleResp (/Users/kirk/Projects/slashpath/src/node_modules/gcloud/lib/common/util.js:139:25)
        at /Users/kirk/Projects/slashpath/src/node_modules/gcloud/lib/common/util.js:572:12
        at Request.onResponse [as _callback] (/Users/kirk/Projects/slashpath/src/node_modules/gcloud/node_modules/retry-request/index.js:107:7)
        at Request.self.callback (/Users/kirk/Projects/slashpath/src/node_modules/gcloud/node_modules/request/request.js:198:22)
        at Request.emit (events.js:110:17)
        at Request.<anonymous> (/Users/kirk/Projects/slashpath/src/node_modules/gcloud/node_modules/request/request.js:1057:14)
        at Request.emit (events.js:129:20)
        at IncomingMessage.<anonymous> (/Users/kirk/Projects/slashpath/src/node_modules/gcloud/node_modules/request/request.js:1003:12)
        at IncomingMessage.emit (events.js:129:20)
        at _stream_readable.js:908:16
        at process._tickCallback (node.js:355:11)
    
  7. stephenplusplus commented on Aug 12, 2015

    @stephenplusplus
    Contributor

    Oops, I just noticed we have incorrect docs. The parameter to use is actually entity instead of scope. Not sure that will be the fix here, but let's hope 🎌

  8. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: storageIssues related to the Cloud Storage API.
    on Aug 12, 2015
  9. knation commented on Aug 12, 2015

    @knation
    Author

    Hey, that was it, thanks!

  10. 11 remaining items

  11. added a commit that references this issue on Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: storageIssues related to the Cloud Storage API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions