Coder Social home page Coder Social logo

Comments (23)

lswiderski avatar lswiderski commented on July 22, 2024 5

@SimonBaars Thanks! I will check for sure, although I can't use Garth directly because of the project language (c#) I will reimplement the same flow

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024 5

Status update: With library OAuth.DotNetCore I received proper oAuth1 token. I will do more tests during the weekend.

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024 2

Status for today:
It looks like most of the open source 3rd party apps that connect to Garmin stopped working.

My findings:
Any action now require Authorization Bearer JWT Token, new Cookie JWT_FGP=, new Header Di-Backend: connectapi.garmin.com

the JWT Token can be obtained under https://connect.garmin.com/modern/di-oauth/exchange it require 3 Cookies: __cflb=, notice_behavior=implied,eu;, SESSIONID=. In response header I also receive JWT_FGP Cookie

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024 1

Progress update:
Login and upload of activity (weight) works already works as external lib. Now it's time to test it in Android.

https://github.com/lswiderski/GarminWeightScaleUploader/blob/master/Libs/garmin-connect-client/GarminConnectClient.Lib/Services/Client.cs

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024 1

Thank you. On Scale part nothing changed so should work fine. In near future I will add some retry policy to it because I can see it can don't work randomly.

Anyway I'm happy We won with Garmin and connection is working Again.

from mi-scale-exporter.

SirYaro avatar SirYaro commented on July 22, 2024 1

Yup. 9/10 it works like that. Which is okay-ish...? :)

I also noticed that I'm able to send data only one time. If I hit "send" second, third etc time (with different data and day) I'm getting this:
1696093617804

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024 1

For now I must be ok :/ In free time, I will rewrite the Garmin Connect part. But it will take some time. I wanted to release the fix asap even if it's not perfect.

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024

Hi @lmerhay !

Thanks for the report. I have the same error and it looks like Garmin has changed something in the way I log in. I'll look into it today to investigate.

from mi-scale-exporter.

lmerhay avatar lmerhay commented on July 22, 2024

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024

pe-st/garmin-connect-export#95

from mi-scale-exporter.

SimonBaars avatar SimonBaars commented on July 22, 2024

I implemented a solution for this problem in related Python repositories:

Since I don't know much about this repo, I don't know what exact auth method is used, but I figure a similar solution could work.

from mi-scale-exporter.

jesuslg123 avatar jesuslg123 commented on July 22, 2024

Progress update: Login and upload of activity (weight) works already works as external lib. Now it's time to test it in Android.

https://github.com/lswiderski/GarminWeightScaleUploader/blob/master/Libs/garmin-connect-client/GarminConnectClient.Lib/Services/Client.cs

Thanks! if you can provide the APK I could give it a try in Android.

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024

Ok I fixed the App. It works on an emulator and my phone. Package was sent to Google Play Store to check and certificate and should be available to update within 24h.

.AAB and .APK installers are available here https://github.com/lswiderski/mi-scale-exporter/releases/tag/v2.0.8

@jesuslg123 Please check.

Any confirmation or bug report is welcome.

from mi-scale-exporter.

jesuslg123 avatar jesuslg123 commented on July 22, 2024

Progress update: Login and upload of activity (weight) works already works as external lib. Now it's time to test it in Android.
https://github.com/lswiderski/GarminWeightScaleUploader/blob/master/Libs/garmin-connect-client/GarminConnectClient.Lib/Services/Client.cs

Thanks! if you can provide the APK I could give it a try in Android.

I don't have the scale now but I did try to upload the data from previous days and this morning and it is failing with 3 different errors, one after each attempt.

Screenshot_20230930_170023
Screenshot_20230930_170032
Screenshot_20230930_170038

Any idea?

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024

Thank you. I need to work on more detailed logs. Error about expected pattern means that Garmin somehow did not authenticated you. Do you have MFA/2FA turned off? What version of Android do you use? The weight did not uploaded in background?

from mi-scale-exporter.

jesuslg123 avatar jesuslg123 commented on July 22, 2024

Thanks for the support. Something interesting happened. I did restart the phone and worked fine this time.

May the Google play version kept running some service when I did remove to install the GitHub version?

Now works uploading manually. Automatically with the scale I can not test right now, sorry

from mi-scale-exporter.

SirYaro avatar SirYaro commented on July 22, 2024

In my case, I was able to send weight alone. When other values are present, I'm getting the same message as @jesuslg123 on 2nd and 3rd screenshot.

I tried resend like... 20 times. I'm persistent... :P

from mi-scale-exporter.

SirYaro avatar SirYaro commented on July 22, 2024

Tbh I don't think this issue is resolved... :(

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024

@SirYaro Ohh I will investigate more

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024

@SirYaro I got the same error when I'm back to opened app. When I closed (kill) and opened again, stand on scale, get measurement and uploaded with success.

from mi-scale-exporter.

SimonBaars avatar SimonBaars commented on July 22, 2024

404 sounds as if it is trying to reach out to a URL unauthenticated. The new method only works for oauth2 authenticated endpoints, not for scraping webpages.
@lswiderski Do you have a list of Garmin URLs that the app tries to access?

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024

@SimonBaars The problem was with the way of use of the Garmin client. Everytime when upload is done, method is trying to authenticate the user. On the second time, the auth headers was already there and the initial url was returning 404 (https://connect.garmin.com/modern/auth/hostname). Hotfixed it in 2.0.9 by clearing the headers of the http client.

from mi-scale-exporter.

lswiderski avatar lswiderski commented on July 22, 2024

As I can see on version 2.0.9 I don't have that problems anymore, So I'm closing this issue.

from mi-scale-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.