Repository navigation
Downloading from Cloud Storage - Cannot call method 'write' of null #789
Copy link
Copy link
Closed
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.
Description
Activity
Thanks for reporting this issue! I tested this locally but I wasn't able to trigger the same error, do you think you could provide us with a test case to recreate the issue?
Thanks for replying.
I wrote a simpler test case and discovered the bug was occurring elsewhere in my code, the problem does not relate to gcloud-node, so am closing this issue.
I am curious as to why you were getting this error, I am completely at loss...
I barely changed the sample code and encounter it seemingly randomly (albeit frequently).@hu9o could you share a reproduction case / show your code? I'm happy to take a look.
- addedapi: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.
on Jan 26, 2017 Sorry, this is embarrassing: my error is actually about the speech API... I should have paid more attention.
- added 2 commits that reference this issue
on Nov 10, 2022 - added a commit that references this issue
on Nov 17, 2022 - added a commit that references this issue
on Jul 23, 2025 - added a commit that references this issue
on Jan 20, 2026 2 remaining items
- added a commit that references this issue
on Jan 28, 2026 - added a commit that references this issue
on Feb 5, 2026 - added a commit that references this issue
on Feb 17, 2026 - added a commit that references this issue
on Feb 23, 2026 - added a commit that references this issue
on Feb 25, 2026 - added a commit that references this issue
on Feb 26, 2026 - added a commit that references this issue
on Feb 26, 2026 - added a commit that references this issue
on Mar 5, 2026 - added a commit that references this issue
on Mar 5, 2026 - added a commit that references this issue
on Mar 18, 2026
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.
I have a node instance that creates child processes, in these child processes there is a requirement to download a file from Cloud storage. When running more than one I am seeing the following error:
/opt/testing/node_modules/modesl/node_modules/eventemitter2/lib/eventemitter2.js:290
throw arguments[1]; // Unhandled 'error' event
^
TypeError: Cannot call method 'write' of null
at onCreated (/opt/testing/src/outbound/lib/Child.js:1153:62)
at DestroyableTransform. (/opt/testing/src/outbound/lib/Child.js:1463:17)
at DestroyableTransform.emit (events.js:117:20)
at /opt/testing/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js
:965:16
at process._tickCallback (node.js:448:13)
To download I have tried both examples shown in the gcloud-node repository:
// Download a file from your bucket.
bucket.file('giraffe.jpg').download({
destination: '/photos/zoo/giraffe.jpg'
}, function(err) {});
// Streams are also supported for reading and writing files.
var localReadStream = fs.createReadStream('/photos/zoo/zebra.jpg');
var remoteWriteStream = bucket.file('zebra.jpg').createWriteStream();
localReadStream.pipe(remoteWriteStream);
Has anyone else seen this issue, is it a bug?