-
Notifications
You must be signed in to change notification settings - Fork 2
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
"Bad gateway" on export #5
Comments
Thanks! Could you try again? For me it’s working perfectly, without any issues. The only thing that might go wrong is that you could hit the rate limitting, in which case you could try your own application ID. |
Just tried again, same thing. I'll try again tomorrow morning. Some thing now, 11 hours laters (different network). In the Chrome network tab, I can see that these are the failing pages: https://api.spotify.com/v1/me/tracks?offset=1800&limit=50 Request URL: https://api.spotify.com/v1/me/tracks?offset=1800&limit=50 access-control-allow-credentials: true |
All other playlists are working fine by the way, including some with 400 entries. Just "Starred" does not like me. |
Thank you very much for investigating this further! So the “Saved” (?) list only fails after 1800 entries. How many entries does it have in total? By the way, “watsonbox/exportify” not showing this behavior is just because it doesn’t even have the “Saved” export, right? If the problem was rate limiting, the response should indicate this, which doesn’t seem to be the case. Not sure if there’s anything we can do here – except perhaps trying the same (individual HTTP) request again. |
It doesn't show a number. "Liked songs" in Spotify has around 120 pages of ~10 songs, so not more than 1800.
That hypothesis is compatible with what I observe, yes :)
Alright - it's not to big a deal for now, I was just about to have music moved between Spotify accounts and wanted to backup before - but it'll probably work out anyway. |
Do you use one of Spotify’s mobile apps as well? The exact number of liked songs should be visible there. Further, as the request URL you reported is
Which is a good idea. Using Spotify’s desktop app, you should be able to move your liked songs to a playlist, perhaps even divided into multiple lists. That could help as well. |
Yes: it shows 966 liked songs.
Which appears wrong with only 966 songs. Maybe that is the problem - the lower request all seem to work, but somehow exportify seems to estimate an incorrect number of total likes songs:
I did that, too - that creates a new playlist that Exportify sees as having 1002 songs, and is able to download it. Great! So my problem is solved, but I'm happy to help out if you want to investigate further. |
Thanks, that is really helpful and makes perfect sense. Spotify might have changed the behavior if you exceed the number of available songs in “Saved”. The limit here is not even guessed by the application, instead it’s hardcoded at 2,500. You can, however, adjust that limit by opening your browser’s developer tools, going to the JavaScript console, and executing window.localStorage.setItem("librarySize", 1002); or whatever may be the current size of your library. Does it work after that? |
Yes! (Be sure to reload the page after setting this.) |
Very happy to hear that it works, and thanks for testing this! Right now, this is the only workaround already implemented. One alternative would be to show a prompt for all users at the beginning asking for their library size, so that you wouldn’t have to set the value in A much better solution would be if we could just assume 10,000 entries for everyone’s library and then inspect the API responses to detect the last valid request and stop before we’re getting any errors because we’ve exceeded the library limit. |
I wanted to used this fork for Export all (watsonbox#56) and starred (watsonbox#37), but it returns "Bad gateway" upon clicking any Export or Export All button, while watsonbox/exportify works fine (well, except these two issues above).
The text was updated successfully, but these errors were encountered: