t0bst4r / matterbridge-home-assistant-addon

Apache License 2.0
39 stars 6 forks source link

Add-on will not start #59

Closed robnnson closed 1 week ago

robnnson commented 1 week ago

Problem

The Matterbridge add-on will not start.

Expected behavior

For the add-on to start and web gui is accessible.

Actual behavior

Add-on fails to start with the following logs:

-----------------------------------------------------------
 Add-on: Matterbridge
 Populate your Home Assistant instance as Matter Bridge
-----------------------------------------------------------
 Add-on version: 1.2.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.4  (amd64 / qemux86-64)
 Home Assistant Core: 2024.6.3
 Home Assistant Supervisor: 2024.06.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 CLIENT CONFIGURATION:
{
  "includeDomains": [],
  "includePatterns": [],
  "excludeDomains": [],
  "excludePatterns": []
}
#############################

> matterbridge
> matterbridge -add ./node_modules/matterbridge-home-assistant

[04:00:31.150] [Matterbridge] Created Matterbridge Plugin Directory: /root/Matterbridge 
CLI: Matterbridge.loadInstance() failed with error: Error: [node-persist][readFile] /root/.matterbridge/storage/.matterbridge/c6724947ca70506d3d4794dd710813af1a1ef8e646852dba3fe0dea6a2aa7911 does not look like a valid storage file!

> matterbridge
> matterbridge -bridge

CLI: Matterbridge.loadInstance() failed with error: Error: [node-persist][readFile] /root/.matterbridge/storage/.matterbridge/c6724947ca70506d3d4794dd710813af1a1ef8e646852dba3fe0dea6a2aa7911 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 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

Steps to reproduce

Attempt to start the add-on

Proposed changes

N/A

t0bst4r commented 1 week ago

@robnnson that‘s interesting. Could you try uninstalling and reinstalling the addon? It seems that the addon storage corrupted.

@BrianKnudsen this is related to a bug with climate devices. Please exclude the climate domain and try again. This bug is tracked there: t0bst4r/matterbridge-home-assistant#47

nativeTexanSeth commented 1 week ago

I have a similiar issue with Matterbridge not starting but I get a different error. I've tried uninstalling/reinstalling the add-on in Home Assistant; and, I've excluded the "climate" domain as advised.

This is what my configuration YAML looks like:

include_domains: [] include_patterns: [] exclude_domains: - climate exclude_patterns: []

And when I click on start, this is what happens in the log: (This is repeated three times before the add-on will stop.)

> matterbridge
> matterbridge -add ./node_modules/matterbridge-home-assistant

[11:55:32.286] [Matterbridge] Created Matterbridge Plugin Directory: /root/Matterbridge 
[11:55:32.294] [Matterbridge] Matterbridge version 1.3.0 mode  running on Linux 6.6.31-haos-raspi linux arm64 
[11:55:32.299] [Matterbridge] Plugin /app/node_modules/matterbridge-home-assistant/package.json already added to matterbridge 

> matterbridge
> matterbridge -bridge

[11:55:33.702] [Matterbridge] Matterbridge version 1.3.0 mode bridge running on Linux 6.6.31-haos-raspi linux arm64 
[11:55:33.709] [Matterbridge] Storage initialize() error! The file .matterbridge/matterbridge.json may be corrupted. 
[11:55:33.712] [Matterbridge] Please delete it and rename matterbridge.backup.json to matterbridge.json and try to restart Matterbridge. 
[11:55:33.713] [Matterbridge] Storage initialize() error! 
[11:55:33.713] [Matterbridge] Shutting down plugin matterbridge-home-assistant 
[11:55:33.714] [Matterbridge] Plugin matterbridge-home-assistant platform not found 
file:///app/node_modules/@project-chip/matter.js/dist/esm/storage/StorageManager.js:30
    if (!this.initialized) throw new StorageError("The storage needs to be initialized first!");
                                 ^

StorageError: The storage needs to be initialized first!
    at StorageManager.createContext (file:///app/node_modules/@project-chip/matter.js/dist/esm/storage/StorageManager.js:30:34)
    at Matterbridge.createCommissioningServerContext (file:///app/node_modules/matterbridge/dist/matterbridge.js:1861:52)
    at Matterbridge.parseCommandLine (file:///app/node_modules/matterbridge/dist/matterbridge.js:434:47)

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
helderfmf commented 1 week ago

@robnnson had the same problem. Open file manager addon and go to /addon_configs/a1b84aa7_matterbridge/storage/.matterbridge/ Search for the file of the log, in my case the file was 0 bytes, so I deleted it and was recreated on startup.

Removing and installing the addon did not resolve the problem.

robnnson commented 1 week ago

helderfmf

This is strange...the only folder I have is /homeassistant/addons_config and the matterbridge addon isn't even listed in that...?

helderfmf commented 1 week ago

helderfmf

This is strange...the only folder I have is /homeassistant/addons_config and the matterbridge addon isn't even listed in that...?

You need to go above a level. /homeassistant is the default folder, but you can go up to / just hit the <- button.

robnnson commented 1 week ago

helderfmf

This is strange...the only folder I have is /homeassistant/addons_config and the matterbridge addon isn't even listed in that...?

You need to go above a level. /homeassistant is the default folder, but you can go up to / just hit the <- button.

Worked perfectly! Thanks!

t0bst4r commented 1 week ago

did it fix the problem? does it work now?

robnnson commented 1 week ago

did it fix the problem? does it work now?

Sure did. Appreciate that a ton.

enslaved2die commented 6 days ago

@robnnson had the same problem. Open file manager addon and go to /addon_configs/a1b84aa7_matterbridge/storage/.matterbridge/ Search for the file of the log, in my case the file was 0 bytes, so I deleted it and was recreated on startup.

Removing and installing the addon did not resolve the problem.

I cant get there wit the file editor addon. the back button doesnt work