Tzahi12345 / YoutubeDL-Material

Self-hosted YouTube downloader built on Material Design
MIT License
2.66k stars 275 forks source link

Nothing downloaded #543

Open AndreaPro opened 2 years ago

AndreaPro commented 2 years ago

Hello, I'm running the nightly version of YoutubeDL-Material with docker on amd64 in debian linux. If I download a video everything works fine, but if I try to download only audio the download starts but no progress or time remaining is displayed, no errors inside the logs (set at debug level) and nothing happens for hours, even after a day the download is still in the list but nothing is downloaded. I've tried with multiple different videos and the audio only mode gives always the same result.

GlassedSilver commented 2 years ago

Can you please post your log?

AndreaPro commented 2 years ago

I don't know what to post because in the logs there is literally no output even in debug mode

On Fri, 15 Apr 2022, 17:28 Glassed Silver, @.***> wrote:

Can you please post your log?

— Reply to this email directly, view it on GitHub https://github.com/Tzahi12345/YoutubeDL-Material/issues/543#issuecomment-1100176686, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7TZ2IWHC5UMHK4L46D4UTVFGDKHANCNFSM5TQJEWLQ . You are receiving this because you authored the thread.Message ID: @.***>

GlassedSilver commented 2 years ago

I don't know what to post because in the logs there is literally no output even in debug mode On Fri, 15 Apr 2022, 17:28 Glassed Silver, @.> wrote: Can you please post your log? — Reply to this email directly, view it on GitHub <#543 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7TZ2IWHC5UMHK4L46D4UTVFGDKHANCNFSM5TQJEWLQ . You are receiving this because you authored the thread.Message ID: @.>

Please try to obtain the literal log file, because sometimes the log viewer in the application itself can have a little bit of trouble loading up, especially when there are too many dangling web UI connections. (that's my theory at least as to why that happens)

AndreaPro commented 2 years ago

I have modified the original title because in the meantime I've noticed that nothing is downloaded at all, even if I don't select Audio Only, I was thinking that the issue was related to audio because some days ago I've downloaded a video and it worked fine, after this I've tried an Audio Only download and wasn't working but now I've discovered that I'm not able to download anything, these are the logs in debug mode:

2022-04-20T08:33:51.025Z INFO: Found new update for youtube-dl. Updating binary...
2022-04-20T08:33:51.578Z INFO: YoutubeDL-Material v4.2 started on PORT 17442
2022-04-20T08:33:51.686Z VERBOSE: Disabling checking downloads as none are available.
2022-04-20T08:52:38.229Z DEBUG: URL info retrieval delay: 11.486 seconds.

I've tried to run docker-compose down && docker-compose up-d but nothing changed

GlassedSilver commented 2 years ago

What does you Download Manager look like? (Feel free to redact video titles and such, but I'd love to see if the downloads are still enabled there or paused/errored.

AndreaPro commented 2 years ago

This is how it looks IMG_20220420_191834

GlassedSilver commented 2 years ago

Did you try updating the compose stack?

The docker compose up (including the detach argument -d) command does only start the instance and if the images aren't present downloads them.

It does not update the stack. To update the stack use docker compose pull.

Make sure you're on the latest build:

  1. Click on the three dots in the top right
  2. About
  3. Check that your version info reads:
    Installation type: docker
    Docker tag: nightly
    Commit hash: 0f4f529
    Build date: 2022-04-18 
AndreaPro commented 2 years ago

I wasn't in the latest nigthly, now I've pulled the latest version but still nothing changed, if I try stop and restart the downloads they stay like the previous picture and nothing is generated in the logs

GlassedSilver commented 2 years ago

I have some trouble getting YT to download myself, but sometimes stuff does go through. Until now I've always thought of it as being a rate limiting problem since I have a bunch of subscriptions being checked, but maybe I'm wrong.

I noticed Tzahi is working on this project again as well, so maybe he'll be a bit wiser in how to debug this behavior. Let's see.

Thank you for your report!

GlassedSilver commented 2 years ago

Can you maybe try a Twitch VOD? Cause those work pretty reliably for me, let's see if we can narrow this down to YT.

AndreaPro commented 2 years ago

I have tried a Twitch VOD but the result Is the sale, monitoring the download folder I am not able to spot even any temp file created

GlassedSilver commented 2 years ago

I recently added the musl our alpine base image uses in the build.

Can you update to the latest nightly and see if that helps things? Something with your environment may still mess with things like DNS resolution, e.g. you may get IPV6 resolved IPs when your container can only connect to IPV4 IPs, that's something that's been an issue for me recently more and more myself.

However, the fixed musl version may already do a lot for you.

AndreaPro commented 2 years ago

I've tried to update and destroy and recreate the container but nothing changed, I've tried to bash inside the container and ping some urls and the ping works, but the downloads don't

Tzahi12345 commented 2 years ago

Hi @AndreaPro, we did just move away from Alpine on Docker in hopes that DNS issues would get resolved, perhaps it fixed things on your end. Would you mind trying to download an audio file again and seeing if it works?

AndreaPro commented 2 years ago

I've updated again bit nothing changes, no audio or video Is downloaded from YouTube or other sites and the logs stay silent. I'll try to backup everything and start all from scratch to see if it works

On Mon, 2 May 2022, 07:52 Tzahi12345, @.***> wrote:

Hi @AndreaPro https://github.com/AndreaPro, we did just move away from Alpine on Docker in hopes that DNS issues would get resolved, perhaps it fixed things on your end. Would you mind trying to download an audio file again and seeing if it works?

— Reply to this email directly, view it on GitHub https://github.com/Tzahi12345/YoutubeDL-Material/issues/543#issuecomment-1114519757, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7TZ2N6OTYOPG2CPZPUZFDVH5UQ3ANCNFSM5TQJEWLQ . You are receiving this because you were mentioned.Message ID: @.***>

GlassedSilver commented 2 years ago

Possible interim fix is underway, think it's the older NodeJS version shipped with Ubuntu 20.04. I'm testing with 21.04 now as we wait for Nodesource to deliver binaries for 22.04 which we target.

I'll test on my instance first before pushing upstream, so feel free to wait a bit until I get back to you. :)

Thank you for your patience, it's very much appreciated!

GlassedSilver commented 2 years ago

What‘s really odd is that you don‘t get ANY log at all.

That really just irks me. Can you rule out permission errors for all mapped volumes?

If you don’t mind, you can share your docker-compose.yml and maybe we can go from there.

I‘ll likely be able to push the Ubuntu 21.10 upgraded docker build in 2h or so if my instance tested as okay. Until then you can (but don‘t need to) try pointing your YTDL-M image towards my testing repo, don‘t use it long-term though, the builds there are for my personal debugging purposes, absolutely do expect builds at a later date to break things!

Now that the mean warning is out of the way:

glassedsilver/youtubedl-material:testing

Again, only for testing as if the build works okay, get away from that image as soon as we have a new build in tzahi12345/youtubedl-material:nightly :)

GlassedSilver commented 2 years ago

Update, Ubuntu 21.10 still caused issues to me, however my instance was in fact downloading.

I have a sneaky suspicion this may be a permissions error for you, I see some funky permission errors on my end as well, although my setup using Ubuntu 21.10 does download, YTDL-M just doesn't see the files. My estimation is that YTDL-M runs as user and the downloader or ytdl binary used run as root.

Can you in the meantime provide your docker-compose.yml?

Even if your and my issue are separate, I promise you we're investigating this as thoroughly as possible. :)

Update 2:

I'm 99% certain I spotted the issue. I will now make double sure that everything checks out on my end. Next push to my testing repo possibly include the fix, but I'll warn you, it's rolling changes all over there. Better wait for a commit to THIS repo, and also I don't want to make false promises by telling you to use my testing repo build. (if however you want to go ahead anyway and test not-in-production then go at it)

Thank you so much for the issue and sorry that it took so long to pinpoint. Permission errors can be nasty.

GlassedSilver commented 2 years ago

Probably fixed now, if not, please don't hesitate to comment!

AndreaPro commented 2 years ago

I've tried updating but the outcome is the same.

This is my compose file:

version: "2"
services:
  youtube-dl-material:
    image: tzahi12345/youtubedl-material:nightly
    container_name: youtube-dl-material
    environment:
      - UID=$PUID
      - GID=$PGID
      - TZ=$TZ
      - ALLOW_CONFIG_MUTATIONS= true
    volumes:
      - $LOCAL_CONFIG/appdata:/app/appdata
      - $SHARES/Media/YoutubeDL/subscriptions:/app/subscriptions
      - $SHARES/Media/YoutubeDL/users:/app/users
    restart: unless-stopped
networks:
  default:
    external:
      name: $REVERSE_PROXY_NET

The variables $SHARES and $LOCAL_CONFIG never changed in the last year, only recent change was changing image tag from :latest, but it worked from some days and then it stopped downloading anything

GlassedSilver commented 2 years ago

You're missing some volume mappings there.

Not sure if that breaks it, could be latest didn't care about this, but nightly might.

Make sure to also map these volumes:

/app/audio/ for normal one-off downloads of audio-only content /app/video/ for normal one-off downloads of video content

Further things you may or may not wish to configure: env variables: ytdl_allow_advanced_download = true write_ytdl_config = true ytdl_use_local_db = true (at least whilst you still use the local single-file db, feel free to mongodb whenever you feel like it, much recommended btw once you got it back online :) )

