Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playlist download operation does not gracefully crash when certain songs present #169

Open
ardunn opened this issue Mar 22, 2022 · 7 comments
Labels
action or close bug Something isn't working good first issue Good for newcomers question Further information is requested

Comments

@ardunn
Copy link

ardunn commented Mar 22, 2022

An Apple Music playlist (~99 songs) I was trying to download kept crashing with the following error:

[•] Collating...
  [•] Inquiring tracks...(failed: [Cannot read properties of undefined (reading '0')]) 
 [i] An error occurred while processing the query (Failed to collect playlist tracks)

After a lot of trial and error, I narrowed the problem down to a single track: "Watch - Nosaj Thing": https://music.apple.com/us/album/watch/1608121372?i=1608121589

Removing this single track from the playlist allowed the entire playlist to download successfully.

@miraclx
Copy link
Owner

miraclx commented Mar 22, 2022

After a lot of trial and error, I narrowed the problem down to a single track: "Watch - Nosaj Thing": music.apple.com/us/album/watch/1608121372?i=1608121589

Removing this single track from the playlist allowed the entire playlist to download successfully.

Hi, so does downloading the track individually work?

$ freyr https://music.apple.com/us/album/watch/1608121372?i=1608121589

@ardunn
Copy link
Author

ardunn commented Mar 23, 2022

as an update to this, I am not actually sure what the problem is. It seems like it is actually not due to this particular track. Downloading the track works individually. It seems like the problem might have been with a track that was removed/de-licensed from apple music, which still causes problems in the playlist even after removing it. This problem seems to still happen even when duplicating the playlist.

Is there some sort of try/catch exceptions logic we could integrate into Freyr to deal with this "undefined" problem?

@miraclx
Copy link
Owner

miraclx commented Mar 24, 2022

If this playlist is public, then send a link, if I can reproduce this, I can investigate this behavior and narrow it down when I get the time.

@ardunn
Copy link
Author

ardunn commented Mar 24, 2022

Sure, try apple_music:playlist:pl.u-2aoqq2YCGq6Vvk

The playlist is public

Here is the output:

Checking directory permissions...[done] 
[apple_music:playlist:pl.u-2aoqq2YCGq6Vvk]
 [•] Identifying service...[Apple Music]
 [•] Checking authentication...[authenticated]
 Detected [playlist]
 Obtaining playlist metadata...[done] 
  ➤ Playlist Name: all favorites 2
  ➤ By: ardunn
  ➤ Type: User,Shared
  ➤ Tracks: 98
 [•] Collating...
  [•] Inquiring tracks...(failed: [Cannot read properties of undefined (reading '0')]) 
 [i] An error occurred while processing the query (Failed to collect playlist tracks)
============ Stats ============
 [•] Runtime: [6.4s]
 [•] Total queries: [01]
 [•] Total tracks: [00]
     » Skipped: [00]
     ✓ Passed:  [00]
     ✕ Failed:  [00]
 [•] Output directory: [.]
 [•] Cover Art: cover.png (640x640)
 [•] Total Output size: 0.00 B
 [•] Total Network Usage: 0.00 B
     ♫ Media: 0.00 B
     ➤ Album Art: 0.00 B
 [•] Output bitrate: 320k
===============================

@ardunn
Copy link
Author

ardunn commented Apr 3, 2022

@miraclx if you could point me towards how best to start debugging, I can try finding the bug myself! BTW the playlist is public, see the above comment, so this issue should be reproducible

@miraclx
Copy link
Owner

miraclx commented Apr 10, 2022

Hi @ardunn, apologies for the delayed response. I am taking a look now.

Here's the source script for dealing specifically with Apple Music – https://github.com/miraclx/freyr-js/blob/master/src/services/apple_music.js

@miraclx miraclx added bug Something isn't working good first issue Good for newcomers labels Apr 11, 2023
@miraclx
Copy link
Owner

miraclx commented Aug 19, 2023

@ardunn, freyr v0.10.1 has been released. Can you confirm if you still have this issue?

I just tried and it seems like the playlist may no longer exist?

@miraclx miraclx added question Further information is requested action or close labels Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action or close bug Something isn't working good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants