-
Notifications
You must be signed in to change notification settings - Fork 598
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
file.createReadStream() ends prematurely and events do not seem triggered #811
Comments
fs.createWriteStream emits finish when it's done. response and complete should be moved up before fs is piped as those are events from file.createReadStream. After doing that, can you let me know if that helps matters? Thanks for upgrading and reporting! |
Also, I like your console.log style... looks exactly like mine :) |
Thanks, your note about the event ordering and the correct 'finish' event helped trigger the right event. The code I was running was from the sample docs. Running this code repeatedly:
Yields:
So I get varied durations before the call terminates, and a variable amount of data for the same request, and I get no error event or error logging. The bucket is "Nearline" storage type. Thanks! |
Thanks for the details. I'll look into this asap. |
BTW, I see the same thing on node 10.x and gcloud 0.18.x... |
@neilcronin I sent a PR #813 -- would you mind trying it out? $ rm -rf node_modules/gcloud
$ npm install stephenplusplus/gcloud-node#spp--core-forward-specific-events |
@stephenplusplus Yup, I ran it a couple 10s of times and your PR works like a charm. I updated the docs in another PR that you have already seen, I couldn't make a sensible PR between my fork and yours. |
A++ would file issue again. |
I look forward to it! |
* chore(main): release 7.0.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…es (#811) * fix: rename _toc to toc Source-Author: F. Hinkelmann <franziska.hinkelmann@gmail.com> Source-Date: Tue Jul 21 10:53:20 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 99c93fe09f8c1dca09dfc0301c8668e3a70dd796 Source-Link: googleapis/synthtool@99c93fe * fix: move gitattributes files to node templates Source-Author: F. Hinkelmann <franziska.hinkelmann@gmail.com> Source-Date: Thu Jul 23 01:45:04 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3 Source-Link: googleapis/synthtool@3a00b7f
Hi,
I am attempting to download a gzipped file from google cloud storage via the node library.
My code:
None of those console messages are emitted, and the data transferred for the same 42MB bucket item is between 500K and 5MB.
Transferring smaller files seems to work, but still none of those events are fired AFAICT.
It appears that the transfer is being interrupted or is bombing out, but I don't see any logging about what is going on.
Node v0.12.7
Gcloud v0.19.0
OS X 10.10.4
Thanks!
-neil
The text was updated successfully, but these errors were encountered: