Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

[Bug]: Matterbridge Add-on Not Starting After 2.6.0 Update #262

Closed
chalk-hwang opened this issue Aug 13, 2024 · 20 comments · Fixed by #263
Closed

[Bug]: Matterbridge Add-on Not Starting After 2.6.0 Update #262

chalk-hwang opened this issue Aug 13, 2024 · 20 comments · Fixed by #263
Labels
bug Something isn't working

Comments

@chalk-hwang
Copy link

chalk-hwang commented Aug 13, 2024

What happened?

After updating the Home Assistant add-on, it terminates with the following error. Suspecting that an error might have occurred during the update process, I tried removing the add-on, deleting the configuration values from addon_config, completely rebooting the Home Assistant OS, and reinstalling the add-on, but the issue persists.

image

Your configuration

include_domains: []
include_patterns: []
include_labels: []
include_platforms:
-  hue
-  mqtt
exclude_domains: 
-  scene
exclude_patterns: 
-  *.home*
exclude_labels: []
exclude_platforms: []
frontend_port: 8283
matter_port: 5540
overrides: |
  {
    "domains": {
    },
    "entities": {
    }
  }

Relevant log output

[03:59:08.303] [MatterConnector] Failed to register device for sensor.macmini_tx_2
[03:59:08.303] [MatterConnector] Error: Device class "data_rate" for domain "sensor" is not supported!
[03:59:08.303] [MatterConnector] Failed to register device for sensor.kepco_energy_meter_energy_monthly_last_month
[03:59:08.303] [MatterConnector] Error: Device class "energy" for domain "sensor" is not supported!
[03:59:08.303] [MatterConnector] Failed to register device for sensor.kepco_energy_meter_energy_monthly_2_months_ago
[03:59:08.303] [MatterConnector] Error: Device class "energy" for domain "sensor" is not supported!
[03:59:08.304] [MatterConnector] Failed to register device for sensor.kepco_energy_meter_energy_monthly_2_months_ago_2
[03:59:08.304] [MatterConnector] Error: Device class "energy" for domain "sensor" is not supported!
[03:59:08.304] [MatterConnector] Failed to register device for sensor.kepco_energy_meter_energy_monthly_1_month
[03:59:08.304] [MatterConnector] Error: Device class "energy" for domain "sensor" is not supported!
[03:59:08.304] [MatterConnector] Failed to register device for sensor.kepco_energy_meter_kwhto_kwh
[03:59:08.304] [MatterConnector] Error: Device class "energy" for domain "sensor" is not supported!
[03:59:08.310] [Matterbridge] Added and registered bridged device (113/113) Entrance Occupancy (MA-occupancysensor) for plugin matterbridge-home-assistant
[03:59:08.317] [Matterbridge] Added and registered bridged device (114/114) Dressing Room Occupancy (MA-occupancysensor) for plugin matterbridge-home-assistant
[03:59:08.322] [Matterbridge] Added and registered bridged device (115/115) Bathroom Occupancy (MA-occupancysensor) for plugin matterbridge-home-assistant
[03:59:08.329] [Matterbridge] Added and registered bridged device (116/116) Mini Bathroom Occupancy (MA-occupancysensor) for plugin matterbridge-home-assistant
[03:59:08.334] [Matterbridge] Added and registered bridged device (117/117) Utility Room Occupancy (MA-occupancysensor) for plugin matterbridge-home-assistant
[03:59:08.341] [Matterbridge] Added and registered bridged device (118/118) Laundry Room Occupancy (MA-occupancysensor) for plugin matterbridge-home-assistant
[03:59:08.347] [Matterbridge] Added and registered bridged device (119/119) Zigbee2MQTT Bridge Connection state (MA-contactsensor) for plugin matterbridge-home-assistant
[03:59:08.352] [Matterbridge] Added and registered bridged device (120/120) Bathroom Exhaust Fan (MA-dimmablepluginunit) for plugin matterbridge-home-assistant
[03:59:08.360] [Matterbridge] Added and registered bridged device (121/121) Mini Bathroom Exhaust Fan (MA-dimmablepluginunit) for plugin matterbridge-home-assistant
[03:59:08.365] [Matterbridge] Added and registered bridged device (122/122) Living Room Sub Light (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.370] [Matterbridge] Added and registered bridged device (123/123) Living Room Indirect Light (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.375] [Matterbridge] Added and registered bridged device (124/124) Living Room Main Light (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.381] [Matterbridge] Added and registered bridged device (125/125) Living Room Down Lamp (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.386] [Matterbridge] Added and registered bridged device (126/126) Host Bedroom Main Light (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.392] [Matterbridge] Added and registered bridged device (127/127) Mate Bedroom Main Light (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.397] [Matterbridge] Added and registered bridged device (128/128) Bathroom Main Light (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.404] [Matterbridge] Added and registered bridged device (129/129) Mini Bathroom Main Light (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.410] [Matterbridge] Added and registered bridged device (130/130) Laundry Room Main Light (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.414] [Matterbridge] Added and registered bridged device (131/131) Dressing Room Main Light (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.419] [Matterbridge] Added and registered bridged device (132/132) Utiltity Room Main Light (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.427] [Matterbridge] Added and registered bridged device (133/133) Kitchen Main Light (MA-onofflight) for plugin matterbridge-home-assistant
[03:59:08.427] [MatterConnector] Failed to register device for sensor.host_bedroom_smart_plug_energy
[03:59:08.427] [MatterConnector] Error: Device class "energy" for domain "sensor" is not supported!
[03:59:08.427] [MatterConnector] Failed to register device for sensor.host_bedroom_smart_plug_power
[03:59:08.427] [MatterConnector] Error: Device class "power" for domain "sensor" is not supported!
[03:59:08.428] [MatterConnector] Failed to register device for sensor.home_energy_monitor_current
[03:59:08.428] [MatterConnector] Error: Device class "current" for domain "sensor" is not supported!
[03:59:08.428] [MatterConnector] Failed to register device for sensor.home_energy_monitor_energy
[03:59:08.428] [MatterConnector] Error: Device class "energy" for domain "sensor" is not supported!
[03:59:08.428] [MatterConnector] Failed to register device for sensor.home_energy_monitor_power
[03:59:08.428] [MatterConnector] Error: Device class "power" for domain "sensor" is not supported!
[03:59:08.428] [MatterConnector] Failed to register device for sensor.home_energy_monitor_voltage
[03:59:08.428] [MatterConnector] Error: Device class "voltage" for domain "sensor" is not supported!
[03:59:08.429] [MatterConnector] Failed to register device for sensor.zigbee2mqtt_bridge_permit_join_timeout
[03:59:08.429] [MatterConnector] Error: Device class "duration" for domain "sensor" is not supported!
[03:59:08.429] [MatterConnector] Failed to register device for sensor.zigbee2mqtt_bridge_version
[03:59:08.429] [MatterConnector] Error: Device class "<unknown>" for domain "sensor" is not supported!
[03:59:08.434] [Matterbridge] Added and registered bridged device (134/134) Host Bedroom Smart Plug (MA-onoffpluginunit) for plugin matterbridge-home-assistant
[03:59:08.441] [Matterbridge] Added and registered bridged device (135/135) Host Bedroom Cabinet (MA-contactsensor) for plugin matterbridge-home-assistant
[03:59:08.450] [Matterbridge] Added and registered bridged device (136/136) Host Bedroom Door (MA-contactsensor) for plugin matterbridge-home-assistant
[03:59:08.456] [Matterbridge] Added and registered bridged device (137/137) Entrance Door (MA-contactsensor) for plugin matterbridge-home-assistant
[03:59:08.463] [Matterbridge] Added and registered bridged device (138/138) Living Room Window (MA-contactsensor) for plugin matterbridge-home-assistant
[03:59:08.476] [Matterbridge] Added and registered bridged device (139/139) Dressing Room Cabinet (MA-contactsensor) for plugin matterbridge-home-assistant
[03:59:08.476] [PluginManager] Started plugin matterbridge-home-assistant type DynamicPlatform
[03:59:08.575] [Matterbridge] Matter server started
[03:59:08.624] [Matterbridge] The commissioning server on port 5540 for Matterbridge is not commissioned. Pair it scanning the QR code:


▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█ ▄▄▄▄▄ ██▀▄█▄█ ▄▄▄▄▄ █
█ █   █ █▄▀▄ ▀█ █   █ █
█ █▄▄▄█ ██ ▀▀▄█ █▄▄▄█ █
█▄▄▄▄▄▄▄█ █ ▀▄█▄▄▄▄▄▄▄█
█▄▄▄█▄▄▄  ▀▄ █▄ ███ █▀█
█▀ █▄ ▀▄▀█▄▄▀ █▄▀▄ ▀█▀█
█▄▄█▄▄▄▄▄▄▀▀█▀██ ▄▄▀▄▀█
█ ▄▄▄▄▄ █ █▄▀  ▄█▄▄ █ █
█ █   █ █▄█▀▄▀ █ ▀▄ ▀██
█ █▄▄▄█ █  █▀ ▄▄▀█  ▀ █
█▄▄▄▄▄▄▄█▄█▄▄▄█▄▄██▄█▄█
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀


[03:59:08.625] [Matterbridge] Matterbridge

qrPairingCode: MT:Y.K90SO527HEMM5SQ10

Manual pairing code: 20639949219

file:///usr/local/lib/node_modules/matterbridge/dist/matterbridge.js:2481
            this.log.debug(`WebSocketServer logger global callback: ${this.log.getGlobalCallback() ? 'active' : 'inactive'}`);
                                                                               ^

TypeError: this.log.getGlobalCallback is not a function
    at file:///usr/local/lib/node_modules/matterbridge/dist/matterbridge.js:2481:80

Node.js v18.20.3
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Version

2.6.0

@chalk-hwang chalk-hwang added the bug Something isn't working label Aug 13, 2024
@chalk-hwang chalk-hwang changed the title [Bug]: [Bug]: Matterbridge Home Assistant Add-on Not Starting After 2.6.0 Update Aug 13, 2024
@chalk-hwang chalk-hwang changed the title [Bug]: Matterbridge Home Assistant Add-on Not Starting After 2.6.0 Update [Bug]: Home Assistant Add-on Not Starting After 2.6.0 Update Aug 13, 2024
@chalk-hwang chalk-hwang changed the title [Bug]: Home Assistant Add-on Not Starting After 2.6.0 Update [Bug]: Matterbridge Add-on Not Starting After 2.6.0 Update Aug 13, 2024
@t0bst4r
Copy link
Owner

t0bst4r commented Aug 13, 2024

Okay, I see several things there:

  1. the errors in the logs (above the QR code) happen because you have sensor entities included which are not fully supported yet. This is not a problem and not a reason for there actual Error at the end, but it should be a warning instead.
  2. the actual error looks like a bug in matterbridge itself. Could you please try to exclude the sensor domain to see if it’s related to the change, or if it happens anyway.

@chalk-hwang
Copy link
Author

Is this the configuration you wanted to test with?
With the above configuration, the unsupported entity warnings have disappeared, but the same error still occurs.

include_domains: []
include_patterns: []
include_labels: []
include_platforms: []
exclude_domains:
  - sensor
exclude_patterns: []
exclude_labels: []
exclude_platforms: []
frontend_port: 8283
matter_port: 5540
overrides: |
  {
    "domains": {
    },
    "entities": {
    }
  }

file:///usr/local/lib/node_modules/matterbridge/dist/matterbridge.js:2481
            this.log.debug(`WebSocketServer logger global callback: ${this.log.getGlobalCallback() ? 'active' : 'inactive'}`);
                                                                               ^

TypeError: this.log.getGlobalCallback is not a function
    at file:///usr/local/lib/node_modules/matterbridge/dist/matterbridge.js:2481:80

Node.js v18.20.3
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

@tammeryousef1006
Copy link

tammeryousef1006 commented Aug 13, 2024

can you fix it asap ? i lost functions because cant run , I didn't toke backup before upgrade and I regret it

@chalk-hwang
Copy link
Author

chalk-hwang commented Aug 14, 2024

👆 See pull request link above

Issue caused by node-ansi-logger dependency update to v2.0.7 used in Matterbridge.

@t0bst4r
Copy link
Owner

t0bst4r commented Aug 14, 2024

@tammeryousef1006 since this is a bug with matterbridge we need to wait for the pull request to be merged and published.
Due to the architecture of matterbridge we cannot pin its dependencies to specific versions to exclude the broken version. We need to wait.

I’ll keep this issue open for others to find it.

@t0bst4r
Copy link
Owner

t0bst4r commented Aug 14, 2024

Interestingly I couldn’t reproduce it with my local development environment. Even with explicitly upgrading to the broken version…

anyway I have added an ugly hotfix which patches the NodeAnsiLogger to work both ways (the static and non-static way).

could someone please upgrade to 2.6.1 and test?

@tammeryousef1006
Copy link

thanks , i upgrade to 2.6.1 and GUI frontend came up , its running

@tammeryousef1006
Copy link

tammeryousef1006 commented Aug 14, 2024

got this after adding some temp and humd sensors

}
#############################
CLI: Matterbridge.loadInstance() failed with error: Error: [node-persist][readFile] /root/.matterbridge/storage/.matterbridge/d01917a070027b55bce538a96fa2004f061de6fe1644f402a321c6db8c71b9ba does not look like a valid storage file!
CLI: Matterbridge.loadInstance() failed with error: Error: [node-persist][readFile] /root/.matterbridge/storage/.matterbridge/d01917a070027b55bce538a96fa2004f061de6fe1644f402a321c6db8c71b9ba does not look like a valid storage file!
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------

 Add-on: Matterbridge
 Populate your Home Assistant instance as Matter Bridge.
-----------------------------------------------------------
 Add-on version: 2.6.1-116
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.4  (amd64 / qemux86-64)
 Home Assistant Core: 2024.8.1
 Home Assistant Supervisor: 2024.08.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
#############################
CURRENT CONFIGURATION:
{
  "homeAssistant": {
    "url": "http://supervisor/core",
    "accessToken": "...",
    "matcher": {
      "includeDomains": [],
      "excludeDomains": [],
      "includePatterns": [
        "lock.doorlock",
        "binary_sensor.kids_motion_occupancy",
        "binary_sensor.bedroom_bathroom_door_opening",
        "switch.my_pc",
        "sensor.main_door_temperature",
        "sensor.tvroom_door_temperature",
        "sensor.rm4living_temperature",
        "sensor.rm4living_humidity",
        "sensor.rm4mini_humidity",
        "sensor.rm4mini_temperature",
        "sensor.rmpro_humidity",
        "sensor.rmpro_temperature"
      ],
      "excludePatterns": [],
      "includeLabels": [],
      "excludeLabels": [],
      "includePlatforms": [],
      "excludePlatforms": []
    }
  },
  "overrides": {
    "domains": {},
    "entities": {}
  }
}
#############################

@tammeryousef1006
Copy link

crashed again

@tammeryousef1006
Copy link

}
#############################
CLI: Matterbridge.loadInstance() failed with error: Error: [node-persist][readFile] /root/.matterbridge/storage/.matterbridge/d01917a070027b55bce538a96fa2004f061de6fe1644f402a321c6db8c71b9ba does not look like a valid storage file!
CLI: Matterbridge.loadInstance() failed with error: Error: [node-persist][readFile] /root/.matterbridge/storage/.matterbridge/d01917a070027b55bce538a96fa2004f061de6fe1644f402a321c6db8c71b9ba does not look like a valid storage file!
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

@tammeryousef1006
Copy link

i found an old backup version 1.5.0-71 , i restored and running well , waiting for update later

@t0bst4r
Copy link
Owner

t0bst4r commented Aug 14, 2024

Now you got a corrupted storage... We don't have a fix for that at the moment. But maybe we can use yours to investigate a bit more:

  1. Do you have file access to the Addon Storage?
    a. If you are running in docker, its in /root/.matterbridge
    b. If you are running the HA Addon you will find it there: /addon_configs/xxxxxxxx_matterbridge/storage/.matterbridge/
  2. The log says that the file d01917a070027b55bce538a96fa2004f061de6fe1644f402a321c6db8c71b9ba is corrupted. Could you please find that file and paste the content here?
  3. To get your instance back working you can delete all files from the .matterbridge directory. Dont delete the directory itself. With That you will need to re-connect your Alexa / Google Home / Apple Home.

@pvanbuijtene
Copy link
Contributor

Hmm weird:

  1. Had the upgrade message to upgrade to v2.6.0-115
  2. Checked for updates, and could upgrade to 2.6.1-116
  3. Did the upgrade, and got the logging related error.
  4. Checked the version in the logs and it showed it was running 2.6.1-116
  5. Restarted the add-on... it worked.

Sadly the old logs are not available after a restart.

@tammeryousef1006
Copy link

if i delete the addon will this fix the issue ?

@t0bst4r
Copy link
Owner

t0bst4r commented Aug 14, 2024

Probably not, because Home Assistant does not reliably delete the addon storage.

I dont have much experience with the filebrowser, but maybe this could help:
https://community.home-assistant.io/t/home-assistant-addon-filebrowser/282108

@tammeryousef1006
Copy link

@tammeryousef1006
Copy link

tammeryousef1006 commented Aug 14, 2024

thats what inside the corrupted file

{"key":"globalModulesDirectory","value":"/usr/local/lib/node_modules"}

@tammeryousef1006
Copy link

and this is the whole folder if it helps

a1b84aa7_matterbridge.zip

@tammeryousef1006
Copy link

i already toke backup and upgrade to latest , its stable now because I don't try to add or remove entities

@chalk-hwang
Copy link
Author

Thank you.
I tested it by upgrading to 2.6.1 and it works well.
The temperature and humidity sensor that was added this time also works😀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
4 participants