homebridge / homebridge-config-ui-x

The Homebridge UI. Monitor, configure and backup Homebridge from a browser.

Home Page:https://homebridge.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')

anbie opened this issue · comments

Current Situation

I'm starting to get these in my log every few 20 min.

Failed to check registry.npmjs.org for updates: "Cannot read properties of undefined (reading 'length')"

I have not found a way to cure this. Things like npm clear cache did not help.

Logs

[24/06/2024, 14:38:49] [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, 14:38:49] [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.

Environment

  • OS: Linux homebridge 6.1.21-v8+
  • Software:
  • Node: v20.15.0
  • npm: 10.7.0

Process Supervisor

hb-service

Additional Context

No response

Over the weekend something changed on the npmjs.com site, and they have stopped supplying a documented field 'maintainers'.

  • NPM always add maintainers to package, now stopped.
  • Homebridge had a bug that checked maintainers.lenght before checking if it exists at all. It was fixes. homebridge/homebridge#2069
  • Homebridge check maintainers from latest stable release of plugin, and first of maintainers you see on plugin card next to heart icon.
  • So if plugin doesnt have any new release since 2-3 days (since npm does not add maintainers), everything works.

To summarize:

  • NPM error is that it does not add maintainers (since couple days).
  • The Homebridge UI error was that it checked how many maintainers, without checking if they were at all exist. And this suspended all npm functions, also responsible for checking the version, etc. If it weren't for that, the NPM error would only cause that there would be no author on the plugin card (only a heart icon and a @ sign because it is hardcoded).

To resolve:

  • Manually update homebridge UI to the latest version 4.56.3

Screenshot 2024-06-24 at 09 05 42

Works like a charm. All "Failed to check registry.npmjs.org" messages are gone. Thanks!

This should be closed as a duplicate of #2070

I think you can already unpin this Issue.