La0 / garmin-uploader

Garmin Connect Python Uploader
GNU General Public License v2.0
124 stars 30 forks source link

Use Cloudscraper, change login path, and retry user authentication #37

Closed SirIndubitable closed 6 months ago

SirIndubitable commented 2 years ago

This commit fixes authentication for July 2022, the login path had changed, and cloudscraper was still needed.

I also noticed that authentication was still intermittent, so I added a few retries, and returning the cached session so that tests don't try a lot of sign-in requests

SirIndubitable commented 2 years ago

Note that in my fork, all builds are passing, so they should pass once the build gate is approved. https://github.com/SirIndubitable/garmin-uploader/actions/runs/2725767818

oldnapalm commented 2 years ago

Thanks, this is working for me. It warns "upload failure" but the upload actually works.

oldnapalm commented 2 years ago

It warns "upload failure" but the upload actually works.

It's because I get 202 response status code, which used to mean activity already exists, but it's actually a new activity. Also detailedImportResult has empty successes (and no internalId).

I'm using this to upload without error messages (although it's not possible to set activity name and type due to missing ID) https://github.com/oldnapalm/garmin-uploader/commit/8344c0e77a91497c8a1a04ede4c87db68146f29a

SirIndubitable commented 2 years ago

@oldnapalm I'm just focusing on getting authentication fixed in this PR. If and when this gets merged in, I'd gladly look into other issues.

oldnapalm commented 2 years ago

@oldnapalm I'm just focusing on getting authentication fixed in this PR. If and when this gets merged in, I'd gladly look into other issues.

No worries, just sharing my findings.

SirIndubitable commented 2 years ago

@La0 any chance you'll get to look at this sometime soon?

La0 commented 2 years ago

Yes, I need to fix CI first...

SirIndubitable commented 2 years ago

At least on my fork, this PR fixes the CI

app4g commented 1 year ago

I tried this branch.. still facing auth issues.. python 3.9 OSX ventura