BLeeEZ / amperfy

Amperfy is an iOS app to play songs from an Ampache or Subsonic server
GNU General Public License v3.0
404 stars 35 forks source link

Funkwhale playing a single song after server restart #202

Closed Phyks closed 3 months ago

Phyks commented 8 months ago

Hi,

I am using amperfy as it is the recommended FOSS iOS client from Funkwhale (https://www.funkwhale.audio/apps/) together with my self-hosted Funwhale server.

I can play a single song from amperfy and then the server crashes. After reboot, I can again play a single song.

After a clean server restart, I get the following logs:

nov. 19 14:24:30 REDACTED gunicorn[2036618]: 2023-11-19 13:24:30,631 django.request ERROR    Internal Server Error: /api/subsonic/rest/getCoverArt.view
nov. 19 14:24:30 REDACTED gunicorn[2036618]: Traceback (most recent call last):
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/asgiref/sync.py", line 534, in thread_handler
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     raise exc_info[1]
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 38, in inner
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     response = await get_response(request)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 233, in _get_response_async
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     response = await wrapped_callback(request, *callback_args, **callback_kwargs)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/asgiref/sync.py", line 479, in __call__
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     ret: _R = await loop.run_in_executor(
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 40, in run
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     result = self.fn(*self.args, **self.kwargs)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/asgiref/sync.py", line 538, in thread_handler
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     return func(*args, **kwargs)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/usr/lib/python3.9/contextlib.py", line 79, in inner
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     return func(*args, **kwds)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     return view_func(*args, **kwargs)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/rest_framework/viewsets.py", line 125, in view
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     return self.dispatch(request, *args, **kwargs)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/api/funkwhale_api/subsonic/views.py", line 138, in dispatch
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     return super().dispatch(request, *args, **kwargs)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     response = self.handle_exception(exc)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/api/funkwhale_api/subsonic/views.py", line 151, in handle_exception
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     return super().handle_exception(exc)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     self.raise_uncaught_exception(exc)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     raise exc
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     response = handler(request, *args, **kwargs)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/api/funkwhale_api/subsonic/views.py", line 793, in get_cover_art
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     music_models.Artist.objects.exclude(attachment_cover=None)
nov. 19 14:24:30 REDACTED gunicorn[2036618]:   File "/data/funkwhale/venv/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
nov. 19 14:24:30 REDACTED gunicorn[2036618]:     raise self.model.DoesNotExist(
nov. 19 14:24:30 REDACTED gunicorn[2036618]: funkwhale_api.music.models.Artist.DoesNotExist: Artist matching query does not exist.

This might be a Funkwhale issue (https://dev.funkwhale.audio/funkwhale/funkwhale/-/issues/2122) but I am only seeing it with amperfy client. Funkwhale client on Android works perfectly fine.

Thanks!

BLeeEZ commented 3 months ago

Hi, I did some adjustments to Amperfys Subsonic API. Are these errors still occurring in Amperfy version 1.2.0?

Phyks commented 3 months ago

Hi, Sorry I’ve moved from funkwhale to navidrome in the mean time, as a workaround for this issue. I’m no longer in a position to test and reproduce this behavior, so please feel free to close the ticket if you think it should be solved.

Thanks!