dgreif / ring

Unofficial packages for Ring Doorbells, Cameras, Alarm System, and Smart Lighting
MIT License
1.2k stars 161 forks source link

Failed to reach Ring Server…timeout #1339

Closed sterumbelow closed 10 months ago

sterumbelow commented 10 months ago

Is there an existing issue for this?

Describe The Bug

The log shows:

[Ring] Failed to re ach Ring server at https://api.ring.com/c] ients_api/ring_devices. Timeout awaiting 'request' for 20000ms. Trying again in 5 seconds...

repeatedly. Eventually it seems to cause Homebridge to crash and cause everything to go offline. Restarting fixes the issue temporarily.

To Reproduce

No response

Expected behavior

No error/timeout. Seems to be a new issue.

Relevant log output

No response

Screenshots

IMG_7330

Homebridge Ring Config


{
            "refreshToken": "long link",
            "sendDoorbellMotionNotificationsToTv": false,
            "platform": "Ring"
        },

Additional context

No response

OS

Rasbian

Node.js Version

18.16.0

NPM Version

9.5.1

Homebridge/HOOBs Version

1.6.1

Homebridge Ring Plugin Version

12.0.1

Operating System

Raspbian

tsightler commented 10 months ago

You are running on a pretty old NodeJS version, although I don't know that this would be the issue, but v18 or later is recommended and v14 has been out of support for almost 6 months.

Overall however, there's not much that anyone here can do if you are getting timeouts querying the Ring API, that's up to network or Ring API responsiveness. They should not cause any crashes as requests are simply retried. Having those messages every so often is fairly normal and not unexpected, they are pretty much only an issue if you see dozens of them within the same minute or so, and, even then, that's more likely to just be a network/Ring outage than anything else.

sterumbelow commented 10 months ago

You are running on a pretty old NodeJS version, although I don't know that this would be the issue, but v18 or later is recommended and v14 has been out of support for almost 6 months.

Overall however, there's not much that anyone here can do if you are getting timeouts querying the Ring API, that's up to network or Ring API responsiveness. They should not cause any crashes as requests are simply retried. Having those messages every so often is fairly normal and not unexpected, they are pretty much only an issue if you see dozens of them within the same minute or so, and, even then, that's more likely to just be a network/Ring outage than anything else.

Have updated my post. Couldn't get to the info because Homebridge opened GitHub in the built-in browser.

I'm on 18.16.0.

tsightler commented 10 months ago

I'm going to close this issue as there is nothing that can be done from a code perspective here. Occasionally timeouts to the Ring API are nothing to be concerned about and there's nothing that can be done about them from a code perspective anyway, the error is already caught and logged and the requests is retried.

If you can provide a real example of this causing "Homebridge to crash" feel free to re-open and post those logs, but the logs above don't show anything to be concerned with and everyone will see these sometimes.