[BUG] Container think's it's running on Windows? "ERROR: Command failed with ENOENT: node_modules\youtube-dl\bin\youtube-dl.exe"
See original GitHub issueDescribe the bug
I stood up a new instance of YTDLM on my Raspberry Pi 4B using the “latest” “nightly” tag for the Docker image with mongodb. I configured it identically to another instance I have running on an M1 Mac Mini but its logs are littered with error messages referencing a .exe file which is a Windows executable. This is not a Windows environment, why is this happening?
To Reproduce Steps to reproduce the behavior:
- Run YTDLM in Docker with the
nightly
tag on an RPi 4B.
Expected behavior YTDLM should correctly download videos.
Environment
- YoutubeDL-Material version - Docker
- Docker tag:
latestnightly
Ideally you’d copy the info as presented on the “About” dialogue in YoutubeDL-Material. (for that, click on the three dots on the top right and then check “installation details”. On later versions of YoutubeDL- Material you will find pretty much all the crucial information here that we need in most cases!)
Additional context
Installed version: v4.2 - You are up to date.
Installation type: docker
Docker tag: nightly
Commit hash: 05ea5a8
Build date: 2022-05-02
Some logs:
2022-05-02T12:57:38.745Z INFO: Cannot find config file. Creating one with default values...
2022-05-02T12:57:38.775Z INFO: Config items set using ENV variables.
2022-05-02T12:57:39.027Z INFO: Beginning migration: 4.1->4.2+
2022-05-02T12:57:39.374Z ERROR: Invalid Operation, no operations specified
2022-05-02T12:57:39.376Z ERROR: Migration failed: 4.1->4.2+
2022-05-02T12:57:39.376Z INFO: Beginning migration: 4.2->4.3+
2022-05-02T12:57:39.429Z INFO: 4.2->4.3+ migration complete!
2022-05-02T12:57:39.635Z ERROR: Failed to check youtube-dl version for an update.
2022-05-02T12:57:39.635Z ERROR: request to https://api.github.com/repos/ytdl-org/youtube-dl/tags failed, reason: unable to get local issuer certificate
2022-05-02T12:57:39.648Z INFO: YoutubeDL-Material v4.2 started on PORT 17442
2022-05-02T13:02:27.267Z ERROR:
2022-05-02T13:02:27.268Z ERROR: Subscribe: Failed to get subscription info. Subscribe failed.
2022-05-02T13:02:53.237Z ERROR:
2022-05-02T13:02:53.238Z ERROR: Subscribe: Failed to get subscription info. Subscribe failed.
2022-05-02T13:03:47.357Z ERROR:
2022-05-02T13:03:47.358Z ERROR: Subscribe: Failed to get subscription info. Subscribe failed.
2022-05-02T13:04:05.376Z ERROR:
2022-05-02T13:04:05.377Z ERROR: Subscribe: Failed to get subscription info. Subscribe failed.
2022-05-02T13:04:21.978Z ERROR:
2022-05-02T13:04:21.980Z ERROR: Subscribe: Failed to get subscription info. Subscribe failed.
2022-05-02T13:04:34.676Z ERROR:
2022-05-02T13:04:34.679Z ERROR: Subscribe: Failed to get subscription info. Subscribe failed.
2022-05-03T12:57:39.975Z ERROR: Command failed with ENOENT: node_modules\youtube-dl\bin\youtube-dl.exe -i -f best --dump-json --dateafter now-7days --write-thumbnail https://youtube.com/playlist?list=PLYedISEX7Xn2ixyevh7FqLH1INn004_la
spawn node_modules\youtube-dl\bin\youtube-dl.exe ENOENT
2022-05-03T16:57:40.012Z ERROR: Command failed with ENOENT: node_modules\youtube-dl\bin\youtube-dl.exe -i -f best --dump-json --write-thumbnail https://youtube.com/playlist?list=PLYedISEX7Xn39H7mTAEX9-qik7DLMzPSQ
spawn node_modules\youtube-dl\bin\youtube-dl.exe ENOENT
2022-05-03T20:57:40.291Z ERROR: Command failed with ENOENT: node_modules\youtube-dl\bin\youtube-dl.exe -i --dump-json -o "subscriptions/channels/Bright Sun Films /%(title)s.%(ext)s" -ciw --write-info-json --print-json -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4 --dateafter now-7days --write-thumbnail https://www.youtube.com/c/BrightSunGaming
spawn node_modules\youtube-dl\bin\youtube-dl.exe ENOENT
2022-05-04T00:57:40.247Z ERROR: Command failed with ENOENT: node_modules\youtube-dl\bin\youtube-dl.exe -i --dump-json -o "subscriptions/channels/Defunctland/%(title)s.%(ext)s" -ciw --write-info-json --print-json -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4 --dateafter now-7days --write-thumbnail https://www.youtube.com/c/Defunctland
spawn node_modules\youtube-dl\bin\youtube-dl.exe ENOENT
2022-05-04T04:57:40.267Z ERROR: Command failed with ENOENT: node_modules\youtube-dl\bin\youtube-dl.exe -i --dump-json -o "subscriptions/channels/Fredrik Knudsen/%(title)s.%(ext)s" -ciw --write-info-json --print-json -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4 --dateafter now-7days --write-thumbnail https://www.youtube.com/c/FredrikKnudsen
spawn node_modules\youtube-dl\bin\youtube-dl.exe ENOENT
2022-05-04T08:57:40.319Z ERROR: Command failed with ENOENT: node_modules\youtube-dl\bin\youtube-dl.exe -i --dump-json -o "subscriptions/channels/Todd in the Shadows/%(title)s.%(ext)s" -ciw --write-info-json --print-json -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4 --dateafter now-7days --write-thumbnail https://www.youtube.com/c/ToddintheShadows
spawn node_modules\youtube-dl\bin\youtube-dl.exe ENOENT
2022-05-04T12:57:40.004Z ERROR: Command failed with ENOENT: node_modules\youtube-dl\bin\youtube-dl.exe -i -f best --dump-json --dateafter now-7days --write-thumbnail https://youtube.com/playlist?list=PLYedISEX7Xn2ixyevh7FqLH1INn004_la
spawn node_modules\youtube-dl\bin\youtube-dl.exe ENOENT
2022-05-04T16:57:40.294Z ERROR: Command failed with ENOENT: node_modules\youtube-dl\bin\youtube-dl.exe -i -f best --dump-json --write-thumbnail https://youtube.com/playlist?list=PLYedISEX7Xn39H7mTAEX9-qik7DLMzPSQ
spawn node_modules\youtube-dl\bin\youtube-dl.exe ENOENT
2022-05-04T20:57:40.246Z ERROR: Command failed with ENOENT: node_modules\youtube-dl\bin\youtube-dl.exe -i --dump-json -o "subscriptions/channels/Bright Sun Films /%(title)s.%(ext)s" -ciw --write-info-json --print-json -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4 --dateafter now-7days --write-thumbnail https://www.youtube.com/c/BrightSunGaming
spawn node_modules\youtube-dl\bin\youtube-dl.exe ENOENT
2022-05-04T23:09:58.514Z INFO: Config items set using ENV variables.
2022-05-04T23:09:59.171Z ERROR: Failed to check youtube-dl version for an update.
2022-05-04T23:09:59.172Z ERROR: request to https://api.github.com/repos/ytdl-org/youtube-dl/tags failed, reason: unable to get local issuer certificate
2022-05-04T23:09:59.195Z INFO: YoutubeDL-Material v4.2 started on PORT 17442
2022-05-04T23:09:59.262Z ERROR: Command failed with ENOENT: node_modules\youtube-dl\bin\youtube-dl.exe -i -f best --dump-json --dateafter now-7days --write-thumbnail https://youtube.com/playlist?list=PLYedISEX7Xn2ixyevh7FqLH1INn004_la
spawn node_modules\youtube-dl\bin\youtube-dl.exe ENOENT
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Hi @yllekz, I identified the problem and fixed it in #602!
EDIT: I should probably clarify for posterity purposes, I implemented a workaround that detects when our youtube-dl nodejs dependency decides to use a
.exe
path in a non-Windows environment and automatically adjusts it through the following process:path
andexec
fields indetails
file innode_modules/youtube-dl/bin
to remove.exe
details
file back to 2020process.exit()
to restart the serverIt’s an ugly workaround, but the best I can do right now. Unfortunately the dependency is deprecated, so I can’t ask the devs to fix the issue.
Hi @yllekz, can you try switching to yt-dlp in the Advanced tab in the settings and restarting the container?
Reason why I ask is I’m almost positive our logic of checking whether we need to download a
exe
is correct. The dependency we use to interface with youtube-dl may have gotten confused with the M1 platform. By switching to yt-dlp we manually download the binary which hopefully will work.I’m now seeing
request to https://api.github.com/repos/ytdl-org/youtube-dl/tags failed, reason: unable to get local issuer certificate
in your logs. The youtube-dl auto updater isn’t working, but there is a workaround which I’m working on…