alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.54k stars 217 forks source link

🐛 [filebrowser] Settings reset after "2.23.0_reverted2" update (including authentication data) #1096

Closed bcutter closed 11 months ago

bcutter commented 11 months ago

Description

Description After updating from 2.23.0_reverted to 2.23.0_reverted2 everything is reset to default, like language settings or especially annoying login password for admin (as visible in addon log data: admin/admin)

Expected behaviour Previous custom account data is preserved

What is happening instead? Default authentication is used and all other settings are reset too

Additional context Potentially because of the /config and /addon_config changes going on.

How to reproduce? Use 2.23.0_reverted. Update to 2.23.0_reverted2. Try to login with your former login data.


I had to manually reconfigure my settings on every update since 2.23.0_reverted2. According to logs this is what happens:

... no config file, creating one from template. Please customize the file in /config/config.yaml before restarting.

See more details at https://github.com/filebrowser/filebrowser/issues/2838 (wrong repository, this issue is heavily HA dependent and very likely the result of the recent /config /homeassistant changes)

Reproduction steps

See Description

Addon Logs

Starting...
/etc/cont-init.d/00-banner.sh: executing
-----------------------------------------------------------
 Add-on: Filebrowser
 filebrowser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files
-----------------------------------------------------------
 Add-on version: 2.23.0_reverted5
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.5  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2023.4.6
 Home Assistant Supervisor: 2023.11.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: https://github.com/alexbelgium/hassio-addons 
-----------------------------------------------------------
/etc/cont-init.d/00-global_var.sh: executing
NoAuth='false'
certfile='fullchain.pem'
keyfile='privkey.pem'
ssl='false'
/etc/cont-init.d/00-local_mounts.sh: executing
/etc/cont-init.d/00-smb_mounts.sh: executing
/etc/cont-init.d/01-config_yaml.sh: executing
Load environment variables from /config/config.yaml if existing
---------------------------------------------------------
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables
... no config file, creating one from template. Please customize the file in /config/config.yaml before restarting.
... no env variables found, exiting
/etc/cont-init.d/01-custom_script.sh: executing
Execute /config/filebrowser.sh if existing
---------------------------------------------------------
... no script found, exiting
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
/etc/cont-init.d/20-folders.sh: executing
Creating /config/addons_config/filebrowser
/etc/cont-init.d/99-run.sh: executing
[16:16:05] INFO: Default username/password : admin/admin
[16:16:06] INFO: Starting...
2023/11/21 16:16:06 No config file used
2023/11/21 16:16:06 Listening on [::]:8080
[16:16:06] INFO: Started !
[21/Nov/2023:16:16:51 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET / HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:16:51 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/js/app.8ca2bdf9.js HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:16:51 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/css/chunk-vendors.e9e545fd.css HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:16:51 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/css/app.2991abc4.css HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:16:51 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/js/chunk-vendors.0f8eac7b.js HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
2023/11/21 16:17:03 /api/renew: 401 172.30.32.2 <nil>
[21/Nov/2023:16:17:03 +0000] 401 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) POST /api/renew HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:17:11 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/img/logo.svg HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
2023/11/21 16:17:31 /api/login: 403 172.30.32.2 <nil>
[21/Nov/2023:16:17:31 +0000] 403 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) POST /api/login HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
2023/11/21 16:17:39 /api/login: 403 172.30.32.2 <nil>
[21/Nov/2023:16:17:39 +0000] 403 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) POST /api/login HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:17:43 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) POST /api/login HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:17:44 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/usage/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:17:44 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/resources/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:17:44 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/fonts/material-icons.c22a5826.woff2 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:17:44 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/fonts/medium-latin.bb474f16.woff2 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:17:45 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/fonts/material-icons.c22a5826.woff2 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:17:45 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/fonts/medium-latin.bb474f16.woff2 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:18:04 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) PUT /api/users/1 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:18:05 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) PUT /api/users/1 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:18:07 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) POST /api/renew HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:18:11 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) PUT /api/users/1 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:18:23 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) PUT /api/users/1 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:18:23 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) POST /api/renew HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:01 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/shares HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:02 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/users HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:02 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/settings HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:04 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/users HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:06 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/settings HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:07 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/shares HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:08 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/users HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:13 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/resources/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:13 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/usage/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:17 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/usage/addon_configs/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:17 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/resources/addon_configs/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:20 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/usage/addon_configs/db21ed7f_filebrowser/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:20 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/resources/addon_configs/db21ed7f_filebrowser/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:27 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/usage/addon_configs/db21ed7f_filebrowser/addons_config/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:27 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/resources/addon_configs/db21ed7f_filebrowser/addons_config/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:28 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/usage/addon_configs/db21ed7f_filebrowser/addons_config/filebrowser/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:28 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/resources/addon_configs/db21ed7f_filebrowser/addons_config/filebrowser/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:30 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/resources/addon_configs/db21ed7f_filebrowser/addons_config/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:30 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/usage/addon_configs/db21ed7f_filebrowser/addons_config/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:31 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/usage/addon_configs/db21ed7f_filebrowser/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:31 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/resources/addon_configs/db21ed7f_filebrowser/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:33 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/usage/addon_configs/db21ed7f_filebrowser/config.yaml/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:33 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/resources/addon_configs/db21ed7f_filebrowser/config.yaml HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:33 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/js/chunk-758869bc.80ac415d.js HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:33 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/1afbeca385b131cfc3ae515b89e552c7.js HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:33 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /static/852f3a4ec9ee58d75bd55c85161bb68f.js HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:40 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/usage/addon_configs/db21ed7f_filebrowser/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)
[21/Nov/2023:16:29:40 +0000] 200 xxx.xxx.xxx.xxx, 172.30.32.1(172.30.32.2) GET /api/resources/addon_configs/db21ed7f_filebrowser/ HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0)

Architecture

No response

OS

HAos

bcutter commented 11 months ago

By the way: what is this?

https://github.com/alexbelgium/hassio-addons/actions/runs/6989720755

bcutter commented 11 months ago

After update to latest 2.23.0_7 the issue did not occur (for the first time).

alexbelgium commented 11 months ago

Hi, thanks for the feedback. Indeed you were right the implementation of the /config was missing something, which meant that the database was recreated from scratch.

Glad that the correction I added to _7 worked as intended (cf changelog) : this version now fetches back your old config (untouched) and puts it in the right place to both reuse it and persist future settings changes.

Regarding the other elements you were mentioning :

github-actions[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.