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

Plugins tab not loading #284

Closed
henkhb opened this issue May 5, 2019 · 20 comments
Closed

Plugins tab not loading #284

henkhb opened this issue May 5, 2019 · 20 comments
Labels

Comments

@henkhb
Copy link

henkhb commented May 5, 2019

Hey,

tab is not loading (or after long waiting / refreshing)
Both of my installations are affected. Server down / slow?

If I restart container, it gives "Error loading Plugins: http error. Unknown error"

Regards
Hendrik

@afharo
Copy link

afharo commented May 5, 2019

Might be related to #280 ?

I can't see the list of plugins because I have the plugins installed in the local project folder (not npm -i g option)

@henkhb
Copy link
Author

henkhb commented May 5, 2019

I don't think so. Iam using the docker version and did not change the installation, only updated to actual version of ConfigUI. Same issue on both of my containers.

Both containers also have a news error during startup, that was not existing before the update:
Plugin /homebridge/node_modules/homebridge-lib package.json does not contain the keyword 'homebridge-plugin'.

Same error on both, but with different plugins.

@desq42
Copy link

desq42 commented May 6, 2019

…same here. Plugin-Tab not loading…

@fighterzg6
Copy link

…same here. Plugin-Tab not loading…
install 4.2.0 it works

@desq42
Copy link

desq42 commented May 6, 2019

…how do you downgrade to 4.2?

@fighterzg6
Copy link

sudo npm install -g --unsafe-perm homebridge-config-ui-x@4.2.0

@desq42
Copy link

desq42 commented May 6, 2019

downgraded. No cigar. Still no Plugin-Tab.

@fighterzg6
Copy link

restart the system, and wait any seconds

@oznu
Copy link
Member

oznu commented May 6, 2019

I'm having a hard time trying to figure this one out - I can't replicate this on any of the platforms I test on.

So far the only error I've seen that's relevant is this one from @henkhb in Slack:

npm registry: communication error ESOCKETTIMEDOUT on https://registry.npmjs.org/

The npm registry is also currently doing some strange things like not returning search results for some recently published packages which may be related:

https://status.npmjs.org/incidents/qg46dsfk1vt2

However, the code to return a list of plugins is not dependant on being able to reach the NPM registry; if it can't connect it just won't have extra metadata like the author, links to GitHub, update notifications etc. I've tested this by setting the timeout on the http calls to the registry to 1ms and watching them all fail, but the list of plugins is still returned (error messages about not being able to lookup plugin info is also logged correctly).

So I can try and figure out a pattern here, any users that are having these issues, can you please provide:

  • The Homebridge logs after you refresh the Plugins page showing any errors
  • A list of homebridge plugins you have installed using this command: npm -g list | grep "homebridge"

Also try the next version that adds a much shorter timeout to the registry calls (5 seconds, down from Linux default of 20-120 seconds):

sudo npm install -g --unsafe-perm homebridge-config-ui-x@next

@fighterzg6
Copy link

it works

@desq42
Copy link

desq42 commented May 6, 2019

same here. Works now. ( - homebridge-config-ui-x v4.3.1-beta.4)

@oznu
Copy link
Member

oznu commented May 6, 2019

Thanks @fighterzg6 @desq42 - are there any messages in the console like error ESOCKETTIMEDOUT while refreshing the plugin page?

@fighterzg6
Copy link

