GeezerVison is showing github.com — Downloading from Cloud Storage - Cannot call method 'write' of null · Issue #789 · googleapis/google-cloud-node
Downloading from Cloud Storage - Cannot call method 'write' of null #789DescriptionI 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? Activitycallmehiphop commented on Aug 10, 2015 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? kieranhackshall commented on Aug 10, 2015 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. hu9o commented on Jan 26, 2017 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). stephenplusplus commented on Jan 26, 2017 @hu9o could you share a reproduction case / show your code? I'm happy to take a look. hu9o commented on Jan 27, 2017 Sorry, this is embarrassing: my error is actually about the speech API... I should have paid more attention.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|