alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.49k stars 213 forks source link

🐛 [Mealie] Mealie not recognising login details #1580

Open Valve90210 opened 5 days ago

Valve90210 commented 5 days ago

Description

I've just tried to look on Mealie and was presented with the Login page with a message that it looks like my first time logging in.

Entered my user details and was told they were incorrect. I tried a second user I have setup and that failed too. I've tried resetting the password but can see in the log in HA that it thinks neither user exists.

Looking in File Editor in HA I can see there are two user folders in the "/homeassistant/addons_config/mealie_data" folder, along with folders for Backups, Groups and logs etc. Though none of them seem to have been written to since 9th August this year.

But I've also noticed a folder dated today called db21ed7f_mealie which doesn't show anything when I try to select it in File Editor.

I realised Filebrowser would probably be more useful to seeing what is in different folders etc but I'm having the exact same issue with the Filebrowser addon too...

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Addon Logs

DATA_DIR=/config
PGID=1000
PUID=1000
certfile=fullchain.pem
keyfile=privkey.pem
ssl=false
[16:48:59] INFO: No config.yaml found in /config/addons_config/mealie/config.yaml, using default parameters
Permissions adapted
[16:48:59] INFO: Starting nginx
[16:48:59] INFO: Starting app
INFO     2024-09-20T16:49:26 - Started server process [7]
INFO     2024-09-20T16:49:26 - Waiting for application startup.
INFO     2024-09-20T16:49:26 - start: database initialization
INFO     2024-09-20T16:49:26 - Database connection established.
INFO     2024-09-20T16:49:26 - Context impl SQLiteImpl.
INFO     2024-09-20T16:49:26 - Will assume non-transactional DDL.
INFO     2024-09-20T16:49:26 - Checking for migration data fixes
INFO     2024-09-20T16:49:27 - end: database initialization
INFO     2024-09-20T16:49:27 - -----SYSTEM STARTUP-----
INFO     2024-09-20T16:49:27 - ------APP SETTINGS------
INFO     2024-09-20T16:49:27 - {
    "TESTING": false,
    "PRODUCTION": true,
    "LOG_CONFIG_OVERRIDE": null,
    "LOG_LEVEL": "info",
    "theme": {
        "light_primary": "#E58325",
        "light_accent": "#007A99",
        "light_secondary": "#973542",
        "light_success": "#43A047",
        "light_info": "#1976D2",
        "light_warning": "#FF6D00",
        "light_error": "#EF5350",
        "dark_primary": "#E58325",
        "dark_accent": "#007A99",
        "dark_secondary": "#973542",
        "dark_success": "#43A047",
        "dark_info": "#1976D2",
        "dark_warning": "#FF6D00",
        "dark_error": "#EF5350"
    },
    "BASE_URL": "http://localhost:8080",
    "STATIC_FILES": "/spa/static",
    "IS_DEMO": false,
    "HOST_IP": "*",
    "API_HOST": "0.0.0.0",
    "API_PORT": 9000,
    "API_DOCS": true,
    "TOKEN_TIME": 48,
    "GIT_COMMIT_HASH": "0d06494bbfc62fc8a1771a85fd308190891d6167",
    "ALLOW_SIGNUP": true,
    "DAILY_SCHEDULE_TIME": "23:45",
    "SECURITY_MAX_LOGIN_ATTEMPTS": 5,
    "SECURITY_USER_LOCKOUT_TIME": 24,
    "DB_ENGINE": "sqlite",
    "DEFAULT_GROUP": "Home",
    "SMTP_HOST": null,
    "SMTP_PORT": "587",
    "SMTP_FROM_NAME": "Mealie",
    "SMTP_FROM_EMAIL": null,
    "SMTP_AUTH_STRATEGY": "TLS",
    "LDAP_AUTH_ENABLED": false,
    "LDAP_SERVER_URL": null,
    "LDAP_TLS_INSECURE": false,
    "LDAP_TLS_CACERTFILE": null,
    "LDAP_ENABLE_STARTTLS": false,
    "LDAP_BASE_DN": null,
    "LDAP_QUERY_BIND": null,
    "LDAP_QUERY_PASSWORD": null,
    "LDAP_USER_FILTER": null,
    "LDAP_ADMIN_FILTER": null,
    "LDAP_ID_ATTRIBUTE": "uid",
    "LDAP_MAIL_ATTRIBUTE": "mail",
    "LDAP_NAME_ATTRIBUTE": "name",
    "OIDC_AUTH_ENABLED": false,
    "OIDC_CLIENT_ID": null,
    "OIDC_CONFIGURATION_URL": null,
    "OIDC_SIGNUP_ENABLED": true,
    "OIDC_USER_GROUP": null,
    "OIDC_ADMIN_GROUP": null,
    "OIDC_AUTO_REDIRECT": false,
    "OIDC_PROVIDER_NAME": "OAuth",
    "OIDC_REMEMBER_ME": false,
    "OIDC_SIGNING_ALGORITHM": "RS256",
    "OIDC_USER_CLAIM": "email",
    "OIDC_GROUPS_CLAIM": "groups",
    "OIDC_TLS_CACERTFILE": null,
    "OPENAI_BASE_URL": null,
    "OPENAI_API_KEY": null,
    "OPENAI_MODEL": "gpt-4o",
    "OPENAI_ENABLE_IMAGE_SERVICES": true,
    "OPENAI_WORKERS": 2,
    "OPENAI_SEND_DATABASE_DATA": true,
    "OPENAI_REQUEST_TIMEOUT": 60,
    "WORKER_PER_CORE": 1,
    "UVICORN_WORKERS": 1
}
INFO     2024-09-20T16:49:27 - Daily tasks scheduled for 2024-09-20 22:45:00+00:00
INFO     2024-09-20T16:49:27 - Application startup complete.
INFO     2024-09-20T16:49:27 - Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit)
INFO     2024-09-20T16:49:56 - [127.0.0.1:39322] 200 OK "GET /api/app/about HTTP/1.1"

