simon-weber / Autoplaylists-for-Google-Music

Adds autoplaylists, aka iTunes "smart playlists", to Google Music.
https://autoplaylists.simon.codes
MIT License
94 stars 18 forks source link

Won't Sync #189

Closed EricPZ1 closed 5 years ago

EricPZ1 commented 6 years ago

I've been trying to sync my lists for days both auto and manually. I've tried to save each playlist and to do them all. Still won't update.

image

simon-weber commented 6 years ago

Are you able to create new autoplaylists and have them show up on Google's end? If not, my guess is that you're affected by the problem described here, and can hopefully get back to normal by going through the reauthorization prompt.

If you are able to create new autoplaylists - or if you're noticing playlists syncing partially - then my guess would be your account got overloaded. If that's the case, you should be able to fix it by disabling periodic syncs and waiting a day or two before trying again.

EricPZ1 commented 6 years ago

I was able to create a new autoplaylist...it hasn't synced.

I signed out of google, closed the browser. Re-opened, signed back into google and tried. No joy.

I've disabled periodic syncs and I'll wait and see what happens.

image

simon-weber commented 6 years ago

If the playlist wasn't created at all on Google's end then my fix is probably busted! Can you send over your logs? Once I've got those, I think we should be able to manually refresh your auth token so you don't need to wait on my potential fix-of-the-fix.

EricPZ1 commented 6 years ago

Hope you can ready the file...didn't save in any type of format...so I just saved in txt. extensionfiles.txt

simon-weber commented 6 years ago

Perfect. I don't see any signs of auth issues; it looks like you're just overloaded.

Do you remember going through the OAuth prompt very recently? It looks something like this: image

My best guess would be that you were affected, then the sudden burst of syncing when it was fixed is what's got you into the current state. I'd expect it to be fixed in within a few days.

Wyleray commented 6 years ago

Mine won't sync. Has only ever synced within the first hour of my purchasing the product. I am occasionally notified of an overload but I don't know what would have initially caused this. Is it going to randomly overload and take days to get back to normal all of the time? I get the the message "The last sync failed, likely due to problems on Google's end." It has been two days since it synced last.

Jimmyt3477 commented 6 years ago

It appears I'm having the same issue as EricPZ1. Mine won't sync at all. I've not been able to get to the authorization prompt either.

Wyleray commented 6 years ago

I'm not getting the auth prompt either*

simon-weber commented 6 years ago

Ah hah, I was looking in the wrong place this whole time. Error rates are still pretty steady when looking at Google's responses, but I think I broke the handling of them in 5.10.0. Compounding this, the errors weren't going to Sentry for some reason (I just found the traceback in logs someone emailed to me). Anywho, I think they're causing the syncing queue to be blocked after seeing a 500 from Google, which are relatively common even when things are working well. I'll fix that now and push it out.

You should be able to check whether this is true by reloading. If I'm right, you should see at least something change on Google's end (even if it's not a full sync, and even if syncing stops immediately afterwards again).

Wyleray commented 6 years ago

Reloading hasn't been doing anything for me :/

simon-weber commented 6 years ago

Hm. Can you email me your logs after reloading? I'll take a look once I'm done pushing out this change.

Wyleray commented 6 years ago

I sent them to you.

simon-weber commented 6 years ago

Great; thanks! 5.10.3 is going out now. It takes a little bit to get through Chrome's pipes; you can usually speed up the update by going to chrome://extensions, turning on developer mode, and hitting update every few minutes until you pull it in.

simon-weber commented 6 years ago

Alright, from what I can tell 5.10.3 has gotten things mostly back to normal :tada: @Jimmyt3477 and @EricPZ1, let me know how it goes for you.

There's one thing you may need to manually clean up: because of https://github.com/simon-weber/Autoplaylists-for-Google-Music/issues/160, there might be autoplaylists without a matching playlist on Google's end. You should be able to fix these by recreating the autoplaylist (ie, using "duplicate", giving it a new name, then hitting "save") then deleting the old copy.

Autoplaylists that exist on Google's end but with out-of-date contents should fix themselves after a little while.

I'm really sorry about the disruption! I'll look into what went wrong with my error reporting that kept me from catching this sooner (normally I get an email the first time something new crashes).

EricPZ1 commented 6 years ago

@simon-weber

I tried syncing my main playlist. According to the header on Google Play, it sez it synced. However, the playlist counts are different (621 in GooglePlay vs 750 AutoPlayList). I attempted the 'sync everything' and got a message it'll try again in 30 mins cuz it's overloaded.

I'll keep an eye on it through the day.

EricPZ1 commented 6 years ago

@simon-weber

I've been watching (while playing tunes) all day. If I manually open & save a specific list, it appears to sync as I want.

However, the autosync function...

image

Is there some kinda cache I can clear

simon-weber commented 6 years ago

Reloading would clear the backoff state, though it'd probably add more load to Google.

You could also try turning up your sync period (or setting it to 0 and using occasional manual syncs for now).

EricPZ1 commented 6 years ago

I upped it from 15 to 60. I'll play with it. Thanks.

Wyleray commented 6 years ago

It's happening again and I'm pretty sad about it.

simon-weber commented 6 years ago

That's no good, especially since I'm traveling starting tomorrow morning.

To clarify: are you unable to sync at all, including creating new autoplaylists? Or is it periodic syncing in particular that's not working?

Wyleray commented 6 years ago

It won't sync either way.

johnrobertlawson commented 6 years ago

Mine won't sync on any computer. It's been like this for around a week.

simon-weber commented 6 years ago

Oof, ok. Sentry isn't showing me anything obviously wrong; most of the sync failures are just a generic serverside error code. The only thing that the affected users seem to have in common is that they're subscription users.

Looking at the api console graph, it does look like something changed on Google's end on June 27th (since I didn't release any changes around then). You can see things improve after the recent changes, and then get worse again yesterday:

image

Anyone who's affected, save your logs as a file and email them to me at simon@simonmweber.com. I'm away at a friend's wedding through Monday, but I'll find time to look into them.

simon-weber commented 5 years ago

Thanks for the logs! I've found two patterns so far:

  1. people who aren't able to sync at all are getting serverside errors (500s) for every request (https://github.com/simon-weber/Autoplaylists-for-Google-Music/issues/192)
  2. people who can only partially sync are getting serverside successes (200s), but TOO_MANY_ITEMS errors in the detailed response codes (https://github.com/simon-weber/Autoplaylists-for-Google-Music/issues/193)

I've created a new issue for each of these so I can consolidate everything. Subscribe to one of those if you'd like to keep getting updates.