2019-5-6 14:22:58] [FritzBox-Drach8] Getting outlet 087610002503 energy consumption
[2019-5-6 14:22:58] [FritzBox-Drach8] Getting outlet 087610002503 temperature
[2019-5-6 14:23:04] [Alexa] alexaDiscovery - returned 78 devices
[2019-5-6 14:23:48] [FritzBox-Drach8] Updating guest WLAN
[2019-5-6 14:23:48] [FritzBox-Drach8] Getting guest WLAN state
[2019-5-6 14:23:58] [FritzBox-Drach8] Updating outlet 087610002504
[2019-5-6 14:23:58] [FritzBox-Drach8] Getting outlet 087610002504 state
[2019-5-6 14:23:58] [FritzBox-Drach8] Getting outlet 087610002504 power usage
[2019-5-6 14:23:58] [FritzBox-Drach8] Getting outlet 087610002504 in use
[2019-5-6 14:23:58] [FritzBox-Drach8] Getting outlet 087610002504 energy consumption
[2019-5-6 14:23:58] [FritzBox-Drach8] Getting outlet 087610002504 temperature
[2019-5-6 14:23:58] [FritzBox-Drach8] Updating outlet 087610002503
[2019-5-6 14:23:58] [FritzBox-Drach8] Getting outlet 087610002503 state
[2019-5-6 14:23:58] [FritzBox-Drach8] Getting outlet 087610002503 power usage
[2019-5-6 14:23:58] [FritzBox-Drach8] Getting outlet 087610002503 in use
[2019-5-6 14:23:58] [FritzBox-Drach8] Getting outlet 087610002503 energy consumption
[2019-5-6 14:23:58] [FritzBox-Drach8] Getting outlet 087610002503 temperature
[2019-5-6 14:24:04] [Alexa] alexaDiscovery - returned 78 devices
[2019-5-6 14:24:34] [homebridge-config-ui-x] Error: ESOCKETTIMEDOUT
[2019-5-6 14:24:34] [homebridge-config-ui-x] Error: ESOCKETTIMEDOUT
[2019-5-6 14:24:35] [homebridge-config-ui-x] Error: ESOCKETTIMEDOUT
[2019-5-6 14:24:37] [homebridge-config-ui-x] Error: ESOCKETTIMEDOUT
[2019-5-6 14:24:38] [homebridge-config-ui-x] Error: ESOCKETTIMEDOUT
[2019-5-6 14:24:40] [homebridge-config-ui-x] Error: ESOCKETTIMEDOUT
[2019-5-6 14:24:48] [FritzBox-Drach8] Updating guest WLAN
[2019-5-6 14:24:48] [FritzBox-Drach8] Getting guest WLAN state
[2019-5-6 14:24:57] [homebridge-config-ui-x] Error: ESOCKETTIMEDOUT
[2019-5-6 14:24:58] [FritzBox-Drach8] Updating outlet 087610002504
[2019-5-6 14:24:58] [FritzBox-Drach8] Getting outlet 087610002504 state
[2019-5-6 14:24:58] [FritzBox-Drach8] Getting outlet 087610002504 power usage
[2019-5-6 14:24:58] [FritzBox-Drach8] Getting outlet 087610002504 in use
[2019-5-6 14:24:58] [FritzBox-Drach8] Getting outlet 087610002504 energy consumption
[2019-5-6 14:24:58] [FritzBox-Drach8] Getting outlet 087610002504 temperature
[2019-5-6 14:24:58] [FritzBox-Drach8] Updating outlet 087610002503
[2019-5-6 14:24:58] [FritzBox-Drach8] Getting outlet 087610002503 state
[2019-5-6 14:24:58] [FritzBox-Drach8] Getting outlet 087610002503 power usage
[2019-5-6 14:24:58] [FritzBox-Drach8] Getting outlet 087610002503 in use
[2019-5-6 14:24:58] [FritzBox-Drach8] Getting outlet 087610002503 energy consumption
[2019-5-6 14:24:58] [FritzBox-Drach8] Getting outlet 087610002503 temperature
[2019-5-6 14:24:59] [homebridge-config-ui-x] Error: ESOCKETTIMEDOUT
[2019-5-6 14:25:01] [homebridge-config-ui-x] Error: ESOCKETTIMEDOUT
[2019-5-6 14:25:02] [homebridge-config-ui-x] Error: ESOCKETTIMEDOUT
[2019-5-6 14:25:04] [Alexa] alexaDiscovery - returned 78 devices
[2019-5-6 14:25:09] [homebridge-config-ui-x] Error: ESOCKETTIMEDOUT
pi : TTY=pts/3 ; PWD=/var/homebridge ; USER=root ; COMMAND=/bin/journalctl -o cat -n 500 -f -u homebridge
pam_unix(sudo:session): session opened for user root by (uid=0)

@fighterzg6
Copy link

yes

@oznu
Copy link
Member

oznu commented May 6, 2019

@fighterzg6 - this is good! It means the problem was what I suspected - the npm registry is being slow to respond.

@fighterzg6
Copy link

ok, whatever you say

@afharo
Copy link

afharo commented May 6, 2019

same here. Works now. ( - homebridge-config-ui-x v4.3.1-beta.4)

It didn't fix it for me. I'm just receiving an empty list of plugins after line: https://github.com/oznu/homebridge-config-ui-x/blob/master/src/modules/plugins/plugins.service.ts#L60

My installation is local (using npm i instead of npm i -g because I've got my project defined in a package.json for easier portability).

It used to work but stopped working after version 4.x.x.

I've added my local node_modules folders to the initialisation of paths in this line: https://github.com/oznu/homebridge-config-ui-x/blob/master/src/modules/plugins/plugins.service.ts#L424 and it works. Is there any way to also check the local node_module folder (the same where this module is installed)?

===UPDATE===
I've been looking further and the reason is because https://github.com/oznu/homebridge-config-ui-x/blob/master/src/modules/plugins/plugins.service.ts#L427:
paths = paths.concat(require.main.paths); is compiled by webpack to paths = paths.concat(__webpack_require__.c[__webpack_require__.s].paths), which is undefined. I've manually changed that webpack replacement back to require.main.paths and it works perfectly!

@oznu
Copy link
Member

oznu commented May 7, 2019

@afharo - thanks for discovering that, it will be fixed next release.

@oznu
Copy link
Member

oznu commented May 7, 2019

The timeout issue and @afharo issue is now published in 4.4.0.

@oznu oznu closed this as completed May 7, 2019
@oznu oznu added the bug label May 7, 2019
@afharo
Copy link

afharo commented May 10, 2019

Thank you! It works like a charm!

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