Architecture

No response

OS

No response

alexbelgium commented 4 days ago

Hi, that's strange nothing changed why filebrowser. It has been stable for quite some time, as I blocked updates to an incompatibility of recent versions with ingress.

Could you please try to refresh your add-on repositories, uninstall and reinstall the add-on? If you're database was still v1 it should work and retake the link with your previous mealie folders in /homeassistant/addons_config/mealie_data

ryan7273 commented 3 days ago

I experienced a similar problem this week. In my case it was because I have a postgres backend and mealie stopped reading environment variables correctly (#1558). It created a brand new default database and presented me with the new install screen.

Valve90210 commented 1 day ago

Hi

Sorry for the delay in coming back to you, I've been crazy busy and not had a chance to look at this.

I went to the addons and noticed there was an update for Mealie, so I tried updating but got an error when trying to start the addon...

So I uninstalled and reinstalled mealie but when trying to start it I'm getting the same error as I was when I updated.

This is the log.

module = load_module_py(module_id, path)

File "", line 241, in _call_with_frames_removed File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py File "/app/alembic/env.py", line 81, in spec.loader.exec_module(module) # type: ignore run_migrations_online() File "", line 883, in exec_module File "/app/alembic/env.py", line 75, in run_migrations_online context.run_migrations() File "", line 8, in run_migrations File "", line 241, in _call_with_frames_removed File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/runtime/environment.py", line 946, in run_migrations File "/app/alembic/env.py", line 81, in self.get_context().run_migrations(kw) File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/runtime/migration.py", line 616, in run_migrations run_migrations_online() File "/app/alembic/env.py", line 75, in run_migrations_online context.run_migrations() File "", line 8, in run_migrations File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/runtime/environment.py", line 946, in run_migrations self.get_context().run_migrations(kw) File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/runtime/migration.py", line 616, in run_migrations for step in self._migrations_fn(heads, self): File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/command.py", line 395, in upgrade return script._upgrade_revs(revision, rev) File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/script/base.py", line 446, in _upgrade_revs with self._catch_revision_errors( File "/usr/local/lib/python3.10/contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/script/base.py", line 282, in _catch_revision_errors raise util.CommandError(resolution) from re alembic.util.exc.CommandError: Can't locate revision identified by 'feecc8ffb956'

ERROR 2024-09-24T12:39:07 - Application startup failed. Exiting. for step in self._migrations_fn(heads, self): File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/command.py", line 395, in upgrade return script._upgrade_revs(revision, rev) File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/script/base.py", line 446, in _upgrade_revs with self._catch_revision_errors( File "/usr/local/lib/python3.10/contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/script/base.py", line 282, in _catch_revision_errors raise util.CommandError(resolution) from re alembic.util.exc.CommandError: Can't locate revision identified by 'feecc8ffb956'

ERROR 2024-09-24T12:39:07 - Application startup failed. Exiting. /etc/cont-init.d/00-banner.sh: executing


Add-on: Mealie Mealie is a self hosted recipe manager and meal planner built in Vue

Add-on version: v1.12.0-2 You are running the latest version of this add-on. System: Home Assistant OS 13.1 (amd64 / generic-x86-64) Home Assistant Core: 2024.9.2 Home Assistant Supervisor: 2024.09.1

Please, share the above information when looking for help or support in, e.g., GitHub, forums

Provided by: https://github.com/alexbelgium/hassio-addons

Defining permissions for main user : User UID: 1000 User GID : 1000

/etc/cont-init.d/00-global_var.sh: executing ALLOW_SIGNUP='true' DATA_DIR='/config/addons_config/mealie_data' PGID='1000' PUID='1000' certfile='fullchain.pem' keyfile='privkey.pem' ssl='false' Timezone set from Etc/UTC to Europe/London /etc/cont-init.d/01-config_yaml.sh: executing Setting permissions for the config.yaml directory

Load environment variables from /config/addons_config/mealie/config.yaml if existing If accessing the file with filebrowser it should be mapped to /homeassistant/addons_config/mealie/config.yaml

Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables

... no env variables found, exiting /etc/cont-init.d/01-custom_script.sh: executing Execute /homeassistant/addons_config/mealie/mealie.sh if existing Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation /etc/cont-init.d/31-nginx.sh: executing [12:39:16] INFO: Exporting variables ALLOW_SIGNUP=true DATA_DIR=/config/addons_config/mealie_data PGID=1000 PUID=1000 certfile=fullchain.pem keyfile=privkey.pem ssl=false [12:39:17] INFO: config.yaml found in /config/addons_config/mealie/config.yaml, exporting variables Permissions adapted [12:39:17] INFO: Starting nginx [12:39:17] INFO: Starting app

rfeldt commented 5 hours ago

I have exatcly the same issue. Loginscreen says it seems to be my first login, and will not accept valid login info or password reset.