th-ch / youtube-music

YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)
https://th-ch.github.io/youtube-music/
MIT License
8.95k stars 507 forks source link

[Bug]: Download Error (Every Song/Video) #1308

Closed Mendungo closed 1 year ago

Mendungo commented 1 year ago

Preflight Checklist

YouTube Music (Application) Version

2.0.4

What operating system are you using?

Windows

Operating System Version

Windows 11

What arch are you using?

x64

Last Known Working YouTube Music (Application) version

No response

Expected Behavior

Download song to specific foler

Actual Behavior

Error message pops up saying "video not found" with every song

Additional Information

No response

JellyBrick commented 1 year ago

It works well for me. Do you have a reproduction process? (What video, what playlist, etc)

da-anda commented 1 year ago

downloading seems to be hit and miss for me. Like downloading a playlist (like the "thumbs up" playlist) doesn't really do anything. I have turned on "skip existing", but there is not even a folder for the playlist in the download directory, so no idea why it would skip anything.

Side note, not related to the general download errors but also a download related issue: When I change the download preset to opus, the result is not opus, but the raw AAC (audio/mp4; codecs="mp4a.40.2") stream with a .opus file extension and no metadata at all. I would have expected to get the unaltered opus stream in the highest available quality. Alternatively a AAC/mp4 preset to get the unaltered highest quality available might make sense.

edit: after a "force reload" I now also get the "video not found error on anything I click

JellyBrick commented 1 year ago

downloading seems to be hit and miss for me. Like downloading a playlist (like the "thumbs up" playlist) doesn't really do anything. I have turned on "skip existing", but there is not even a folder for the playlist in the download directory, so no idea why it would skip anything.

Side note, not related to the general download errors but also a download related issue: When I change the download preset to opus, the result is not opus, but the raw AAC (audio/mp4; codecs="mp4a.40.2") stream with a .opus file extension and no metadata at all. I would have expected to get the unaltered opus stream in the highest available quality. Alternatively a AAC/mp4 preset to get the unaltered highest quality available might make sense.

edit: after a "force reload" I now also get the "video not found error on anything I click

Mendungo commented 1 year ago

It works well for me. Do you have a reproduction process? (What video, what playlist, etc)

It doesn't for me, it was working perfectly previously. None of my playlists or songs, not even any individual song, once I click download this is what pops up

Screenshot 2023-10-12 152212

Had to downgrade to 2.0.3, and downloading works fine but now when i try to download a full playlist in bulk it downloads only the one song in playback.

meequrox commented 1 year ago

Same for me on 2.0.4:

I added some console.log() to back.ts.

To downloadSong() definition:

console.log("downloadSong(%s, %s, %s, _)", url, playlistFolder, trackId);

To downloadSongUnsafe definition:

  console.log("downloadSongUnsafe(%d, %s, _, %s, %s, _)", isId, idOrUrl, playlistFolder, trackId); // <---

  sendFeedback('Downloading...', 2);

  console.log("Start resolving id"); // <---

  let id: string | null;
  if (isId) {
    id = idOrUrl;
    console.log("id = %s", id); // <---
  } else {
    id = getVideoId(idOrUrl);
    console.log("id = %s", id); // <---
    if (typeof id !== 'string') throw new Error('Video not found');
  }

  console.log("Id resolved"); // <---

  let info: TrackInfo | VideoInfo = await yt.music.getInfo(id);

Output in the situation shown in the screenshot above:

downloadSong(https://music.youtube.com/search?q=new+episode, undefined, undefined, _)
downloadSongUnsafe(0, https://music.youtube.com/search?q=new+episode, _, undefined, undefined, _)
Start resolving id
id = null
Error: Video not found

Downloading in older versions also does not work.

JellyBrick commented 1 year ago

image

Thank you for the detailed bug report! @meequrox @Mendungo @da-anda An invalid query selector (tabindex="0") caused this issue.

It should be fixed in bf9e3b5. I'll release a hotfix soon!

JellyBrick commented 1 year ago

@Mendungo

Side note, not related to the general download errors but also a download related issue: When I change the download preset to opus, the result is not opus, but the raw AAC (audio/mp4; codecs="mp4a.40.2") stream with a .opus file extension and no metadata at all. I would have expected to get the unaltered opus stream in the highest available quality. Alternatively a AAC/mp4 preset to get the unaltered highest quality available might make sense.

It should fixed in #1310

Zahav88 commented 10 months ago

I have this issue for quite long time, its possible to download only few songs, rest fails yesterday installed 3.2.1 and all worked again. Today, oh look another new version... bam again does not work!

JellyBrick commented 10 months ago

@Zahav88 Please provide the reproduction steps

Zahav88 commented 10 months ago

Capture Capture-2

Not sure if it helps,

Arusu12 commented 3 months ago

image I am having this error. Using for the first time