gmusic-playlist.js icon indicating copy to clipboard operation
gmusic-playlist.js copied to clipboard

Unable to Import

Open aaronwitt27 opened this issue 8 years ago • 8 comments

        XMLHttpRequest.prototype.send = function(a,b) {
            if (!a) a ='';
            if (!b) b ='';
            tap._origSend.apply(this, arguments); // <-- 500 response
            if(tap.method.toLowerCase() == 'post') tap.data = a;
            if (tap.sendcallback) {
                tap.sendcallback(this);
            }
            if (tap.loadcallback) {
                this.addEventListener("load",tap.loadcallback,false);
            }
        };

i'm a backend, not a frontend dev, so feel free to help me debug this better. i used chrome dev tools and looked at the Console, Sources, and Network tabs to gather info about what's happening when i try to import.

used to import old grooveshark playlists all the time, still have about twenty more to go. went to import one of them today, and it didn't work, but didn't say why. when i say it didn't work, it attempts to import, shows 0/n completed, and then spits out a file containing the failed imports with a bunch of nulls.

network tabs shows his html response to that call:

<HTML>
<HEAD>
<TITLE>Internal Server Error</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Internal Server Error</H1>
<H2>Error 500</H2>
</BODY>
</HTML>

not an auth error like others had reported a lil while back. is this an api change from google that needs a code update here?

aaronwitt27 avatar Jan 25 '17 18:01 aaronwitt27

I've seen 500 errors before when google gets overloaded. It may be worth waiting a little bit and try again. Another thing to try is seeing if you can import the example playlist file.

There may be something going on with google's servers because when I imported the example playlist file it only imported about half of the songs where I'm sure it used to import all of them.

soulfx avatar Jan 26 '17 00:01 soulfx

Even example.csv won't import - 0/24 from that playlist get found :(

aaronwitt27 avatar Jan 27 '17 15:01 aaronwitt27

Do you know if something has changed on your account?

Has your subscription expired? In the past I've gotten odd behavior from google when my credit card that the subscription was setup with expired. The fact that the card had expired was not obvious from the errors I was getting.

soulfx avatar Jan 28 '17 02:01 soulfx

no, nothing's changed on my account. i still use it actively, and since it's a family account, my wife uses it as well. when i try to import, it'll create empty playlists with the correct names, so some of the google music api is working, and auth is evidently not an issue here. it's making me think something changed with the search api perhaps.

aaronwitt27 avatar Feb 01 '17 15:02 aaronwitt27

I am also having the same issue The Chrome console shows a "500" error when it sends the POST The playlist is created, but no songs are added

krind24 avatar Feb 03 '17 02:02 krind24

it'll create empty playlists with the correct names Chrome console shows a "500" error when it sends the POST

I'm experiencing the same issue:

  • POSTing to services/createplaylist results in a 200 response.
  • POSTing to services/addtrackstoplaylist results in a 500 error.

I did a little digging into the Python gmusicapi repo repo, and found it is POSTing to https://play.google.com/music/services/addtoplaylist which is different from what's being used here.

Thinking this could potentially be the source of the issue, I changed my local script to POST to services/addtoplaylist instead of services/addtrackstoplaylist. Unfortunately, this resulted in a 404 error instead of a 500 error.

So it seems like the services/addtrackstoplaylistis the correct URL to POST to. This leads me to believe something isn't right with the payload.

brianfryer avatar Feb 25 '17 18:02 brianfryer

i wonder if its not getting the ids for the songs right. since it seems to work for songs in the library, im suspecting something may have changed in googles search responses.

soulfx avatar Feb 27 '17 01:02 soulfx

got it working again. it should be good to go until the next time google changes their response and request formats.

0271ef7

soulfx avatar Mar 02 '17 03:03 soulfx