Skip to content
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

Error in storage - calling transform done when ws.length != 0 #805

Closed
leibale opened this issue Aug 17, 2015 · 19 comments
Closed

Error in storage - calling transform done when ws.length != 0 #805

leibale opened this issue Aug 17, 2015 · 19 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@leibale
Copy link
Contributor

leibale commented Aug 17, 2015

/home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:204
    throw new Error('calling transform done when ws.length != 0');
          ^
Error: calling transform done when ws.length != 0
    at done (/home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:204:11)
    at DestroyableTransform.<anonymous> (/home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:139:7)
    at DestroyableTransform.g (events.js:199:16)
    at DestroyableTransform.emit (events.js:129:20)
    at DestroyableTransform.<anonymous> (/home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/stream-forward/index.js:31:26)
    at DestroyableTransform.<anonymous> (/home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/stream-forward/node_modules/on-everything/index.js:12:17)
    at DestroyableTransform.obj.(anonymous function) [as emit] (/home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/stream-forward/node_modules/stubs/index.js:28:10)
    at finishMaybe (/home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/retry-request/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:502:14)
    at endWritable (/home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/retry-request/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:512:3)
    at DestroyableTransform.Writable.end (/home/leibale/workspace/images-processor/node_modules/gcloud/node_modules/retry-request/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:477:5)

i don't know the exact request- but it's from the storage

@stephenplusplus stephenplusplus added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: storage Issues related to the Cloud Storage API. labels Aug 17, 2015
@stephenplusplus
Copy link
Contributor

Thanks for reporting. If you can zero in on one or more of your gcloud calls that consistently produces this, that would definitely help. But, generally speaking, our streams do need some safeguards to prevent again this.

@leibale
Copy link
Contributor Author

leibale commented Aug 17, 2015

file.download({
  destination: path
}, function (err) {
// --
/});

this is the request

@leibale
Copy link
Contributor Author

leibale commented Aug 17, 2015

it's important so.. i will be happy if somebody help me
sorry for my audacity

@stephenplusplus
Copy link
Contributor

Sure, we'll do our best. Your best option for now is probably to downgrade to v0.17.

@leibale
Copy link
Contributor Author

leibale commented Aug 17, 2015

It also doesn't work

@stephenplusplus
Copy link
Contributor

Ok, roll back once more to 0.16 or the soonest you are able to make the request successfully.

@leibale
Copy link
Contributor Author

leibale commented Aug 17, 2015

but in v0.16 the maxInProgress doesn't exist


maybe it's happened after change in the server

"On June 9th your project XXXXXXXX was affected by an incident which caused elevated error rates for 1 hour 40 minutes. You can read about the incident and the changes we have made to prevent re-occurrence at https://status.cloud.google.com/incident/storage/16025.

We take such incidents seriously and are therefore issuing a credit under the terms of our Service Level Agreement (SLA) as defined at https://cloud.google.com/storage/sla. This credit will be equal to 10% of your June Google Cloud Storage bill. In this case, we will apply this credit to your account automatically, bypassing the normal SLA application procedure, so no action is required on your part.

Yours,
The Google Cloud Storage Team

Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043

You have received this mandatory service announcement to update you about important changes to Google Cloud Platform or your account.

i got this in email from CloudPlatform-noreply@google.com

@stephenplusplus
Copy link
Contributor

Can you try removing the node_modules directory and re-installing gcloud? I updated the problematic dependency here: stephenplusplus/stream-forward@11ec2a7

@leibale
Copy link
Contributor Author

leibale commented Aug 17, 2015

re-installing gcloud from github or from npm?

@stephenplusplus
Copy link
Contributor

From npm, it will automatically pick up the new stream-forward. Just make sure to rm -rf node_modules first. Updating is weird.

@leibale
Copy link
Contributor Author

leibale commented Aug 17, 2015

now requests not returns (and i am in google vm so it's not internet problem)

@stephenplusplus
Copy link
Contributor

All requests aren't returning? Can you show more of the code you're using?

@leibale
Copy link
Contributor Author

leibale commented Aug 17, 2015

pub/sub working

file.download({
  destination: path
}, function (err) {
// --
/});

@leibale
Copy link
Contributor Author

leibale commented Aug 17, 2015

sorry, the code is:

storage.backupBucket.file(message.filename).createReadStream().on('error', callback).pipe(fs.createWriteStream(path)).on('finish', function () {
  console.log('downloaded');
  callback(null, message, path);
});

@stephenplusplus
Copy link
Contributor

Ah, thanks-- I see now! You need to listen for the complete event, instead of finish.

@stephenplusplus
Copy link
Contributor

Oh, I'm sorry, I misread the code. BRB :)

@leibale
Copy link
Contributor Author

leibale commented Aug 17, 2015

you need help?

@stephenplusplus
Copy link
Contributor

PR with a fix is coming shortly... basically, we destroy the stream. We don't have to do that unless there's an error.

@stephenplusplus
Copy link
Contributor

PR sent! #809

sofisl pushed a commit that referenced this issue Nov 11, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants