homebridge-eufy-security / plugin

Homebridge plugin to control certain Eufy Security devices
Apache License 2.0
158 stars 24 forks source link

[Bug]: HomeBridge updated to 1.8.3 which updated Node.JS to 20.14.0 #586

Closed DWLaurie closed 1 week ago

DWLaurie commented 1 week ago

What happened?

A bug happened! HomeBridge updated to 1.8.3 which updated Node.js to 20.14.0 I have downgraded Node.js to 20.11.0 but getting this warning:

"[Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')" - see https://homebridge.io/w/JJSz6 for help."

I checked the perviously mentioned URL and found the phrase "Failed to check registry.npmjs.org for updates" under "NPM Registry Issues". Hiowever the keywords of "Cannot read properties..." are not listed. I have not been able to determine what is causing this yet.

PlugIn Version v3.4.2 HomeBridge Version v1.8.3

cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm

Device Type

Doorbell (Supported)

Plugin Version

v3.0.x (Best Effort)

HomeBridge Version

other (UnSupported)

NodeJS Version

other (UnSupported)

Operating System

Raspbian 10+ (Supported)

Relevant log output

[24/06/2024, 08:58:16] [Hubitat-v2] [Device Event]: (Basement - LG Sidekick) [POWER] is 0.735
[24/06/2024, 08:58:42] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')" - see https://homebridge.io/w/JJSz6 for help.
[24/06/2024, 08:58:42] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')" - see https://homebridge.io/w/JJSz6 for help.
[24/06/2024, 08:58:46] [Hubitat-v2] [Device Event]: (Basement - LG Sidekick) [POWER] is 0.774

config

{
    "bridge": {
        "name": "Homebridge E75B",
        "username": "USERNAME",
        "port": 51114,
        "pin": "PIN",
        "advertiser": "avahi",
        "bind": [
            "eth0"
        ]
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "auth": "form",
            "theme": "dark-mode",
            "tempUnits": "f",
            "lang": "auto",
            "platform": "config"
        },
        {
            "name": "Hubitat-v2",
            "app_url_local": "LOCAL_URL",
            "app_url_cloud": "CLOUD_URL",
            "use_cloud": false,
            "app_id": 187,
            "access_token": "TOKEN",
            "direct_port": 8000,
            "polling_seconds": 3600,
            "temperature_unit": "F",
            "round_levels": true,
            "adaptive_lighting": true,
            "adaptive_lighting_offset": 0,
            "consider_fan_by_name": false,
            "consider_light_by_name": false,
            "validateTokenId": false,
            "logConfig": {
                "debug": false,
                "showChanges": true
            },
            "platform": "Hubitat-v2",
            "_bridge": {
                "username": "USERNAME",
                "port": 59168
            }
        },
        {
            "country": "US",
            "language": "en-US",
            "auth_mode": "token",
            "refresh_token": "REFRESH_TOKEN",
            "username": "USERNAME",
            "password": "PASSWORD",
            "platform": "LGThinQ",
            "devices": [
                {
                    "id": "ID",
                    "name": "Pedestal Washer",
                    "type": "WASHER",
                    "washer_trigger": false
                },
                {
                    "id": "ID",
                    "name": "Washer",
                    "type": "WASHER",
                    "washer_trigger": true,
                    "washer_door_lock": false
                },
                {
                    "id": "ID",
                    "name": "Kitchen Range",
                    "type": "OVEN"
                },
                {
                    "id": "ID",
                    "name": "Dryer",
                    "type": "DRYER",
                    "washer_trigger": true,
                    "washer_door_lock": false
                }
            ],
            "thinq1": false,
            "refresh_interval": 60,
            "_bridge": {
                "username": "USERNAME",
                "port": 42665
            }
        },
        {
            "username": "USERNAME",
            "password": "PASSWORD",
            "country": "US",
            "deviceName": "",
            "platform": "EufySecurity",
            "_bridge": {
                "username": "USERNAME",
                "port": 50825
            },
            "cameras": [
                {
                    "serialNumber": "SERIAL_NUMBER",
                    "rtsp": false,
                    "snapshotHandlingMethod": 3,
                    "refreshSnapshotIntervalMinutes": 0
                },
                {
                    "serialNumber": "SERIAL_NUMBER",
                    "rtsp": false,
                    "snapshotHandlingMethod": 3,
                    "refreshSnapshotIntervalMinutes": 0
                },
                {
                    "serialNumber": "SERIAL_NUMBER",
                    "rtsp": false,
                    "snapshotHandlingMethod": 3,
                    "refreshSnapshotIntervalMinutes": 0
                },
                {
                    "serialNumber": "SERIAL_NUMBER",
                    "rtsp": false,
                    "refreshSnapshotIntervalMinutes": 0
                },
                {
                    "serialNumber": "SERIAL_NUMBER",
                    "rtsp": false,
                    "refreshSnapshotIntervalMinutes": 0
                },
                {
                    "serialNumber": "SERIAL_NUMBER",
                    "rtsp": false,
                    "snapshotHandlingMethod": 3,
                    "refreshSnapshotIntervalMinutes": 0
                },
                {
                    "serialNumber": "SERIAL_NUMBER",
                    "rtsp": false,
                    "snapshotHandlingMethod": 3,
                    "refreshSnapshotIntervalMinutes": 0
                },
                {
                    "serialNumber": "SERIAL_NUMBER",
                    "rtsp": false,
                    "snapshotHandlingMethod": 3,
                    "refreshSnapshotIntervalMinutes": 0
                }
            ],
            "ignoreDevices": []
        }
    ],
    "disabledPlugins": []
}
ccanalia82 commented 1 week ago

