question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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 issue

Describe 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:

  1. 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: latest nightly

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:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Tzahi12345commented, May 5, 2022

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:

  1. Update path and exec fields in details file in node_modules/youtube-dl/bin to remove .exe
  2. Set version in details file back to 2020
  3. Call process.exit() to restart the server
  4. When the server begins again, it will think youtube-dl is outdated and download a new copy, this time with the correct extension.

It’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.

2reactions
Tzahi12345commented, May 5, 2022

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…

Read more comments on GitHub >

github_iconTop Results From Across the Web

cmd: Command failed with exit code ENOENT - Stack Overflow
My error is In the output window when I build from selecting the device tab. Any advice on how exactly do I add...
Read more >
Running any Windows container returns: docker: Error ...
Describe the bug. I am unable to run any windows containers on my PC. A colleague gets the same behaviour. To Reproduce
Read more >
Pipeline fails to run with windows container
This is realated to a bug in Windows containers in 1803 where host mounts need to have more characters in the path on...
Read more >
I have several executables that just don't run on your build ...
I have a build system which runs on a docker container. That docker container works fine on other windows hosts.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found