alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.56k stars 223 forks source link

🐛 [BirdNET-Go] Error while saving configuration changes #1597

Open Maarc opened 1 month ago

Maarc commented 1 month ago

Description

I just updated to the latest BirdNET-Go version 0.5.5-10 (30-09-2024) on my running home assistant instance (Core: 2024.10.1 / Supervisor 2024.10.0 / OS 13.1 / Frontend 20241002.2).

Unfortunately, it is not possible to change the configuration through the UI anymore.

While opening the BirdNET-Go settings and making a change, I get the 'An error occurred while saving settings. Please try again.' message.

Reproduction steps

1. Open the BirdNET-Go setting page (Settings -> Add-ons -> Birdnet-go -> Open web UI -> Settings -> Integrations)
2. Change a value
3. Click on 'Save Changes'
4. See error "An error occurred while saving settings. Please try again."

Add-on Logs

Nothing in the add-on logs. The "save" submit request is not reaching to the server.

In the Chrome JavaScript console, I get:

POST http://xxx.xxx.xxx.xxx/settings/save 404 (Not Found)
saveSettings @ VM3683:24
[Alpine] saveSettings() @ VM3777:3
(anonymous) @ alpinejs.min.js:5
nr @ alpinejs.min.js:1
(anonymous) @ alpinejs.min.js:5
o @ alpinejs.min.js:5
(anonymous) @ alpinejs.min.js:5
(anonymous) @ alpinejs.min.js:5
(anonymous) @ alpinejs.min.js:5
(anonymous) @ alpinejs.min.js:5

Error: Error: HTTP error! status: 404
    at eval (eval at <anonymous> (alpinejs.min.js:5:665), <anonymous>:30:23)
eval @ VM3683:37
Promise.catch
saveSettings @ VM3683:36
[Alpine] saveSettings() @ VM3777:3
(anonymous) @ alpinejs.min.js:5
nr @ alpinejs.min.js:1
(anonymous) @ alpinejs.min.js:5
o @ alpinejs.min.js:5
(anonymous) @ alpinejs.min.js:5
(anonymous) @ alpinejs.min.js:5
(anonymous) @ alpinejs.min.js:5
(anonymous) @ alpinejs.min.js:5

It looks like the endpoint (/setting/save) is not correct.

Architecture

amd64

OS

HAos

Maarc commented 1 month ago

Note for people having the same issue: You can change the configuration manually by SSH-ing into home assistant and then into the running BirdNet-Go container to change the configuration file directly.

Here are the steps:

  1. Open “Add-ons” on the settings of HA (UI)
  2. Disable protection mode (require to interact with the docker containers)
  3. Open the configuration tab to see the user & password
  4. On a terminal execute: ssh HASSIO_USER_FROM_CONFIG@YOUR_HA_IP using the password from the configuration
  5. Execute sudo su -
  6. Execute docker ps to find the process of ghcr.io/alexbelgium/birdnet-go-amd64
  7. Then run docker exec -ti 85534aa842ed /bin/bash … where 85534aa842edis the container id of the birdnet-go container
  8. Then edit /config/config.yaml. You could also for example delete clips in /data/clips.
  9. Exit and re-activate the protected mode
alexbelgium commented 1 month ago

Thanks! I'll have a look.

For people less tech-savy it is also possible to edit it manually by installing the Filebrowser addon and going in /addon_configs/xxx-birdnet-go!

alexbelgium commented 1 month ago

Indeed I've verified on my system. I'm see if something can be done or if it is hardcoded