[Bug]: Tube Archivist startup crashes when stale Redis Celery data contains invalid/incompatible serialization

Author: drk9ght1Created Aug 29, 2026Updated Sep 16, 2026
Labelsquestion

I've read the documentation

  • I'm running the latest version of Tube Archivist and have read the release notes.
  • I'm beta testing and am running the latest unstable build.
  • I have read the how to open an issue guide, particularly the bug report section. I've double checked that I don't open a yt-dlp issue here.

Operating System

Unraid

Your Bug Report

Describe the bug

Tube Archivist failed to start because incompatible/stale Celery data was present in Redis.

During startup, the clear task leftovers step crashed with a UnicodeDecodeError while reading a celery-task-meta-* Redis key.

After removing the celery-task-meta-* keys, Tube Archivist progressed further but Celery then encountered an existing application/x-signed-pickle message and reported ContentDisallowed.

After removing the stale Celery data, Tube Archivist started normally.

Steps To Reproduce

  1. Run the current Tube Archivist Docker image with Redis.
  2. Start Tube Archivist with the affected Redis data present.
  3. Tube Archivist reaches clear task leftovers during startup.
  4. Startup fails with the UnicodeDecodeError below.
  5. Remove the celery-task-meta-* Redis keys and restart.
  6. Celery then encounters the existing pickle message and reports ContentDisallowed.
  7. Removing the stale Celery data allows Tube Archivist to start normally.

Expected behavior

Tube Archivist should gracefully handle or discard incompatible/stale Celery data in Redis during startup instead of failing to start.

Relevant log output

bash
[3] clear task leftovers
Traceback (most recent call last):
File "/app/manage.py", line 24, in <module>
main()
File "/app/manage.py", line 20, in main
execute_from_command_line(sys.argv)
File "/root/.local/lib/python3.13/site-packages/django/core/management/init.py", line 443, in execute_from_command_line
utility.execute()
File "/root/.local/lib/python3.13/site-packages/django/core/management/init.py", line 437, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/root/.local/lib/python3.13/site-packages/django/core/management/base.py", line 420, in run_from_argv
self.execute(*args, **cmd_options)
File "/root/.local/lib/python3.13/site-packages/django/core/management/base.py", line 464, in execute
output = self.handle(*args, **options)
File "/app/config/management/commands/ta_startup.py", line 48, in handle
self._clear_tasks()
File "/app/config/management/commands/ta_startup.py", line 149, in _clear_tasks
TaskManager().fail_pending()
File "/app/task/src/task_manager.py", line 74, in fail_pending
all_results = self.get_all_results()
File "/app/task/src/task_manager.py", line 21, in get_all_results
return [handler.get_single(i) for i in all_keys]
File "/app/common/src/ta_redis.py", line 217, in get_single
result = self.conn.execute_command("GET", self.BASE + task_id)
File "/root/.local/lib/python3.13/site-packages/redis/client.py", line 716, in execute_command
return self._execute_command(*args, **options)
File "/root/.local/lib/python3.13/site-packages/redis/client.py", line 736, in _execute_command
return conn.retry.call_with_retry(
File "/root/.local/lib/python3.13/site-packages/redis/client.py", line 737, in <lambda>
return self._send_command_parse_response(
File "/root/.local/lib/python3.13/site-packages/redis/client.py", line 682, in _send_command_parse_response
return self.parse_response(conn, command_name, **options)
File "/root/.local/lib/python3.13/site-packages/redis/client.py", line 780, in parse_response
return connection.read_response()
File "/root/.local/lib/python3.13/site-packages/redis/connection.py", line 1342, in read_response
return self._parser.read_response(disable_decoding=disable_decoding)
File "/root/.local/lib/python3.13/site-packages/redis/_parsers/resp2.py", line 15, in _read_response
result = self._read_response()
File "/root/.local/lib/python3.13/site-packages/redis/_parsers/resp2.py", line 67, in _read_response
return self.encoder.decode(response)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa7 in position 0: invalid start byte

kombu.exceptions.ContentDisallowed: Refusing to deserialize untrusted content of type application/x-signed-pickle (application/x-signed-pickle)

Anything else?

No response

Source: tubearchivist/tubearchivist