mealie-recipes / mealie

Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relevant data or add a family recipe with the UI editor
https://docs.mealie.io
GNU Affero General Public License v3.0
6.77k stars 698 forks source link

[BUG] - Recipes not showing after upgrade #4294

Open rafaelmathieu opened 2 days ago

rafaelmathieu commented 2 days ago

First Check

What is the issue you are experiencing?

I recently updated the nightly for the first time in a while. (Last time I updated it, open AI was not a thing)

After the update I cannot see or search for any recipes. I know they are there as I can access them via their direct URL and they are in the DB.

There seem to be an error showing in the logs when the main page is loaded. (URL/g/home)

Steps to Reproduce

I have not been able to reproduce the issue on the demo site.

Please provide relevant logs

ERROR 2024-09-30T12:51:15 - Exception in ASGI application Traceback (most recent call last): File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi result = await app( # type: ignore[func-returns-value] File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call return await self.app(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in call raise exc File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in call await self.app(scope, receive, _send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in call await responder(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in call await self.app(scope, receive, self.send_with_gzip) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 756, in call await self.middleware_stack(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 776, in app await route.handle(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle await self.app(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 72, in app response = await func(request) File "/app/mealie/routes/_base/routers.py", line 35, in custom_route_handler response = await original_route_handler(request) File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 301, in app raw_response = await run_endpoint_function( File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 214, in run_endpoint_function return await run_in_threadpool(dependant.call, values) File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool return await anyio.to_thread.run_sync(func, args) File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, args) File "/app/mealie/routes/recipe/recipe_crud_routes.py", line 362, in get_all pagination_response = self.group_recipes.by_user(self.user.id).page_all( File "/app/mealie/repos/repository_recipes.py", line 222, in page_all items = [RecipeSummary.model_validate(item) for item in data] File "/app/mealie/repos/repository_recipes.py", line 222, in items = [RecipeSummary.model_validate(item) for item in data] File "/opt/pysetup/.venv/lib/python3.10/site-packages/pydantic/main.py", line 596, in model_validate return cls.__pydantic_validator__.validate_python( pydantic_core._pydantic_core.ValidationError: 1 validation error for RecipeSummary** household_id UUID input should be a string, bytes or UUID object [type=uuid_type, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.9/v/uuid_type

Mealie Version

Docker Version: ghcr.io/mealie-recipes/mealie:nightly Build Tag: 1bd3d38dfc76ac81c5ebd9710d79486f2d61ab15

Using OIDC

image

Deployment

Unraid

Additional Deployment Details

No response

michael-genson commented 2 days ago

Do you have logs from when you upgraded? Looks like something might have gone wrong with the migration. Can you provide a backup here from before the upgrade?

Also, if you could edit the title on the bug report

rafaelmathieu commented 2 days ago

Updated the title.

I do not have any upgrade logs anymore :(.

The only other log error I could find is this:

[ERROR|scheduler_service|L60] 2024-09-30T13:37:52: Error in scheduled task func='locked_user_reset': exception='group_id must be set'

I do a backup from april but this is kinda old.

michael-genson commented 2 days ago

If you could provide that, it may be helpful

michael-genson commented 2 days ago

Also, are you using sqlite or postgres?

brandonjkessler commented 1 day ago

I'm having the same issue. The Shopping List feature is also not working

OS: UnRAID 6.12.13 Channel: ghcr.io/mealie-recipes/mealie:nightly Build: fa32a6489c35d62eec976e24af14cd179d0bf279 DB engine: SQLite

Attached is my log output from UnRAID for that container

mealie_error.txt

michael-genson commented 1 day ago

Can you provide the logs from when you upgraded to nightly, and a copy of your backup from before you upgraded?

brandonjkessler commented 12 hours ago

I don't have any upgrade logs, and my backup is from almost a year ago, but if that will be beneficial I can get you that. Thanks for the effort and sorry I don't have anything more substantial for you to work with.

michael-genson commented 12 hours ago

That backup would be helpful if you're able to provide! Along with your actual db file if possible

rafaelmathieu commented 9 hours ago

@michael-genson I am using postgres.

is there a way to send you the backup directly as putting the backup with user data in the open is not great.

michael-genson commented 9 hours ago

If you could DM it to me on Discord that will work. In case you're not on the Discord: https://discord.gg/nvmfQyzn