tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
569 stars 103 forks source link

Bug: 5.3 fails to connect to Ring API due to a 404 #646

Closed JoernBerkefeld closed 1 year ago

JoernBerkefeld commented 1 year ago

Describe the Bug

your latest update is already out of date

Steps to Reproduce

install 5.3 & try to authenticate

Expected Behavior

it works

Log Output

2023-06-05T07:19:59.814Z ring-mqtt Username/Password was accepted, waiting for 2FA code to be entered.
2023-06-05T07:20:06.387Z ring-mqtt Saving updated refresh token to state file
2023-06-05T07:20:06.387Z ring-mqtt Attempting connection to Ring API using generated refresh token...
2023-06-05T07:20:07.042Z ring-mqtt Not found with response: {"status":404,"error":"Not Found"}
2023-06-05T07:20:07.042Z ring-mqtt Failed to establish connection to Ring API using generated refresh token
2023-06-05T07:20:07.042Z ring-mqtt Failed to connect to Ring API using saved token, generate a new token using the Web UI
2023-06-05T07:20:07.043Z ring-mqtt or wait 60 seconds to automatically retry authentication using the existing token
2023-06-05T07:20:07.407Z ring-mqtt Successfully saved updated state file: /data/ring-state.json
2023-06-05T07:20:19.310Z ring-mqtt Retrying authentication with existing saved token...
2023-06-05T07:20:19.372Z ring-mqtt Attempting connection to Ring API using saved refresh token...
2023-06-05T07:20:20.017Z ring-mqtt Not found with response: {"status":404,"error":"Not Found"}
2023-06-05T07:20:20.017Z ring-mqtt Failed to establish connection to Ring API using saved refresh token

Screenshots

also, why did you disable issues on your other repo?! came here after not being able to file the issue on https://github.com/tsightler/ring-mqtt-ha-addon

Config File

.

Install Type

HA addon

Version

v.3

Operating System

HA OS

Architecture

.

Machine Details

rasp pi

JoernBerkefeld commented 1 year ago

Hm, weird. After a little while, it simply started working. No clue what's been happening here :/

tsightler commented 1 year ago

Yes, I've seen this issue as well, but I don't know what can be done about it. The API call that is failing is very basic but somehow just fails randomly with a 404, but then usually works fine a few minutes later. As the code already retries and I can't reproduce it consistently, I haven't seen it as a huge issue. This problem has been around for ages and is not unique to v5.3.0 although perhaps it's the first time you've hit it.

also, why did you disable issues on your other repo?!

Has been disabled for more than a year, but there is a link in the readme to this repos discussions and issues pages. Mainly did this because all addon specific capabilities have been merged into this repo years ago, they even use a common docker image, and >95% of the issues reported in the addon repo were in ring-mqtt, not the addon itself, so it didn't make sense to keep them separate as users were unable to determine the difference between an addon vs a ring-mqtt bug anyway.

If I could easily change it without breaking existing installs I'd merge the repos and delete the dedicated addon repo completely, it's basically nothing but two yaml files anyway.

Since it eventually worked I'm going to close this, but I'll keep looking at it when I see it and maybe I'll eventually be able to track it down.

JoernBerkefeld commented 1 year ago

thank you for your reply!

small suggestion: if this is a common issue, maybe you could mention that in your docs (including the upgrade docs). One or two sentences there and people simply expect that weird issue to happen and wait a little longer before coming here ;-)

tsightler commented 1 year ago

If it becomes a commonly reported problem, I will consider this, but it's really hard to document all of the little weird cases that people might run into. This problem has been around for ages and this is the first time anyone has even posted about it. Perhaps it's become a larger issue with the current API version, but, until I see that trend, I'm more tempted to stick with the existing status. Anybody who will actually read the docs will also likely search and see this issue, so we'll see what happens.