Closed petrhdk closed 3 years ago
I am sorry for the very late reply. And thank you for the demo. It helped to debug it.
When does it happen? Only in the edge-case that the file to encode was set via setBuffer()
and it is an allocated buffer without any content and at the same time the output
file do not exist.
Why does the bug happen? We execute lame
via spawn()
. lame
cannot read this file/buffer and do not know there it should write its output to. Therefore, it closes (not fails) immediately with an exit code 255
. This exit code as a closing signal was not yet handled to resolve the promise.
Solution: Handle exist code 255
in process closing like an error.
Fixed and released in version 1.3.1.
Exceptions during the execution of
enc.encode()
simply terminate the node process. The developer has no clue what went wrong and the exception/rejection can not be catched.Am I missing something, is this intended behavior, or can we go on to improving on it? :D
minimal reproducable example: