'AnonymousUser' object has no attribute 'get_channels_groups'
Federation dev setup. This happens various times per seconds making it very difficult to debug other things haha Need to investigate
node2-nginx-1 | 172.18.0.2 - - [22/Apr/2022:19:16:10 +0000] "GET /api/v1/activity HTTP/1.1" 403 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.20 Safari/537.36" "-"
node2-api-1 | 2022-04-22 19:16:03,596 uvicorn.error ERROR Exception in ASGI application
node2-api-1 | Traceback (most recent call last):
node2-api-1 | File "/venv/lib/python3.9/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 184, in run_asgi
node2-api-1 | result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
node2-api-1 | File "/venv/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
node2-api-1 | return await self.app(scope, receive, send)
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/routing.py", line 71, in __call__
node2-api-1 | return await application(scope, receive, send)
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/sessions.py", line 47, in __call__
node2-api-1 | return await self.inner(dict(scope, cookies=cookies), receive, send)
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/sessions.py", line 263, in __call__
node2-api-1 | return await self.inner(wrapper.scope, receive, wrapper.send)
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/auth.py", line 185, in __call__
node2-api-1 | return await super().__call__(scope, receive, send)
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/middleware.py", line 26, in __call__
node2-api-1 | return await self.inner(scope, receive, send)
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/routing.py", line 150, in __call__
node2-api-1 | return await application(
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/consumer.py", line 94, in app
node2-api-1 | return await consumer(scope, receive, send)
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/consumer.py", line 58, in __call__
node2-api-1 | await await_many_dispatch(
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/utils.py", line 51, in await_many_dispatch
node2-api-1 | await dispatch(result)
node2-api-1 | File "/venv/lib/python3.9/site-packages/asgiref/sync.py", line 414, in __call__
node2-api-1 | ret = await asyncio.wait_for(future, timeout=None)
node2-api-1 | File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
node2-api-1 | return await fut
node2-api-1 | File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
node2-api-1 | result = self.fn(*self.args, **self.kwargs)
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/db.py", line 13, in thread_handler
node2-api-1 | return super().thread_handler(loop, *args, **kwargs)
node2-api-1 | File "/venv/lib/python3.9/site-packages/asgiref/sync.py", line 455, in thread_handler
node2-api-1 | return func(*args, **kwargs)
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/consumer.py", line 125, in dispatch
node2-api-1 | handler(message)
node2-api-1 | File "/venv/lib/python3.9/site-packages/channels/generic/websocket.py", line 105, in websocket_disconnect
node2-api-1 | self.disconnect(message["code"])
node2-api-1 | File "/app/./funkwhale_api/common/consumers.py", line 22, in disconnect
node2-api-1 | groups = self.scope["user"].get_channels_groups() + self.groups
node2-api-1 | File "/venv/lib/python3.9/site-packages/django/utils/functional.py", line 247, in inner
node2-api-1 | return func(self._wrapped, *args)
node2-api-1 | AttributeError: 'AnonymousUser' object has no attribute 'get_channels_groups'