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

Error retrieving an Apple Music playlist #657

Open
JustTooKrul opened this issue Feb 29, 2024 · 7 comments
Open

Error retrieving an Apple Music playlist #657

JustTooKrul opened this issue Feb 29, 2024 · 7 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@JustTooKrul
Copy link

I was using freyr in conjunction with an Apple Music account and made one playlist with my entire library on it. This playlist consists of 1,077 items (the "Tracks" number reported). However, at the "Inquiring tracks" step the program gives an error:

[•] Inquiring tracks...(failed: [expecting an array or an iterable object but got [object Null]])
[i] An error occurred while processing the query (Failed to collect playlist tracks)

On the off chance that this was based on the time to retrieve data from Apple Music, I ran it again with the timeout set to 100,000ms (vs. the default of 10,000), but the same error occurred.

@miraclx
Copy link
Owner

miraclx commented Mar 1, 2024

Hi there, can you try a smaller playlist? Create one much like yours with a smaller set of songs, and see that.

It could be that the playlist is private so freyr cannot access it, unsure.

What's the total runtime?

@JustTooKrul
Copy link
Author

Very odd, but I literally just retried it a number of times and eventually (I would say on the 10th try or so, and with the extra long time out) it just "worked" ... However, it stopped partway through with a message "Program was killed." ... But, I re-tried it a number of times again and eventually it worked again and skipped what was already there and completed.

I kept retrying because it was a new list, so I thought maybe it wouldn't be accessible yet and might take some time to propagate, but then it wouldn't have stopped working after it worked that first time.

I had also downloaded 3-4 other lists, and it worked for those (largest was ~600 or so tracks).

@miraclx
Copy link
Owner

miraclx commented Mar 4, 2024

Interesting, there's a chance the kernel is killing the process for excessive memory use

Can you highlight which platform you're running this on, and the resources available

Perhaps we can track how much memory was in use before the process dies

@JustTooKrul
Copy link
Author

It's a VM, through proxmox, that I have setup to use 4 CPUs and 32GB of memory with a 100GB disk... Hard to know how much this was taking up, since I have a few things running on it (this machine runs Docker, and has a number of images spun up). What else would be helpful to know or what outputs can I run to show you what you need?

@miraclx
Copy link
Owner

miraclx commented Mar 5, 2024

Can you time the runtime with verbose logs?

There's different variants of the time command so it's tricky to say which command you should use

But if which time says it's a shell built in, you need to install the binary

Thereafter, test it with either -v, -l or -p

What were gunning for here is a multiline report of multiple data points including memory (resident set size)

@JustTooKrul
Copy link
Author

JustTooKrul commented Mar 5, 2024

So, funny story, it worked when I ran it....

Here is the output (including the summary from freyr):

============ Stats ============
 [•] Runtime: [53m 25.3s]
 [•] Total queries: [01]
 [•] Total tracks: [1046]
     » Skipped: [00]
     ✓ Passed:  [1044]
     ✕ Failed:  [02]
 [•] Output directory: [.]
 [•] Total Output size: 9.83 GB
 [•] Total Network Usage: 4.11 GB
     ♫ Media: 4.00 GB
     ➤ Album Art: 118.91 MB
 [•] Output bitrate: 320k
===============================
        Command being timed: "freyr --timeout 100000 https://music.apple.com/us/playlist/[xxx]"
        User time (seconds): 8345.58
        System time (seconds): 760.41
        Percent of CPU this job got: 283%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 53:30.42
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 28337520
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 786490
        Minor (reclaiming a frame) page faults: 70238115
        Voluntary context switches: 2778902
        Involuntary context switches: 33457041
        Swaps: 0
        File system inputs: 149081320
        File system outputs: 46366520
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

I then tried it again, and it failed....

➤ Tracks: 1077
 [•] Collating...
  [•] Inquiring tracks...(failed: [expecting an array or an iterable object but got [object Null]])
 [i] An error occurred while processing the query (Failed to collect playlist tracks)
============ Stats ============
 [•] Runtime: [23.4s]
 [•] Total queries: [01]
 [•] Total tracks: [00]
     » Skipped: [00]
     ✓ Passed:  [00]
     ✕ Failed:  [00]
 [•] Output directory: [.]
 [•] Total Output size: 0.00 B
 [•] Total Network Usage: 0.00 B
     ♫ Media: 0.00 B
     ➤ Album Art: 0.00 B
 [•] Output bitrate: 320k
===============================
        Command being timed: "freyr --timeout 100000 https://music.apple.com/us/playlist/[xxx]"
        User time (seconds): 1.63
        System time (seconds): 0.19
        Percent of CPU this job got: 7%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:24.52
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 128952
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 408
        Minor (reclaiming a frame) page faults: 34364
        Voluntary context switches: 4426
        Involuntary context switches: 3820
        Swaps: 0
        File system inputs: 73688
        File system outputs: 8
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

@miraclx miraclx added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Mar 12, 2024
@miraclx
Copy link
Owner

miraclx commented Mar 12, 2024

Thanks for the logs, will investigate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants