Hi,
I am new to meteor and trying to develop an app for running R script using a webtool. I have used the Meteor method as below.
Meteor.methods({
exec_srv_paleoCar : function(cmd) {
exec(cmd,function(error,stdout,stderr){
console.log(stdout.toString());
future.return(stdout.toString());
});
return future.wait();
},
And the client Call is as below.
var cmd_ras_ext = 'Rscript '+ curr_dir + 'Rscript\\raster_extent.R ' + curr_dir +' ' + in_file_name_ext ;
alert(cmd_ras_ext);
Meteor.call('exec_srv_paleoCar',cmd_ras_ext,(error, result) =>
{
if (error) {
alert(error);
}
});
The method is executing successfully and I am able to get the output and use it in my client.
But the meteor server is getting restarted with the below message.
W20170613-22:55:10.230(-5)? (STDERR) windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:261
W20170613-22:55:10.232(-5)? (STDERR) throw new Error(‘Future resolved more than once’);
W20170613-22:55:10.238(-5)? (STDERR) ^
W20170613-22:55:10.242(-5)? (STDERR)
W20170613-22:55:10.244(-5)? (STDERR) Error: Future resolved more than once
W20170613-22:55:10.246(-5)? (STDERR) at Object.Future.return
packages\meteor-tool\1.5.0\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:261:10)
W20170613-22:55:10.259(-5)? (STDERR) at server/main.js:26:17
W20170613-22:55:10.261(-5)? (STDERR) at ChildProcess.exithandler (child_process.js:191:7)
W20170613-22:55:10.262(-5)? (STDERR) at emitTwo (events.js:87:13)
W20170613-22:55:10.265(-5)? (STDERR) at ChildProcess.emit (events.js:172:7)
W20170613-22:55:10.272(-5)? (STDERR) at maybeClose (internal/child_process.js:862:16)
W20170613-22:55:10.275(-5)? (STDERR) at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
Could you please help me in resolving this error ?