homebridge / homebridge-config-ui-x

The Homebridge UI. Monitor, configure and backup Homebridge from a browser.
https://homebridge.io
MIT License
2.62k stars 379 forks source link

Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" #1146

Closed elfive closed 3 years ago

elfive commented 3 years ago

Describe The Bug: The web interface can not check homebridge plugin version, always shows:

Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.

and it will hangs out the whole web interface.

This issue starts from 'homebridge-config-ui-x' version 4.37.0 to 4.41.0, and version 4.36.0 is ok.

What's more, if you use the cli in homebridge-config-ui web ui, you can run wget registry.npmjs.org and can get a correct server answer.

Since I use the same machine and same docker image to test all of this, I realy don't think this is a network problem.

Maybe the same issue(similar behavior): #1126

To Reproduce: Download the docker image (update: 2021.02) with homebridge version 1.2.5 and homebridge-config-ui-x version 4.36.0, update homebridge to version 1.3.4 and update 'homebridge-config-ui-x' to version 4.37.0 then this problem shows.

Expected behavior: Showing correct plugin version information,

Logs:

[4/4/2021, 2:49:09 PM] [HB Supervisor] OS: Linux 5.4.105 x64
[4/4/2021, 2:49:09 PM] [HB Supervisor] Node.js v14.15.4 /usr/local/bin/node
[4/4/2021, 2:49:09 PM] [HB Supervisor] Homebridge Path: /usr/local/lib/node_modules/homebridge/bin/homebridge
[4/4/2021, 2:49:09 PM] [HB Supervisor] UI Path: /usr/local/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js
[4/4/2021, 2:49:09 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /homebridge/node_modules
[4/4/2021, 2:49:09 PM] [HB Supervisor] Started Homebridge v1.3.4 with PID: 1753
Initializing HAP-NodeJS v0.9.4...
[4/4/2021, 2:49:09 PM] Loaded config.json with 6 accessories and 6 platforms.
[4/4/2021, 2:49:09 PM] Loaded 2 cached accessories from cachedAccessories.
[4/4/2021, 2:49:09 PM] ---
[4/4/2021, 2:49:10 PM] Loaded plugin: homebridge-advanced-timer@1.1.1
[4/4/2021, 2:49:10 PM] Registering accessory 'homebridge-advanced-timer.advanced_timer'
[4/4/2021, 2:49:10 PM] ---
[4/4/2021, 2:49:10 PM] Loaded plugin: homebridge-bravia@2.4.8
[4/4/2021, 2:49:10 PM] Registering platform 'homebridge-bravia.BraviaPlatform'
[4/4/2021, 2:49:10 PM] ---
[4/4/2021, 2:49:10 PM] Loaded plugin: homebridge-camera-ffmpeg@3.1.2
[4/4/2021, 2:49:10 PM] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg'
[4/4/2021, 2:49:10 PM] ---
[4/4/2021, 2:49:10 PM] Loaded plugin: homebridge-mi-acpartner@0.7.1
[4/4/2021, 2:49:10 PM] Registering platform 'homebridge-mi-acpartner.XiaoMiAcPartner'
[4/4/2021, 2:49:10 PM] ---
[4/4/2021, 2:49:10 PM] Loaded plugin: homebridge-mi-aqara@0.8.1
[4/4/2021, 2:49:10 PM] Registering platform 'homebridge-mi-aqara.MiAqaraPlatform'
[4/4/2021, 2:49:10 PM] ---
[4/4/2021, 2:49:10 PM] Loaded plugin: homebridge-petkit-feeder-mini@2.0.3
[4/4/2021, 2:49:10 PM] Registering platform 'homebridge-petkit-feeder-mini.petkit_feeder_mini'
[4/4/2021, 2:49:10 PM] ---
[4/4/2021, 2:49:10 PM] Loaded plugin: homebridge-synology@0.3.1
[4/4/2021, 2:49:10 PM] Registering accessory 'homebridge-synology.Synology'
[4/4/2021, 2:49:10 PM] ---
[4/4/2021, 2:49:10 PM] [Homebridge UI] Homebridge Config UI X v4.37.0 is listening on :: port 18581
[4/4/2021, 2:49:10 PM] Loaded plugin: homebridge-synology-surveillance-homemode@1.0.5
[4/4/2021, 2:49:10 PM] Registering accessory 'homebridge-synology-surveillance-homemode.SSHomeMode'
[4/4/2021, 2:49:10 PM] ---
[4/4/2021, 2:49:10 PM] Loaded plugin: homebridge-wol@4.3.0
[4/4/2021, 2:49:10 PM] Registering accessory 'homebridge-wol.NetworkDevice'
[4/4/2021, 2:49:10 PM] ---
[4/4/2021, 2:49:10 PM] Loaded plugin: homebridge-xiaomi-roborock-vacuum@0.18.1
[4/4/2021, 2:49:10 PM] Registering accessory 'homebridge-xiaomi-roborock-vacuum.XiaomiRoborockVacuum'
[4/4/2021, 2:49:10 PM] ---
[4/4/2021, 2:49:10 PM] Loaded plugin: homebridge-config-ui-x@4.37.0
[4/4/2021, 2:49:10 PM] Registering platform 'homebridge-config-ui-x.config'
[4/4/2021, 2:49:10 PM] ---
[4/4/2021, 2:49:10 PM] Loading 6 platforms...
<---hide some other plugin logs--->
[4/4/2021, 2:49:10 PM] [HomeBridge-UI] Initializing config platform...
[4/4/2021, 2:49:10 PM] [HomeBridge-UI] Running in Service Mode
<---hide some other plugin logs--->
[4/4/2021, 2:49:10 PM] Loading 6 accessories...
<---hide some other plugin logs--->
DEPRECATED user supplied a custom 'mdns' option. This option is deprecated and ignored. Please move to the new 'bind' option.
Preparing Advertiser for 'Camera 1 85EE' using ciao backend!
DEPRECATED user supplied a custom 'mdns' option. This option is deprecated and ignored. Please move to the new 'bind' option.
Preparing Advertiser for 'Homebridge_LEDE 4410' using ciao backend!
Setup Payload:
X-HM://00253V6APPMB1
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 989-86-145 │     
    └────────────┘     

<---hide some other plugin logs--->
Starting to advertise 'Homebridge_LEDE 4410' using ciao backend!
[4/4/2021, 2:49:10 PM] Homebridge v1.3.4 (Homebridge_LEDE) is running on port 51826.
[4/4/2021, 2:49:20 PM] [Homebridge UI] [npm] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:20 PM] [Homebridge UI] [homebridge] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:25 PM] [Homebridge UI] [homebridge-advanced-timer] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:25 PM] [Homebridge UI] [homebridge-bravia] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:25 PM] [Homebridge UI] [homebridge-camera-ffmpeg] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:25 PM] [Homebridge UI] [homebridge-mi-acpartner] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:25 PM] [Homebridge UI] [homebridge-mi-aqara] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:25 PM] [Homebridge UI] [homebridge-petkit-feeder-mini] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:25 PM] [Homebridge UI] [homebridge-synology] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:25 PM] [Homebridge UI] [homebridge-synology-surveillance-homemode] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:25 PM] [Homebridge UI] [homebridge-wol] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:25 PM] [Homebridge UI] [homebridge-xiaomi-roborock-vacuum] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.
[4/4/2021, 2:49:25 PM] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "timeout of 5000ms exceeded" - see https://git.io/JJSz6 for help.

