garmin-uploader icon indicating copy to clipboard operation
garmin-uploader copied to clipboard

Use Cloudscraper, change login path, and retry user authentication

Open SirIndubitable opened this issue 3 years ago • 9 comments

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 avatar Jul 24 '22 02:07 SirIndubitable

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

SirIndubitable avatar Jul 24 '22 17:07 SirIndubitable

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

oldnapalm avatar Jul 27 '22 21:07 oldnapalm

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

oldnapalm avatar Jul 30 '22 12:07 oldnapalm

@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.

SirIndubitable avatar Jul 30 '22 17:07 SirIndubitable

@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.

oldnapalm avatar Jul 31 '22 02:07 oldnapalm

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

SirIndubitable avatar Aug 06 '22 20:08 SirIndubitable

Yes, I need to fix CI first...

La0 avatar Aug 18 '22 15:08 La0

At least on my fork, this PR fixes the CI

SirIndubitable avatar Aug 18 '22 15:08 SirIndubitable

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

app4g avatar Apr 15 '23 14:04 app4g