mholt / timeliner

All your digital life on a single timeline, stored locally -- DEPRECATED, SEE TIMELINIZE (link below)
https://timelinize.com
GNU Affero General Public License v3.0
3.56k stars 116 forks source link

Bad API response from Google Photos #64

Closed heliostatic closed 3 years ago

heliostatic commented 3 years ago

On a timeliner get-all google_photos/account@google I get

pip install gphotos-sync
 2020/10/15 15:58:17 [ERROR][google_photos/ACCOUNT@gmail.com] Bad API response: HTTP 400: 400 Bad Request: >>> {
  "error": {
    "code": 400,
    "message": "When using a page token, you must use the same parameters as the previous request.",
    "status": "INVALID_ARGUMENT"
  }
}
 <<< - retrying... (attempt 1/10)

I've tried:

Both with no better effect (reauth works, but doesn't fix the issue)

mholt commented 3 years ago

Weird, haven't seen this before. Do you know what the previous request was compared to the one that breaks?

heliostatic commented 3 years ago

Not really? I run this in a nightly cronjob, with get-all and it was running up until May 2020. It's been failing since then, but I've only now gotten around to trying to debug.

I did get one other error in this last run:

<<< - retrying... (attempt 10/10)
2020/10/15 16:02:12 [ERROR][google_photos/heliostatic@gmail.com] A listing goroutine errored: getting items on next page: requesting next page: HTTP 400: 400 Bad Request: >>> {
  "error": {
    "code": 400,
    "message": "When using a page token, you must use the same parameters as the previous request.",
    "status": "INVALID_ARGUMENT"
  }
}
heliostatic commented 3 years ago

I created a new repo and ran get-all and it is working, so I'm guessing the issue is in the restore code/my index.db file -- going to try NULLing the last_item_id and see if I can force a restart 🤷

mholt commented 3 years ago

I think this happens when the previous command used was get-latest, but didn't finish; in any case, I think -- hope -- this is fixed in https://github.com/mholt/timeliner/commit/a8c45a803def7e68805f2d205232e9026bf9003e.