Homebridge Config:

{
    "mdns": {
        "interface": "192.168.88.80"
    },
    "bridge": {
        "name": "Homebridge_LEDE",
        "username": "58:E2:8F:xx:xx:xx",
        "port": 51826,
        "pin": "989-86-145",
        "advertiser": "ciao"
    },
    "description": "This is an example configuration file. You can use this as a template for creating your own configuration file containing devices you actually own.",
    "accessories": [
        {
            "accessory": "Synology",
            "name": "918",
            "ip": "192.168.xx.xx",
            "mac": "00:11:32:xx:xx:xx",
            "port": "88888",
            "secure": false,
            "account": "<---hide personal infomation--->",
            "password": "<---hide personal infomation--->",
            "version": 6,
            "timeout": 5000,
            "disabled": [
                "switch"
            ],
            "doPolling": true,
            "pollingInterval": 60
        },
        {
            "name": "RockRoboT6",
            "ip": "192.168.xx.xx",
            "token": "<---hide personal infomation--->",
            "waterBox": false,
            "silent": false,
            "pause": true,
            "pauseWord": "pause",
            "findMe": false,
            "findMeWord": "where is robot",
            "dock": true,
            "delay": false,
            "cleanword": "clean",
            "roomTimeout": 1,
            "rooms": [
                {
                    "name": "19",
                    "id": 19
                },
                {
                    "name": "22",
                    "id": 22
                },
                {
                    "name": "24",
                    "id": 24
                },
                {
                    "name": "16",
                    "id": 16
                },
                {
                    "name": "17",
                    "id": 17
                },
                {
                    "name": "21",
                    "id": 21
                },
                {
                    "name": "20",
                    "id": 20
                },
                {
                    "name": "18",
                    "id": 18
                },
                {
                    "name": "23",
                    "id": 23
                }
            ],
            "accessory": "XiaomiRoborockVacuum"
        },
        {
            "name": "pc",
            "ip": "192.168.xx.xx",
            "pingInterval": 2,
            "pingsToChange": 5,
            "pingTimeout": 1,
            "pingCommandTimeout": 0,
            "mac": "04:92:26:xx:xx:xx",
            "broadcastAddress": "192.168.xx:xx",
            "startCommandTimeout": 0,
            "wakeGraceTime": 50,
            "wakeCommandTimeout": 0,
            "shutdownCommand": "<---hide personal infomation--->",
            "shutdownGraceTime": 20,
            "shutdownCommandTimeout": 0,
            "log": true,
            "logPinger": false,
            "debugLog": false,
            "returnEarly": true,
            "accessory": "NetworkDevice"
        },
        {
            "accessory": "SSHomeMode",
            "name": "ss",
            "url": "http://192.168.xx:xx:88888/",
            "username": "<---hide personal infomation--->",
            "password": "<---hide personal infomation--->"
        },
        {
            "name": "mat",
            "intervals": "120,1680",
            "repeat": 0,
            "log_level": 1,
            "enable_name": "switch",
            "trigger_name": "signal",
            "trigger_type": 1,
            "pulse_trigger_duration": 3,
            "start_delay": 130,
            "stop_delay": 0,
            "enable_status_when_start": 0,
            "trigger_status_when_start": 0,
            "trigger_status_while_enabled": 1,
            "trigger_status_while_disabled": 0,
            "accessory": "advanced_timer"
        },
        {
            "name": "mat for cat",
            "intervals": "60,540",
            "repeat": 0,
            "log_level": 1,
            "enable_name": "switch",
            "trigger_name": "signal",
            "trigger_type": 1,
            "pulse_trigger_duration": 3,
            "start_delay": 0,
            "stop_delay": 0,
            "enable_status_when_start": 0,
            "trigger_status_when_start": 0,
            "trigger_status_while_enabled": 1,
            "trigger_status_while_disabled": 0,
            "accessory": "advanced_timer"
        }
    ],
    "platforms": [
        {
            "platform": "MiAqaraPlatform",
            "manage": {
                "port": 18582,
                "password": "<---hide personal infomation--->"
            },
            "gateways": {
                "04cf8cf206d8": {
                    "password": "<---hide personal infomation--->",
                    "ip": "192.168.xx.xx"
                }
            },
            "defaultValue": {
                "Global": {
                    "ignoreWriteResult": true,
                    "syncValue": true,
                    "disableNoResponse": false
                },
                "04cf8cf206d8": {
                    "AcPartner_Switch_JoinPermission": {
                        "name": "add new",
                        "serviceType": "Switch"
                    },
                    "AcPartner_LightSensor": {
                        "name": "light",
                        "serviceType": "Lightbulb",
                        "disable": true
                    }
                }
            }
        },
        {
            "platform": "XiaoMiAcPartner",
            "devices": {
                "192.168.xx.xx": "<---hide personal infomation--->"
            },
            "accessories": [
                {
                    "name": "fan",
                    "type": "switch",
                    "data": {
                        "on": "FE00000000000094701fff798205007827BF0026002E007F031F138821210221210202020202210321210221210202020202210321210221210202020202210321210221210202020202210321210221210202020202210321210221210202020202210321210221210202020202210321210221210202020202210321210221210202020202210321210221210202020202210499",
                        "off": "FE00000000000094701fff7D8205009027DB00240030007F02CC1388212102212102020202020223212102212102020202020223212102212102020202020223212102212102020202020223212102212102020202020223212102212102020202020223212102212102020202020223212102212102020202020223212102212102020202020223212102212102020202020223212102212102020202020223212102212102020202020224B9"
                    }
                }
            ]
        },
        {
            "name": "HomeBridge-UI",
            "port": 18581,
            "auth": "form",
            "theme": "indigo",
            "tempUnits": "c",
            "lang": "auto",
            "sudo": true,
            "platform": "config"
        },
        {
            "tvs": [
                {
                    "name": "TV",
                    "ip": "192.168.xx.xx",
                    "soundoutput": "speaker",
                    "applications": [
                        {
                            "title": "nPlayer"
                        },
                        {
                            "title": "Smart YouTube TV"
                        },
                        {
                            "title": "Kodi"
                        },
                        {
                            "title": "Twitch"
                        },
                        {
                            "title": "Aptoide TV"
                        }
                    ],
                    "sources": [
                        "extInput:hdmi",
                        "extInput:component",
                        "extInput:scart",
                        "extInput:cec",
                        "extInput:widi"
                    ]
                }
            ],
            "platform": "BraviaPlatform"
        },
        {
            "name": "Camera FFmpeg",
            "interfaceName": "bond0",
            "cameras": [
                {
                    "name": "Camera 1",
                    "manufacturer": "HIKVISION",
                    "model": "<---hide personal infomation--->",
                    "serialNumber": "<---hide personal infomation--->",
                    "firmwareRevision": "V5.6.5 build 200316",
                    "motion": true,
                    "motionTimeout": 1,
                    "unbridge": true,
                    "videoConfig": {
                        "source": "<---hide personal infomation--->",
                        "maxWidth": 0,
                        "maxHeight": 0,
                        "maxFPS": 0,
                        "forceMax": false,
                        "vcodec": "libx264",
                        "audio": true
                    }
                }
            ],
            "platform": "Camera-ffmpeg"
        },
        {
            "log_level": 2,
            "devices": [
                {
                    "headers": [
                        {
                            "key": "X-Session",
                            "value": "<---hide personal infomation--->"
                        }
                    ],
                    "location": "cn",
                    "model": "FeederMini",
                    "enable_http_retry": true,
                    "http_retry_count": 2,
                    "DropMeal_name": "DropMeal",
                    "MealAmount_name": "MealAmount",
                    "FoodStorage_name": "FoodStorage",
                    "DesiccantLevel_name": "DesiccantLevel",
                    "ManualLock_name": "ManualLock",
                    "LightMode_name": "LightMode",
                    "Battery_name": "Battery",
                    "enable_polling": true,
                    "polling_interval": 60,
                    "enable_desiccant": true,
                    "alert_desiccant_threshold": 7,
                    "enable_autoreset_desiccant": true,
                    "reset_desiccant_threshold": 5,
                    "enable_manualLock": true,
                    "enable_lightMode": true,
                    "reverse_foodStorage_indicator": true,
                    "fast_response": true
                }
            ],
            "platform": "petkit_feeder_mini"
        }
    ]
}

