Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
anbie opened this issue Jun 24, 2024 · 5 comments
Labels

Comments

@anbie
Copy link

anbie commented Jun 24, 2024

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

@anbie anbie added the question label Jun 24, 2024
@NorthernMan54
Copy link
Contributor

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 Wont Wake 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

@NorthernMan54 NorthernMan54 pinned this issue Jun 24, 2024
@NorthernMan54 NorthernMan54 transferred this issue from homebridge/homebridge Jun 24, 2024
@NorthernMan54 NorthernMan54 pinned this issue Jun 24, 2024
@NorthernMan54
Copy link
Contributor

Pls add your upvotes to this issue on the npm side https://github.com/orgs/community/discussions/129220

https://github.com/orgs/community/discussions

@anbie
Copy link
Author

anbie commented Jun 24, 2024

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

@dkerr64
Copy link

dkerr64 commented Jun 24, 2024

This should be closed as a duplicate of #2070

@mkz212

This comment has been minimized.

@donavanbecker donavanbecker unpinned this issue Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants