cyberjunky / home-assistant-garmin_connect

The Garmin Connect integration allows you to expose data from Garmin Connect to Home Assistant.
MIT License
249 stars 36 forks source link

LOOP OF DEATH: Initializing... Failed Setup, Will Retry #114

Open moshin34 opened 11 months ago

moshin34 commented 11 months ago

Seems simple enough. I authenticate and then it adds the card and firmly places me into a loop of death

first: Initializing...
then: Failed Setup, Will Retry

rinse, repeat, ad infinitum.

What can do ? Im a HUGE Garmin Fanboy and would love to get this cookin.

Thanks in advance.

Im running the latest HAOS OVA in ESXi

moshin34 commented 11 months ago
Screen Shot 2023-12-04 at 1 02 14 PM
jratys commented 11 months ago

I got the same...

cyberjunky commented 11 months ago

@moshin34 @jratys can you try to add some gear to your setup if you have none, like running shoes, and see if this 'fixes' it? Then at least we know where to look/solve...

ndrdk0 commented 11 months ago

I got the same problem, and have tried adding some gear, nothing really sems to help, i have a snip of the log.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/garmin_connect/init.py", line 129, in _async_update_data gear_stats = await asyncio.gather(tasks) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/garminconnect/init.py", line 769, in get_gear_stats return self.connectapi(url) ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/garminconnect/init.py", line 149, in connectapi return self.garth.connectapi(path, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/garth/http.py", line 157, in connectapi resp = self.get("connectapi", path, api=True, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/garth/http.py", line 136, in get return self.request("GET", args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/garth/http.py", line 129, in request raise GarthHTTPError( garth.exc.GarthHTTPError: Error in request: 404 Client Error: Not Found for url: https://connectapi.garmin.com/gear-service/gear/stats/c1499c9d81a74abb9665e30bca6d8a29 2023-12-15 15:49:49.870 DEBUG (MainThread) [custom_components.garmin_connect] Finished fetching garmin_connect data in 1.738 seconds (success: False)

jratys commented 11 months ago

I added another user and that workt ok!

cyberjunky commented 11 months ago

Did you have 2FA active on first user? What is the difference between the two?

jratys commented 11 months ago

The second one was new. I had only the Garmin index scale configured. I enabled weight bmi and so forth and disabled all others. It worked at that moment but later and still, all entities say unknown…☹️

Message ID: @.***>

m2726 commented 11 months ago

Running into the same issue. In my case I turned on ECG which also turns on 2FA, which I didn't knew before. My understanding from Garmin is now that as soon as ECG is turned on 2FA can't be turned off. So, I can either have ECG with 2FA or no ECG but also 2FA turned off.

Hopefully there will be a way to support 2FA at some point?

cyberjunky commented 11 months ago

Yes 2fa support is on the list for a long time, will try to free some time to implement it soon..

moshin34 commented 11 months ago

I don’t even have multi factor auth

On Sun, Dec 17, 2023 at 11:27 AM Ron @.***> wrote:

Yes 2fa support is on the list for a long time, will try to free some time to implement it soon..

— Reply to this email directly, view it on GitHub https://github.com/cyberjunky/home-assistant-garmin_connect/issues/114#issuecomment-1859216423, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCY66I723CAVIX3MKIS6CGTYJ4MOFAVCNFSM6AAAAABAGMHMQ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZGIYTMNBSGM . You are receiving this because you were mentioned.Message ID: @.*** com>

ndrdk0 commented 11 months ago

I dont have 2fa either, i just have a regular email, with a normal password, nothing unusual. if there is anything i can try different i am willing to do so.

cyberjunky commented 11 months ago

That was the question, thank you.

amgresset commented 10 months ago

Any updates on this? I'm having the same issue :s

cyberjunky commented 10 months ago

Not yet, since I cannot reproduce the issue. I will see if I can try to catch the error better when fetching gear data. Do you have any gear like shoes defined or none?

moshin34 commented 10 months ago

I have shoes and bicycles defined.

On Sun, Dec 31, 2023 at 4:14 PM Ron @.***> wrote:

Not yet, since I cannot reproduce the issue. I will see if I can try to catch the error better when fetching gear data. Do you have any gear like shoes defined or none?

— Reply to this email directly, view it on GitHub https://github.com/cyberjunky/home-assistant-garmin_connect/issues/114#issuecomment-1873038466, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCY66I4M5YHNKKJLS726XADYMHIRTAVCNFSM6AAAAABAGMHMQ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTGAZTQNBWGY . You are receiving this because you were mentioned.Message ID: @.*** com>

cyberjunky commented 10 months ago

@moshin34 @NDRDK @amgresset @jratys I have released update version 0.2.19 where I now fetch all gear related data separately, hopefully this fixes some login issues.

If not please enable debug and paste relevant debug info (I have added some more info) please mask uuid values if you want but keep them consistent so I can match them still across data.

alfureu commented 7 months ago

I just run into this issue, as Garmin requires 2FA with ECG funcionality, and enabling it I lost homeassistant connection. Is there any progress on implementing 2FA?