midarrlabs / midarr-server

🔥Midarr, the minimal lightweight media server.
MIT License
1.22k stars 40 forks source link

[BUG]: Internal Server Error after login #435

Closed libkush closed 9 months ago

libkush commented 9 months ago

The home page doesn't load after login and displays Internal Server Error

Screenshots image

Logs

13:16:12.237 [info] admin: http://midarr.kush.in/
13:16:12.274 request_id=F5xo962JpdMHh8QAAAEi [info] Sent 500 in 57ms
13:16:12.276 [error] #PID<0.495.0> running MediaServerWeb.Endpoint (connection #PID<0.486.0>, stream id 8) terminated
Server: midarr.kush.in:80 (http)
Request: GET /
** (exit) an exception was raised:
    ** (ArgumentError) cannot convert nil to param
        (phoenix 1.7.7) lib/phoenix/param.ex:71: Phoenix.Param.Atom.to_param/1
        (phoenix 1.7.7) lib/phoenix/verified_routes.ex:666: Phoenix.VerifiedRoutes.__encode_query__/1
        (media_server 4.1.2) lib/media_server_web/live/home_live/index.html.heex:7: anonymous fn/2 in MediaServerWeb.HomeLive.Index.render/1
        (phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:398: Phoenix.LiveView.Diff.traverse/7
        (phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:544: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7
        (elixir 1.15.6) lib/enum.ex:2510: Enum."-reduce/3-lists^foldl/2-0-"/3
        (phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:396: Phoenix.LiveView.Diff.traverse/7
        (phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:544: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7

Environment Using ghcr.io/midarrlabs/midarr-server:latest docker image on arm64 linux machine.

trueChazza commented 9 months ago

Hi thank you for opening the issue.

The Home page has a hero section that shows 1 movie at random. This error will appear if there are no movies returned from Radarr.

Does your Radarr instance have any movies?

libkush commented 9 months ago

No, not yet. Thank you for informing. But I would suggest it will be better if the home page displayed the relevant message (that no movies were found) instead of an error to help users understand the problem.

trueChazza commented 9 months ago

https://github.com/orgs/midarrlabs/projects/1/views/1?pane=issue&itemId=46272423

Yes definitely! I've created an issue for me to follow this up in a future release. Thank you 😄