tungs/timecut

UnhandledPromiseRejectionWarning when ffmpeg or file not present

ReneBeszon opened this issue · 0 comments

Hi,

I'm calling timecut the following way
timecut({ url: this._input, output: this._output, duration: this._duration, fps: this._framerate, quiet: true, pipeMode: true, launchArguments: ["--no-sandbox", "--disable-setuid-sandbox", "--allow-file-access-from-files"], canvasCaptureMode: true, selector: "#canvas" }).then(this.markAsDone).catch(this.markAsError);
unfortunately I'm not able to catch the above mentioned errors as the promise is already rejected when returning it in
return timesnap(timesnapConfig) .then(function () { if (convertProcess) { convertProcess.stdin.end(); } }) .then(function () { // wait for ffmpeg to finish if (processPromise) { return processPromise; } else { return makeProcessPromise(); } }).catch(function (err) { log(err); }).then(function () { if (frameMode && !config.keepFrames) { deleteFolder(frameDirectory); } });

Best regards