Screenshots: this is my system information: image

this is all the plugins that I installed: image

Environment:

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

redvegas commented 2 years ago

I am having this issue as well. any updates?

jmeross commented 1 year ago

I had the exact same error when trying to search for plugins. Even after a fresh install. I was trying WiFi only and Ethernet. But what I did to resolve was switch off my router and then switched the router on again. All working, I did a little celebration dance.

dsylex commented 1 year ago

if you're still having this issue, it's not Homebridge, but OS config related.

My solution:

  1. SSH into PI
  2. sudo nano /etc/sysctl.d/local.conf - this is a non-existing file at this point
  3. add a new line: net.ipv6.conf.all.disable_ipv6=1
  4. ctrl-x, y, enter - this will create the new file and save the modifications you just made
  5. sudo reboot

this solved it for me.

TL;DR: I could ping the resolved IP address but not registry.npmjs.org. Disabling IPv6 solved timeout issue as name resolution seemed to be behind the problem.

willfanguy commented 1 year ago

if you're still having this issue, it's not Homebridge, but OS config related.

My solution:

  1. SSH into PI
  2. sudo nano /etc/sysctl.d/local.conf - this is a non-existing file at this point
  3. add a new line: net.ipv6.conf.all.disable_ipv6=1
  4. ctrl-x, y, enter - this will create the new file and save the modifications you just made
  5. sudo reboot

this solved it for me.

TL;DR: I could ping the resolved IP address but not registry.npmjs.org. Disabling IPv6 solved timeout issue as name resolution seemed to be behind the problem.

I knew it was an ipv6 issue but didn't know how to fix it. So many thanks, @dsylex !!

jcrookwa commented 11 months ago

I am seeing the same issue with a RPI

System Info:

image

I was seeing this issue with my existing Homebridge, fresh installed SD card and seeing the same issues.

Error Messages:

image

The internet connection works perfectly fine. I have also tried the above IPv6 fix and this didn't seem to work.

Any help would be appreciated, I'm tearing my hair out over this

NorthernMan54 commented 11 months ago

Under the covers it is doing this for each of your plugins, and substituting the plugin name each time

wget https://registry.npmjs.org/@homebridge%2fnode-pty-prebuilt-multiarch

And also doing this for the Failed to check for NodeJS version

wget https://nodejs.org/dist/index.json

Do these commands work in your environment ?