AndreaPro commented 2 years ago

I've adjusted the compose file in this way:

version: "2"
services:
  youtube-dl-material:
    image: tzahi12345/youtubedl-material:nightly
    container_name: youtube-dl-material
    environment:
      - UID=$PUID
      - GID=$PGID
      - TZ=$TZ
      - ALLOW_CONFIG_MUTATIONS= true
    volumes:
      - $LOCAL_CONFIG/appdata:/app/appdata
      - $SHARES/Media/YoutubeDL/subscriptions:/app/subscriptions
      - $SHARES/Media/YoutubeDL/users:/app/users
      - $SHARES/Media/YoutubeDL/audio:/app/audio
      - $SHARES/Media/YoutubeDL/video:/app/video
    restart: unless-stopped
networks:
  default:
    external:
      name: $REVERSE_PROXY_NET

but nothing changed.

I've tried adding the following variables:

      - ytdl_allow_advanced_download=true
      - write_ytdl_config=true
      - ytdl_use_local_db=true

but still nothing downloaded

GlassedSilver commented 2 years ago

Well the docker-compose.yml file looks good so far then.

Try downloading the current nightly build, we have definitely done some stuff with permissions again.

It might be you're still getting this or other issues, we're currently in the phase of catching all most important show-stopper bugs for a soon to come (hopefully) 4.3 release. :)

Sorry that it's a rocky ride right now, but 4.3 was bound to be a release with so many changes that before being prime for release it needs a lot of care. 4.2 release channel is too ancient at this point, so we're very appreciative of everyone helping to catch the bugs, so we can soon deliver the best YTDL-M experience yet! 👍

GlassedSilver commented 2 years ago

Also, make sure when you try on the most recent nightly build to check if the logs may just not show up in the Web UI when they might still successfully log to the log file itself.

You can find the log file in the /app/appdata (host path in your case: $LOCAL_CONFIG/appdata) volume in the subdirectory logs. 👍 (hopefully)

Tzahi12345 commented 2 years ago

Sorry you've been having problems downloading @AndreaPro! I think we need more details such as the logs file as well as logs from the container to properly investigate this. One thing that would also help is setting the log level to verbose, it includes more info.

Worst case scenario your db.json and users.json DB files should be backed up in appdata, you just need to revert back to the 4.2 tag and rename them for your instance to be back up and running again.

AndreaPro commented 2 years ago

Tried now but still nothing, the logs in the folder and on the web ui give the same (few) infos. I've tried duplicating the folder where everything was stored and I've started from scratch and with the same version the download works, I will recreate the previous settings and see if the problem occurs again

Il giorno gio 5 mag 2022 alle ore 19:55 Glassed Silver < @.***> ha scritto:

Also, make sure when you try on the most recent nightly build to check if the logs may just not show up in the Web UI when they might still successfully log to the log file itself.

You can find the log file in the /app/appdata (host path in your case: $LOCAL_CONFIG/appdata) volume in the subdirectory logs. 👍 (hopefully)

— Reply to this email directly, view it on GitHub https://github.com/Tzahi12345/YoutubeDL-Material/issues/543#issuecomment-1118882807, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7TZ2LUYKWBDBOOEPFKFYLVIQDPNANCNFSM5TQJEWLQ . You are receiving this because you were mentioned.Message ID: @.***>