The highest version of nodejs that is compatible is v20.11.0. Anything higher than that and it's not supported.
Downgrade nodejs.
Per the readme.md file: It is recommended to use the latest LTS version within the v20 branch of Node.js for optimal compatibility. Currently, this version is v20.11.0. Please note that using versions outside of this branch, including v20.11.1, may result in compatibility issues. We advise against using Node.js versions beyond v20.11.0 until compatibility with the plugin has been confirmed. If you encounter any issues, consider reverting to the recommended LTS version within the v20 branch.

DWLaurie commented 1 week ago

I did that, as stated in the bug report. Although I did misstated it as "2.11.00 " This misstatement has been corrected.

Regardless, I am getting the warning in the log. "[Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')" - see https://homebridge.io/w/JJSz6 for help."

This is happening with Node.js 20.11.0 in production.

ccanalia82 commented 1 week ago

This shows it’s your Homebridge UI not the Eufy plugin:

[Homebridge UI] [homebridge-config-ui-x]

Have you tried reinstalling the UI?

On Jun 24, 2024, at 8:59 AM, DWLaurie @.***> wrote:

I did that, as stated in the bug report. Although I did misstated it as "2.11.00 " This misstatement has been corrected.

Regardless, I am getting the warning in the log. "[Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')" - see https://homebridge.io/w/JJSz6 for help."

This is happening with Node.js 20.11.0 in production.

— Reply to this email directly, view it on GitHub https://github.com/homebridge-eufy-security/plugin/issues/586#issuecomment-2186786300, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7TVUSTO66D5B5CXHO6VNMTZJAX6VAVCNFSM6AAAAABJZ5I7YWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWG44DMMZQGA. You are receiving this because you commented.

DWLaurie commented 1 week ago

Oh shoot! 3 Demerits for me for blaming the wrong code! :( I will stop bugging you folks and poke them instead. My apologies for the report. I was so focused on downgrading the Node version that I mistakenly read the warning as coming from the plugin. BAD Support Analyst! (which is what I do all day - oops!)

DWLaurie commented 1 week ago

this is fixed with the latest version of Hombridge UI. v4.56.3 I upgraded from v4.56.2