-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Upload to Garmin #68
Comments
I have the same problem |
Same problem. |
same problem. |
Garmin recently changed authentication to OAuth, it first did not affect the endpoint for .fit upload, but probably now it does. |
Anyone manage to solve this? |
I am not a Java developer, but if someone wants to fix this, basically, following the pattern in this lib https://github.com/matin/garth/tree/main you need to do the following steps:
The OAuth2 token has a classic expiration, and it can be refreshed by a refresh token, or regenerated by exchanging the OAuth1 token again (that one has a 1-year expiration). |
Same problem here |
I do have the same Problem. Uploading the generated .fit-File via the linked python client is possible. I do lack the ability to integrate this new process into the app, though. I would really appreciate a solution that's as convenient as the app was before. |
This app has 50k+ downloads on Google Play. I'd happily pay for an upgraded app that supported 2fa and sync to Garmin. Surely there are enough people willing to buy a cup of coffee to make this worthwhile for a new developer to pickup. @matin - I don't know you so forgive me plugging you here, but this seems like a trivial fix for you. Your code is already cited above. |
@mikelikesspam no forgiveness required 😄. Always happy to help in any way I can! |
@matin I'm not a Java developer neither, I did this app back in the day to fit my needs 😅 |
@kochka ! Good to see you! I wasn't sure how active the repo was but just looking into getting the oAuth requests working and then hopefully submitting a working PR 😄 My background is Java/Maven (4 years ago) but not Android/Gradle - though with your existing work, @matin's OAuth skills, and my typin,g we should get there 👍😄 |
@Syntax753 Good luck with that 😄 If you do not figure out the last bits to make it works, I'll try to find some time during the WE to help. |
Would it be possible to Add a paid version/ pro version so we can support the development of the app (actually just this one service - upload to Garmin Connect :-) ) looking forward to this will hopefully be fixed one day. |
I got side-tracked since the New Year with work so did not manage to
complete the fix. I am a bit confused by the flow unfortunately :(
…On Wed, 7 Feb 2024 at 12:45, jesperuc ***@***.***> wrote:
Would it be possible to Add a paid version/ pro version so we can support
the development of the app (actually just this one service - upload to
Garmin Connect :-) )
looking forward to this will hopefully be fixed one day.
—
Reply to this email directly, view it on GitHub
<#68 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFIVGG7N2EEXXD45P5TCM53YSNZNRAVCNFSM6AAAAAA6NVJATGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZRHE3TGMRXGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
That's completely fair - I think we all now that situation now and then :-) Unfortunately I dont have the knowledge on coding to provide my help. |
@Syntax753 if you need any help, I can guide you with the flow, unfortunately, I am not very familiar with Java/Android. You should feed the library with the Oauth1 token, consumer key and consumer secret. And it should return you the whole header. Basically, it calculates the signature, which is some HMAC-SHA1 hash created from the provided input. |
Thanks Martin!
I have a branch with what I believe should work but I couldn't quite get it
working. I can try and revisit this when I get some time.
…On Mon, 19 Feb 2024 at 12:49, Martin ***@***.***> wrote:
@Syntax753 <https://github.com/Syntax753> if you need any help, I can
guide you with the flow, unfortunately, I am not very familiar with
Java/Android.
Following the flow I wrote in the comment above should be enough. You need
to implement steps 2-4.
For constructing the Oauth1 header you can find any tutorial on how it
should look, or you can use a library - For example here
https://oauth.net/1/ are a few libraries also for Java.
Basically, the header should look something like this
"OAuth
oauth_consumer_key="{consumerKey}",oauth_signature_method="{signatureMethod}",oauth_timestamp="{timestamp}",oauth_nonce="{nonce}",oauth_version="{version}",oauth_signature="{signature}"
You should feed the library with the Oauth1 token, consumer key and
consumer secret. And it should return you the whole header. Basically, it
calculates the signature, which is some HMAC-SHA1 hash created from the
provided input.
—
Reply to this email directly, view it on GitHub
<#68 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFIVGG57TR2IQO4HDG324JLYUNC4VAVCNFSM6AAAAAA6NVJATGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJSGM4DGMRTGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I got the auth flow working a few days ago (and recently added support for MFA) on a branch based on @Syntax753's work. My most recent commit is able to successfully upload files to Garmin and I am currently running a debug build on my phone. I need to clean up the code and add support for saving and refreshing authentication. Once that is done, I'd be happy to get the changes merged in. If you don't have MFA (multi factor authentication/two factor authentication) on your account, the current state of the code should be workable. As I haven't yet added support for OAuth2 refresh, if MFA is enabeld, you'll have to enter an MFA code every time you upload (which could be annoying). I don't plan on releasing APKs on my forked repo unless I'm unable to get the changes merged into this repo. If you want the changes before the PR is merged, you can build from source. The branch can be found here: https://github.com/louisjennings/WeightLogger/tree/unable-to-upload-to-garmin-%2368 (I'm not a Java/Android developer, so I'd welcome a review from someone with Android development experience) |
Great work!
The project is alive (just niche :)) so a PR should be picked up
…On Wed, 21 Feb 2024, 09:07 louisjennings, ***@***.***> wrote:
I got the auth flow working a few days ago (and recently added support for
MFA) on a branch based on @Syntax753 <https://github.com/Syntax753>'s
work.
My most recent commit is able to successfully upload files to Garmin and I
am currently running a debug build on my phone. I need to clean up the code
and add support for saving and refreshing authentication. Once that is
done, I'd be happy to get the changes merged in.
If you don't have MFA (multi factor authentication/two factor
authentication) on your account, the current state of the code should be
workable. As I haven't yet added support for OAuth2 refresh, if MFA is
enabeld, you'll have to enter an MFA code every time you upload (which
could be annoying).
I don't plan on releasing APKs on my forked repo unless I'm unable to get
the changes merged into this repo. If you want the changes before the PR is
merged, you can build from source.
The branch can be found here:
https://github.com/louisjennings/WeightLogger/tree/unable-to-upload-to-garmin-%2368
—
Reply to this email directly, view it on GitHub
<#68 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFIVGG7Q7AX47Z5AMRZUQFTYUW2MTAVCNFSM6AAAAAA6NVJATGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJWGE4TANBVGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I've reviewed your changes @louisjennings and they look very good to me! |
@Syntax753 Yes of course ! |
I don't know if this will help, but there is solution in this repository - https://github.com/lswiderski/mi-scale-exporter |
….com/louisjennings/WeightLogger into unable-to-upload-to-garmin-kochka#68
Any news? |
@kochka Are there any updates when new version with this fix will be released? |
I didn't receive any PR, it was a work in progress. |
Ok I am a bit confused as it seem to me that the fix is available based on comments. |
Passwords and everything checked. Garmin has had an update ....
The text was updated successfully, but these errors were encountered: