dgreif / ring

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

RIng Server Failure with latest Node.JS #1383

Closed colliff01 closed 6 months ago

colliff01 commented 6 months ago

Is there an existing issue for this?

Describe The Bug

My entire homebridge system dies at least once every other day locking all devices as unaccessible until I physically reboot the Homebridge Server to restore access. I have tried all updates to Homebridge, Node.JS, and all other modules. It appears to happen nightly when Ring might be doing some kind of maintenance, rarely happens during day hours.

To Reproduce

Just let Homebridge run and it will lock out.

Expected behavior

I expect that a problem communicating with api.ring.com will not result in a sudden crash of the homebridge server.

Relevant log output

[04/01/2024, 04:40:56] [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...
[04/01/2024, 04:41:03] [Ring] Failed to reach Ring server at https://app.ring.com/api/v1/mode/location/499c5d34-b444-4185-80a3-f57dae70bc63.  Timeout awaiting 'request' for 20000ms.  Trying again in 5 seconds...
[04/01/2024, 04:41:33] [Ring] Failed to reach Ring server at https://app.ring.com/api/v1/mode/location/499c5d34-b444-4185-80a3-f57dae70bc63.  Timeout awaiting 'request' for 20000ms.  Trying again in 5 seconds...
[04/01/2024, 04:41:55] [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...
[04/01/2024, 04:41:58] [Ring] Failed to reach Ring server at https://app.ring.com/api/v1/mode/location/499c5d34-b444-4185-80a3-f57dae70bc63.  Timeout awaiting 'request' for 20000ms.  Trying again in 5 seconds...
[04/01/2024, 04:42:28] [Ring] Failed to reach Ring server at https://app.ring.com/api/v1/mode/location/499c5d34-b444-4185-80a3-f57dae70bc63.  Timeout awaiting 'request' for 20000ms.  Trying again in 5 seconds...
[04/01/2024, 04:42:32] [Ring] Failed to reach Ring server at https://app.ring.com/api/v1/mode/location/499c5d34-b444-4185-80a3-f57dae70bc63.  Timeout awaiting 'request' for 20000ms.  Trying again in 5 seconds...
[04/01/2024, 04:42:37] Error: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

    at assert (node:internal/assert:14:11)
    at internalConnectMultiple (node:net:1118:3)
    at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
    at listOnTimeout (node:internal/timers:575:11)
    at processTimers (node:internal/timers:514:7)
[04/01/2024, 04:42:57] Got SIGTERM, shutting down Homebridge...
[04/01/2024, 04:43:20] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[04/01/2024, 04:43:25] [HB Supervisor] Restarting Homebridge...
[04/01/2024, 04:43:25] [HB Supervisor] Starting Homebridge with extra flags: -I
[04/01/2024, 04:43:25] [HB Supervisor] Starting Homebridge with custom env: {"NODE_OPTIONS":"--unhandled-rejections=warn"}
[04/01/2024, 04:43:25] [HB Supervisor] Started Homebridge v1.7.0 with PID: 28415

Screenshots

No response

Homebridge Ring Config

"name": "Config",
            "port": 8581,
            "auth": "form",
            "theme": "auto",
            "tempUnits": "f",
            "lang": "auto",
            "platform": "config"
        },
        {
            "unbridgeCameras": false,
            "alarmOnEntryDelay": true,
            "hideLightGroups": true,
            "hideDoorbellSwitch": true,
            "hideAlarmSirenSwitch": true,
            "showPanicButtons": true,
            "platform": "Ring"

Additional context

No response

OS

Raspbian GNU/Linux Bullseye (11)

Node.js Version

v20.10.0

NPM Version

v10.2.5

Homebridge/HOOBs Version

v1.7.0

Homebridge Ring Plugin Version

v12.1.0

Operating System

Raspian

tsightler commented 6 months ago

I don't believe this is anything related to the plugin, this issue is well documented with Node 20.x with many duplicate issues filed on the NodeJS Github issues page. Recently, a fix was supposedly merged (https://github.com/nodejs/node/pull/51045), however, this was in the last few weeks so it's not made it to a published 20.x LTS version yet. I'm going to close this for now.