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 Inaccessible via UI. Plugins all work #657

Closed
TransRapid opened this issue May 1, 2020 · 8 comments
Closed

Plugins Inaccessible via UI. Plugins all work #657

TransRapid opened this issue May 1, 2020 · 8 comments
Labels

Comments

@TransRapid
Copy link

TransRapid commented May 1, 2020

UI suddenly begins to have an error with no changes in system updates, plugins, config, or network changes. Nothing has changed at all, yet suddenly plugins cannot be viewed, searched, or updated. The homepage in the browser shows all up to date, which is entirely wrong. Since have updated plugins manually. Command line shows everything fine. Everything was manually updated today to see if this resolved any issues, which it did not. All the features work fine as well; but the UI can't do anything related to plugins, even though it displays them fine in the devices list.

localhost:8080

Below are the errors I receive on their respective pages.

Home: > allModules.push is not iterable (cannot read property Symbol(Symbol.iterator)

Plugins: > Error Failed to load plugins: Http failure response for http://localhost:8080/api/plugins: 500 Internal Server Error

�[0;37m[4/30/2020, 9:53:49 PM] �[0m�[0;36m[Config]�[0m Homebridge restart request received
�[0;37m[4/30/2020, 9:53:49 PM] �[0m�[0;36m[Config]�[0m No restart command defined, killing process...
[4/30/2020, 9:53:49 PM] Got SIGTERM, shutting down Homebridge...
[4/30/2020, 9:53:55 PM] Loaded config.json with 1 accessories and 4 platforms.
[4/30/2020, 9:53:55 PM] ---
[4/30/2020, 9:53:56 PM] Loaded plugin: homebridge-chamberlain
[4/30/2020, 9:53:56 PM] Registering accessory 'homebridge-chamberlain.Chamberlain'
[4/30/2020, 9:53:56 PM] ---
[4/30/2020, 9:53:56 PM] Loaded plugin: homebridge-config-ui-x
[4/30/2020, 9:53:56 PM] Registering platform 'homebridge-config-ui-x.config'
[4/30/2020, 9:53:56 PM] ---
[4/30/2020, 9:54:01 PM] Loaded plugin: homebridge-dafang
[4/30/2020, 9:54:01 PM] Registering platform 'homebridge-dafang.Dafang'
[4/30/2020, 9:54:01 PM] ---
[4/30/2020, 9:54:02 PM] Loaded plugin: homebridge-gsh
[4/30/2020, 9:54:02 PM] Registering platform 'homebridge-gsh.google-smarthome'
[4/30/2020, 9:54:02 PM] ---
[4/30/2020, 9:54:04 PM] Loaded plugin: homebridge-ifttt
[4/30/2020, 9:54:04 PM] Registering platform 'homebridge-ifttt.IFTTT'
[4/30/2020, 9:54:04 PM] ---
[4/30/2020, 9:54:04 PM] Loading 4 platforms...
[4/30/2020, 9:54:04 PM] [Config] Initializing config platform...
[4/30/2020, 9:54:04 PM] [Config] Spawning homebridge-config-ui-x with PID 6528
[4/30/2020, 9:54:04 PM] [Dafang] Initializing Dafang platform...
[4/30/2020, 9:54:04 PM] [Dafang] MQTT Disabled.
[4/30/2020, 9:54:04 PM] [Dafang] MQTT Service Initialised
[4/30/2020, 9:54:04 PM] [Dafang] Configuring Dafang Accessory : Reset FFMPEG Switch
[4/30/2020, 9:54:04 PM] [Dafang] Configuring Dafang Accessory : Reset FFMPEG Switch
[4/30/2020, 9:54:04 PM] [IFTTT] Initializing IFTTT platform...
[4/30/2020, 9:54:04 PM] [IFTTT] Loading accessories...
[4/30/2020, 9:54:04 PM] [IFTTT] Found: FBIM
[4/30/2020, 9:54:04 PM] [IFTTT] Loading service: Battery Alert, subtype: HB-Battery-AlertHB-Battery-Dismiss, RestoredState: false
[4/30/2020, 9:54:04 PM] [IFTTT] Found: GV-Call
[4/30/2020, 9:54:04 PM] [IFTTT] Loading service: GV-Call, subtype: undefinedGV-Call-Dismiss, RestoredState: false
[4/30/2020, 9:54:04 PM] Initializing platform accessory 'FBIM'...
[4/30/2020, 9:54:04 PM] Initializing platform accessory 'GV-Call'...
[4/30/2020, 9:54:04 PM] [Google Smart Home] Initializing google-smarthome platform...
[4/30/2020, 9:54:04 PM] Loading 1 accessories...
[4/30/2020, 9:54:04 PM] [Garage Gate] Initializing Chamberlain accessory...
[4/30/2020, 9:54:04 PM] One of your plugins incorrectly registered an external accessory using the platform name (Dafang) and not the plugin identifier. Please report this to the developer!
[4/30/2020, 9:54:04 PM] Sully is running on port 52206.
[4/30/2020, 9:54:04 PM] Please add [Sully] manually in Home app. Setup Code: 140-11-040
[4/30/2020, 9:54:04 PM] Driveway is running on port 52207.
[4/30/2020, 9:54:04 PM] Please add [Driveway] manually in Home app. Setup Code: 140-11-040
[4/30/2020, 9:54:13 PM] Initializing platform accessory 'Reset Sully'...
[4/30/2020, 9:54:13 PM] Initializing platform accessory 'Reset Driveway'...
Setup Payload:
X-HM://OMITTED
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
CODE OMITTED
    └────────────┘     
                       
[4/30/2020, 9:54:13 PM] Homebridge is running on port 51822.
[4/30/2020, 9:54:13 PM] [Google Smart Home] Connected (1) - wss://homebridge-gsh.iot.oz.nu
�[0;37m[4/30/2020, 9:54:21 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Started
�[0;37m[4/30/2020, 9:54:22 PM] �[0m�[0;36m[Config]�[0m �[0;33mHomebridge Config UI X v4.17.1 is listening on :: port 8080�[0m
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username 7C:6D:62:8B:F5:3A
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing 7C:6D:62:8B:F5:3A via http://10.0.1.10:51822/accessories
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username 8D:28:76:62:4B:1F
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing 8D:28:76:62:4B:1F via http://10.0.1.10:52207/accessories
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username 71:71:82:4D:F7:93
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing 71:71:82:4D:F7:93 via http://10.0.1.10:52206/accessories
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username BE:3A:4A:FB:4F:06
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing BE:3A:4A:FB:4F:06 via http://10.0.1.4:8080/accessories
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username 8B:B5:15:B0:35:27
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing 8B:B5:15:B0:35:27 via http://10.0.1.16:37538/accessories
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username EE:CA:EF:A4:5F:0E
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing EE:CA:EF:A4:5F:0E via http://10.0.1.104:57350/accessories
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username 45:CA:F1:E0:89:DA
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing 45:CA:F1:E0:89:DA via http://10.0.1.15:33655/accessories
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username C1:FD:B8:B2:24:DB
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing C1:FD:B8:B2:24:DB via http://10.0.1.12:57806/accessories
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username 48:CF:D3:CE:EB:23
�[0;37m[4/30/2020, 9:54:23 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing 48:CF:D3:CE:EB:23 via http://10.0.1.94:1200/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username 25:FE:8F:AA:75:AD
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing 25:FE:8F:AA:75:AD via http://10.0.1.11:41055/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username ED:F9:2B:4C:02:4D
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing ED:F9:2B:4C:02:4D via http://10.0.1.8:6517/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username 1A:9E:8E:EF:1C:43
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing 1A:9E:8E:EF:1C:43 via http://10.0.1.103:38316/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Success 7C:6D:62:8B:F5:3A via http://10.0.1.10:51822/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Failed BE:3A:4A:FB:4F:06 via http://10.0.1.4:8080/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Could not register to device with username BE:3A:4A:FB:4F:06
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Success 8D:28:76:62:4B:1F via http://10.0.1.10:52207/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Success 71:71:82:4D:F7:93 via http://10.0.1.10:52206/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Failed 45:CA:F1:E0:89:DA via http://10.0.1.15:33655/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Could not register to device with username 45:CA:F1:E0:89:DA
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Failed 8B:B5:15:B0:35:27 via http://10.0.1.16:37538/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Could not register to device with username 8B:B5:15:B0:35:27
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: [10.0.1.10:51822 (7C:6D:62:8B:F5:3A)] Instance Registered
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: [10.0.1.10:52207 (8D:28:76:62:4B:1F)] Instance Registered
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: [10.0.1.10:52206 (71:71:82:4D:F7:93)] Instance Registered
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Failed 25:FE:8F:AA:75:AD via http://10.0.1.11:41055/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Could not register to device with username 25:FE:8F:AA:75:AD
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Failed EE:CA:EF:A4:5F:0E via http://10.0.1.104:57350/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Could not register to device with username EE:CA:EF:A4:5F:0E
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Failed 1A:9E:8E:EF:1C:43 via http://10.0.1.103:38316/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Could not register to device with username 1A:9E:8E:EF:1C:43
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Failed C1:FD:B8:B2:24:DB via http://10.0.1.12:57806/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Could not register to device with username C1:FD:B8:B2:24:DB
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Failed ED:F9:2B:4C:02:4D via http://10.0.1.8:6517/accessories
�[0;37m[4/30/2020, 9:54:24 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Could not register to device with username ED:F9:2B:4C:02:4D
�[0;37m[4/30/2020, 9:54:25 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Found HAP device with username 1D:6D:F0:2D:F6:5C
�[0;37m[4/30/2020, 9:54:25 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Testing 1D:6D:F0:2D:F6:5C via http://10.0.1.90:39748/accessories
�[0;37m[4/30/2020, 9:54:25 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Failed 48:CF:D3:CE:EB:23 via http://10.0.1.94:1200/accessories
�[0;37m[4/30/2020, 9:54:25 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Could not register to device with username 48:CF:D3:CE:EB:23
�[0;37m[4/30/2020, 9:54:25 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Failed 1D:6D:F0:2D:F6:5C via http://10.0.1.90:39748/accessories
�[0;37m[4/30/2020, 9:54:25 PM] �[0m�[0;36m[Config]�[0m [HapClient] Discovery :: Could not register to device with username 1D:6D:F0:2D:F6:5C
[4/30/2020, 9:54:38 PM] [Google Smart Home] Finished instance discovery

Homebridge Config:

Config has been left out for privacy reasons. Lot's of info to omit otherwise, config has not changed since this error began occurring, and seems to be an issue only with the UI

Environment:
Config-UI-X
Node.js Version: 12.16.3
NPM Version: 6.14.4
Homebridge Version: 1.0.4
Homebridge Config UI X Version: 4.17.1
macOS 10.13.6
launchctl

@oznu
Copy link
Member

oznu commented May 1, 2020

This seems odd.

Can you install @test and show me the debug logs this will now display when attempting to go to the plugins page? I've made a small change to add some very verbose logging into this section to see what is wrong.

https://github.com/oznu/homebridge-config-ui-x/wiki/How-To-Test-Upcoming-Changes

@TransRapid
Copy link
Author

TransRapid commented May 2, 2020

Sorry for the delay in reply. Updating to test version resolved it entirely. I’m wondering if there was some permission issue... I went through 24 hours of logs prior to updating, and the only thing I could find that was unordinary was a comment an access error to AccessoryInfo JSON in my persist folder. My only guess is that a plug-in or even the GUI here was updated, needed a newer version of node, but then using some cache that allowed the issue to go unnoticed until it wrote something weird not being on the right version.

I didn’t update my NPM or Node until after I noticed the issue, but first updated all HomeBridge plugins including yours. Maybe the reinstall now corrected outdated files in a way it couldn’t with the older version of Node? If you want I can revert it to the latest stable and see if that causes it to happen again, otherwise going to leave it here for now as it’s working.

@TransRapid
Copy link
Author

TransRapid commented May 2, 2020

Figured it was worth it for your development, and now also got a more detailed error message. Error wasn’t showing initially. Looks like it is reading my node_modules folder.

Plugins Page

MODULE: .DS_Store
MODULE: .bin
MODULE: @hoobs.zip
TypeError: allModules.push is not iterable (cannot read property Symbol(Symbol.iterator))
    at PluginsService.<anonymous> (/usr/local/lib/node_modules/homebridge-config-ui-x/dist/main.js:1585:40)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/homebridge-config-ui-x/dist/main.js:1177:58)
MODULE: bufferutil
MODULE: homebridge
MODULE: homebridge-chamberlain
MODULE: homebridge-config-ui-x
MODULE: homebridge-dafang
MODULE: homebridge-gsh
MODULE: homebridge-ifttt
MODULE: n
MODULE: npm
MODULE: utf-8-validate
MODULE: .DS_Store
MODULE: .bin
MODULE: @hoobs.zip
TypeError: allModules.push is not iterable (cannot read property Symbol(Symbol.iterator))
    at PluginsService.<anonymous> (/usr/local/lib/node_modules/homebridge-config-ui-x/dist/main.js:1585:40)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/homebridge-config-ui-x/dist/main.js:1177:58)
MODULE: bufferutil
MODULE: homebridge
MODULE: homebridge-chamberlain
MODULE: homebridge-config-ui-x
MODULE: homebridge-dafang
MODULE: homebridge-gsh
MODULE: homebridge-ifttt
MODULE: n
MODULE: npm
MODULE: utf-8-validate
MODULE: .DS_Store
MODULE: .bin
MODULE: @hoobs.zip
TypeError: allModules.push is not iterable (cannot read property Symbol(Symbol.iterator))
    at PluginsService.<anonymous> (/usr/local/lib/node_modules/homebridge-config-ui-x/dist/main.js:1585:40)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/homebridge-config-ui-x/dist/main.js:1177:58)
MODULE: bufferutil
MODULE: homebridge
MODULE: homebridge-chamberlain
MODULE: homebridge-config-ui-x
MODULE: homebridge-dafang
MODULE: homebridge-gsh
MODULE: homebridge-ifttt
MODULE: n
MODULE: npm
MODULE: utf-8-validate

@oznu
Copy link
Member

oznu commented May 2, 2020

Delete this:

/usr/local/lib/node_modules/@hoobs.zip

@TransRapid
Copy link
Author

I actually did cleanup that folder, hasn’t been an issue in there. Looking into the message below, I am thinking it is a simple fix via chown as it only appears when running Homebridge as local user, but not as root:

Error: EACCES: permission denied, open '/Users/Michael/.homebridge/persist/AccessoryInfo.7171824DF793.json'
    at Object.openSync (fs.js:458:3)
    at Object.writeFileSync (fs.js:1279:35)
    at LocalStorage.persistKeySync (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/node-persist/src/local-storage.js:476:16)
    at LocalStorage.setItemSync (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/node-persist/src/local-storage.js:277:14)
    at AccessoryInfo.save (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/model/AccessoryInfo.ts:223:26)
    at Accessory._this.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:909:25)
    at /usr/local/lib/node_modules/homebridge/src/server.ts:588:20
    at Array.forEach (<anonymous>)
    at Server.handlePublishExternalAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:547:17)
    at HomebridgeAPI.emit (events.js:310:20)

@oznu
Copy link
Member

oznu commented May 2, 2020

Yeah., something like this should fix it:

sudo chown -R michael: /Users/Michael/.homebridge

@TransRapid
Copy link
Author

Exactly what I did, seemed to fix it. Going to close this as the initial issue here seems to be resolved. Thanks for the help, going to keep running this version with extensive logs for now.

oznu added a commit that referenced this issue May 3, 2020
@oznu
Copy link
Member

oznu commented May 3, 2020

The UI will now handle bad files like @hoobs.zip in the node_modules folder.

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

2 participants