dgreif / ring

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

API Timeout on prd-api-us.prd.rings.solutions #1454

Closed bradthomsen15 closed 1 month ago

bradthomsen15 commented 2 months ago

Is there an existing issue for this?

Describe The Bug

Getting the following error in my homebridge:

[Ring] Failed to reach Ring server at https://prd-api-us.prd.rings.solutions/api/v1/clap/ticket/request/signalsocket. Timeout awaiting 'request' for 20000ms. Trying again in 5 seconds...

To Reproduce

Add the ring plugin to hombridge, authenticate with your credentials, then watch the logs. No interaction beyond that needed.

Expected behavior

I expect that ring would connect, show my devices, and I could live stream but they are unreachable due to the API not connecting

Relevant log output

[7/27/2024, 9:46:06 PM] [Ring] Failed to reach Ring server at https://prd-api-us.prd.rings.solutions/api/v1/clap/ticket/request/signalsocket.  Timeout awaiting 'request' for 20000ms.  Trying again in 5 seconds...
[7/27/2024, 9:46:14 PM] [Ring] Failed to reach Ring server at https://prd-api-us.prd.rings.solutions/api/v1/mode/location/2b28500d-5daa-44a8-9f92-55c50879fdce.  Timeout awaiting 'request' for 20000ms.  Trying again in 5 seconds...
[7/27/2024, 9:46:14 PM] [Ring] Failed to reach Ring server at https://api.ring.com/clients_api/ring_devices.  Timeout awaiting 'request' for 20000ms.  Trying again in 5 seconds...
[7/27/2024, 9:46:19 PM] [Ring] Failed to reach Ring server at https://prd-api-us.prd.rings.solutions/api/v1/mode/location/2b28500d-5daa-44a8-9f92-55c50879fdce.  Timeout awaiting 'request' for 20000ms.  Trying again in 5 seconds...

Screenshots

No response

Additional context

No response

OS

linux

Node.js Version

v20.16.0

NPM Version

v10.8.1

ring-client-api

v12.1.1

Operating System

Ubuntu Docker Container

kjp10480 commented 2 months ago

I am getting a similar error. Was working fine until last few days.

[7/29/2024, 8:50:43 AM] [homebridge-ring] Failed to reach Ring server at https://api.ring.com/clients_api/device. Timeout awaiting 'request' for 20000ms. Trying again in 5 seconds...

tsightler commented 2 months ago

In general, there is nothing anyone here can do to help with network related issues. In general, these typically boil down to 1 of 3 things:

1) Using some type of VPN or adblocker based solution which is block access to the Ring API, or which Ring itself is blocking (Ring appears to generally block access from known VPN endpoints). 2) Some type of conflicting plugin, this is less common today than in the past, but there are still a lot of Homebridge plugins using very old web clients which cause all kinds of issues across all plugins. Hopefully the move to native fetch in v13 version will address it. You can try the beta to see if it helps for this specific case. 3) A real, actual networking issue such as firewall, DNS, IPv6 routing, etc. Modern node can default to using IPv6, but I've found a lot of really broken IPv6 home networking configurations.

In none of those cases is there anything wrong with the plugin/ring-client-api. In the end, the plugin is just making standard system calls for HTTPS and the logs are showing you what is failing. The occasional failure to api.ring.com is fully expected and normal, it's only an issue where there are ongoing, consistent failures every 20 seconds.

bradthomsen15 commented 2 months ago

For me the error is happening every 20-30 seconds. Then it seems to connect then the connection drops.

On Mon, Jul 29, 2024 at 9:07 AM tsightler @.***> wrote:

In general, there is nothing anyone here can do to help with network related issues. In general, these typically boil down to 1 of 3 things:

  1. Using some type of VPN or adblocker based solution which is block access to the Ring API, or which Ring itself is blocking (Ring appears to generally block access from known VPN endpoints).
  2. Some type of conflicting plugin, this is less common today than in the past, but there are still a lot of Homebridge plugins using very old web clients which cause all kinds of issues across all plugins. Hopefully the move to native fetch in v13 version will address it. You can try the beta to see if it helps for this specific case.
  3. A real, actual networking issue such as firewall, DNS, IPv6 routing, etc. Modern node can default to using IPv6, but I've found a lot of really broken IPv6 home networking configurations.

In none of those cases is there anything wrong with the plugin/ring-client-api. In the end, the plugin is just making standard system calls for HTTPS and the logs are showing you what is failing. The occasional failure to api.ring.com is fully expected and normal, it's only an issue where there are ongoing, consistent failures every 20 seconds.

— Reply to this email directly, view it on GitHub https://github.com/dgreif/ring/issues/1454#issuecomment-2256325421, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO27B2UVYCW2XAZSHEVHKA3ZOZSDTAVCNFSM6AAAAABLSO5FWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJWGMZDKNBSGE . You are receiving this because you authored the thread.Message ID: @.***>

tsightler commented 2 months ago

Unfortunately, there is very little that can be done about it from the development side, the logs are just showing the errors being reported, no different than a web browser reporting a website unreachable being able to be solved by the browser maintainer. I provided the best advice I can above.

One other thing you can double check is to make sure you have a caching DNS locally. Some users that don't run a local caching DNS, but instead use their upstream DNS directly, have reported a lot of issues as Node has no caching and creates a LOT of DNS queries which I've seen flood some systems and cause disconnects.

tsightler commented 1 month ago

Please retest with 13.0.0. This version removes the dependency on got in favor of native fetchimplementation in NodeJS versions >=18. The old got package was very easy to conflict with other plugins and cause various issues like this so perhaps this will help. If it still fails then you will have to double check your networking configuration.