Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'AnonymousUser' object has no attribute 'get_channels_groups' #165

Closed
ndarilek opened this issue Feb 9, 2022 · 1 comment

Comments

@ndarilek
Copy link
Contributor

ndarilek commented Feb 9, 2022

Describe the bug

I get the following traceback again and again in my Funkwhale logs. Additionally, and I don't know if these are related:

  • Setup took 10 minutes or so to start the systemd unit. It did indicate that it might take some time, but that seemed like quite a lot.
  • Any attempts to add or search for remote content produce the following error, even though the URL is valid and works:
    "This object cannot be retrieved"
    This happens regardless of whether I search for remote content or add a podcast feed.

The traceback:

Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: Traceback (most recent call last):
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 171, in run_asgi
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py", line 59, in call
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: return await self.app(scope, receive, send)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/routing.py", line 71, in call
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: return await application(scope, receive, send)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/sessions.py", line 47, in call
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: return await self.inner(dict(scope, cookies=cookies), receive, send)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/sessions.py", line 263, in call
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: return await self.inner(wrapper.scope, receive, wrapper.send)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/auth.py", line 185, in call
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: return await super().call(scope, receive, send)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/middleware.py", line 26, in call
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: return await self.inner(scope, receive, send)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/routing.py", line 160, in call
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: send,
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/consumer.py", line 94, in app
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: return await consumer(scope, receive, send)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/consumer.py", line 59, in call
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: [receive, self.channel_receive], self.dispatch
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/utils.py", line 51, in await_many_dispatch
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: await dispatch(result)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/asgiref/sync.py", line 423, in call
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: ret = await asyncio.wait_for(future, timeout=None)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/usr/lib/python3.7/asyncio/tasks.py", line 388, in wait_for
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: return await fut
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: result = self.fn(*self.args, **self.kwargs)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/db.py", line 13, in thread_handler
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: return super().thread_handler(loop, *args, **kwargs)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/asgiref/sync.py", line 462, in thread_handler
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: return func(*args, **kwargs)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/consumer.py", line 125, in dispatch
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: handler(message)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/channels/generic/websocket.py", line 105, in websocket_disconnect
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: self.disconnect(message["code"])
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/api/funkwhale_api/common/consumers.py", line 22, in disconnect
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: groups = self.scope["user"].get_channels_groups() + self.groups
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: File "/var/www/funkwhale/virtualenv/lib/python3.7/site-packages/django/utils/functional.py", line 247, in inner
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: return func(self._wrapped, *args)
Feb 08 23:45:46 thewordnerd.info gunicorn[15783]: AttributeError: 'AnonAttributeError: 'AnonymousUser' object has no attribute 'get_channels_groups'

Context

  • Hardware: VPS
  • YunoHost version: 4.3.6.2
  • I have access to my server: SSH/web
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
  • Using, or trying to install package version/branch: 1.2.1

Steps to reproduce

  1. Install.
  2. Visit the web interface.
  3. Attempt to search for a remote feed or add a podcast.
  4. Check systemd logs. Also note that the podcast isn't added.

Expected behavior

The app doesn't error and subscribes to remote feeds/channels.

Logs

Installation log

@ndarilek
Copy link
Contributor Author

Digging through logs a bit more and seeing this:

Feb 16 16:00:40 thewordnerd.info gunicorn[11777]: 2022-02-16 16:00:40,564 django_auth_ldap WARNING uid=nolan,ou=users,dc=yunohost,dc=org does not have a value for the attribute "uid"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant