perkeep / gphotos-cdp

This program uses the Chrome DevTools Protocol to drive a Chrome session that downloads your photos stored in Google Photos.
Apache License 2.0
658 stars 36 forks source link

deleting the most recent item on the server causes hang #17

Closed taki-fugu closed 4 years ago

taki-fugu commented 4 years ago

Following a successful sync, if the most recent item (the one in .lastdone) is deleted from Google Photos, the next sync hangs indefinitely.

Uploading more items (=creating a new most recent item in the feed) won't fix the problem. Only restoring the deleted item from the trash enables successful completion.

Removing .lastdone triggers full sync.

mpl commented 4 years ago

yeah, I didn't think of it, but that is unsurprising, thanks. It should not be very hard to fix. I think on startup we could check if the .lastdone item still exists, and if not, just reset .lastdone. I'll look into it.

mpl commented 4 years ago

hmm gphotos-cdp is being denied access to my google account now, so I gotta work on that first, before I can fix this issue here.

mpl commented 4 years ago

ok, I found a way to deal with that. I'll have a fix soon, sorry about the delay.

mpl commented 4 years ago

@taki-fugu the fix in https://github.com/perkeep/gphotos-cdp/pull/22 is ready for review. Can you please try it and let me know if that works for you?

taki-fugu commented 4 years ago

I won't be able to try it for a couple of weeks, but it's great that you've found a solution. I think it might be useful to combat another issue I've encountered recently - the program gets stuck on a random file, constantly retrying after getting "took too long to start". Deleting this random file wouldn't help, but the new version might be able to skip over and continue.