20lives / FrontendMastersDownloader

FrontendMasters Downloader - A tool to keep offline copy of frontendmasters courses
199 stars 41 forks source link

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'isStream' of undefined #25

Closed jaeyson closed 3 years ago

jaeyson commented 3 years ago

Hi!, Thank you for this great tool you've made. I've come across this bug that's reading undefined (using npx)?

(node:17210) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'isStream' of undefined at runFfprobe (/home/user/.npm/_npx/17210/lib/node_modules/frontendmasters-downloader/node_modules/fluent-ffmpeg/lib/processor.js:25:40) at FfmpegCommand.proto._prepare (/home/user/.npm/_npx/17210/lib/node_modules/frontendmasters-downloader/node_modules/fluent-ffmpeg/lib/processor.js:373:9) at FfmpegCommand.proto.exec.proto.execute.proto.run (/home/user/.npm/_npx/17210/lib/node_modules/frontendmasters-downloader/node_modules/fluent-ffmpeg/lib/processor.js:431:10) at FfmpegCommand.proto.saveToFile.proto.save (/home/user/.npm/_npx/17210/lib/node_modules/frontendmasters-downloader/node_modules/fluent-ffmpeg/lib/recipes.js:28:25) at Object.download (file:///home/user/.npm/_npx/17210/lib/node_modules/frontendmasters-downloader/src/downloader.js:49:102) at run (file:///home/user/.npm/_npx/17210/lib/node_modules/frontendmasters-downloader/src/index.js:58:14) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:17210) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:17210) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. events.js:291 throw er; // Unhandled 'error' event ^

Error: ffmpeg exited with code 1: Invalid input file index: 0.

at ChildProcess.<anonymous> (/home/user/.npm/_npx/17210/lib/node_modules/frontendmasters-downloader/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
at ChildProcess.emit (events.js:314:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)

Emitted 'error' event on FfmpegCommand instance at: at emitEnd (/home/user/.npm/_npx/17210/lib/node_modules/frontendmasters-downloader/node_modules/fluent-ffmpeg/lib/processor.js:424:16) at endCB (/home/user/.npm/_npx/17210/lib/node_modules/frontendmasters-downloader/node_modules/fluent-ffmpeg/lib/processor.js:544:13) at handleExit (/home/user/.npm/_npx/17210/lib/node_modules/frontendmasters-downloader/node_modules/fluent-ffmpeg/lib/processor.js:170:11) at ChildProcess. (/home/user/.npm/_npx/17210/lib/node_modules/frontendmasters-downloader/node_modules/fluent-ffmpeg/lib/processor.js:182:11) at ChildProcess.emit (events.js:314:20) at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)

20lives commented 3 years ago

Please specify your OS and FFmpeg version, meanwhile, try to uninstall FFmpeg (and FFprobe) and reinstall a recent version from the official site ffmpeg.

jaeyson commented 3 years ago

Ubuntu 20.04.1 LTS kernel: 5.4.0-54-generic x86_64

ffmpeg

ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil      56. 31.100 / 56. 31.100
libavcodec     58. 54.100 / 58. 54.100
libavformat    58. 29.100 / 58. 29.100
libavdevice    58.  8.100 / 58.  8.100
libavfilter     7. 57.100 /  7. 57.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  5.100 /  5.  5.100
libswresample   3.  5.100 /  3.  5.100
libpostproc    55.  5.100 / 55.  5.100

ffprobe

ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil      56. 31.100 / 56. 31.100
libavcodec     58. 54.100 / 58. 54.100
libavformat    58. 29.100 / 58. 29.100
libavdevice    58.  8.100 / 58.  8.100
libavfilter     7. 57.100 /  7. 57.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  5.100 /  5.  5.100
libswresample   3.  5.100 /  3.  5.100
libpostproc    55.  5.100 / 55.  5.100

reinstalled both, still having the same issues.

I've reproduced this issue by completely re-download a course (Networking and Streams), then at the last 3 of videos it returns the aforementioned error. Since i couldnt get the last 3 videos, i was able to download via network tab in devtools.

20lives commented 3 years ago

which course was it for?

jaeyson commented 3 years ago

which course was it for?

Networking and Streams.

20lives commented 3 years ago

did some digging and this was a result of a missing file on frontendMasters servers.

20lives commented 3 years ago

27 is fixing this issue.