snobu / destreamer

Save Microsoft Stream videos for offline enjoyment.
MIT License
2.36k stars 441 forks source link

Unnkown error: exit code 4 #325

Closed btarm closed 3 years ago

btarm commented 3 years ago

Whether I pass links through terminal or a text file, I get "[FATAL ERROR] Unknown error: exit code 4". I can run "--help" normally. "npm install" and "npm run build" passed without any errors. "--verbose" does not provide anything other than the aforementioned error code.

macOS: 11.2 destreamer: 2.1.0 npm: 7.5.3 node: 15.4.0

Erik-Ilavsky commented 3 years ago

same problem with debian 10.4 npm 6.14.4 node v12.16.3

ctyeong commented 3 years ago

Same with

Ubuntu 18.04 npm 7.5.1 node v15.8

lukaarma commented 3 years ago

I'm sorry but I've not been able to reproduce this error, I'll keep trying because I'm not sure what else you could do The only things that comes to mind is to clean everything (node, Destreamer) and reinstall from 0

ctyeong commented 3 years ago

Could there be anything related to the fact that the video I'd like to download is the one only open to a particular group?

snobu commented 3 years ago

No, no API call gets made, either because it can't reach the network (are you using a proxy?) or some other reason that Node fails to catch when it exists.

lukaarma commented 3 years ago

@snobu we are catching the error code seeing as

I get "[FATAL ERROR] Unknown error: exit code 4".

is the error we print for an unknown code on exit.

EDIT: @btarm @Erik-Ilavsky @ctyeong could you please tell me your FFmpeg version?

snobu commented 3 years ago

Yes but there's no other message being returned from Node, right? Other than the exit code. Or is it and we drop it?

lukaarma commented 3 years ago

Yes but there's no other message being returned from Node, right? Other than the exit code. Or is it and we drop it?

The callback is passed only the exit code. My diagnosis is that FFmpeg is failing it's check (error number 4 in our ERROR_CODE) but the ERRORS object is not yet loaded somehow and our code cannot link the error code to the correct message. I've had similar timing errors in Ubuntu before that were not present in Windows

If they confirm my theory with an outdated FFmpeg version we just need to make the ERROR_CODE enum start at an higher number and we're done, if not we need to dig deeper

snobu commented 3 years ago

@ctyeong what is your ffmpeg version?

Erik-Ilavsky commented 3 years ago

i had problem ffmpeg version 4.1.4-1~deb10u1, but after upgrade to ffmpeg version 4.3.1 it's working. But is there is another problem with -f return 404, with sequential loop with -i is working (possible MS rate limit ?), i will report it.

Erik-Ilavsky commented 3 years ago

But is there is another problem with -f return 404, with sequential loop with -i is working (possible MS rate limit ?), i will report it.

downloading is working until first HTTP error 404 is occured, but process return code is 0

diego200052 commented 3 years ago

I solved the problem updating the version of ffmpeg to 4.3.1 or above.

diego200052 commented 3 years ago

I was on 4.1.2 ffmpeg version and I got the error

btarm commented 3 years ago

Went from ffmpeg 4.2.1 to 4.3.2 and the problem was solved. Thanks!

lukaarma commented 3 years ago

I found the bug @snobu, it was so stupid...will be fixed in the update I'll push