invoke-ai/InvokeAI · error · PermissionError
Queue user is not authorized to access this video
Error message
Queue user is not authorized to access this video
What it means
VideosInterface._assert_read_access throws PermissionError when the queue item's user account is None or deactivated. Mirroring the images interface, deactivated accounts keep no queue-time privileges, so their queued graphs cannot read any video.
Source
Thrown at invokeai/app/services/shared/invocation_context.py:355
Mirrors :class:`ImagesInterface` but consumes a path to an already-encoded
MP4 (or other supported container) rather than an in-memory PIL image —
video encoding is the caller's responsibility (e.g. the
``wan_latents_to_video`` node uses ``imageio[ffmpeg]``).
"""
def __init__(self, services: InvocationServices, data: InvocationContextData, util: "UtilInterface") -> None:
super().__init__(services, data)
self._util = util
def _assert_read_access(self, video_name: str) -> None:
if not self._services.configuration.multiuser:
return
user_id = self._data.queue_item.user_id
user = self._services.users.get(user_id)
# See ImagesInterface._assert_read_access: deactivated accounts keep no
# queue-time privileges.
if user is None or not user.is_active:
raise PermissionError("Queue user is not authorized to access this video")
if user.is_admin or self._services.video_records.get_user_id(video_name) == user_id:
return
board_id = self._services.board_video_records.get_board_for_video(video_name)
if board_id is not None:
board = self._services.boards.get_dto(board_id)
if board.board_visibility in (BoardVisibility.Shared, BoardVisibility.Public):
return
raise PermissionError("Queue user is not authorized to access this video")
def save(
self,
source_path: Path,
width: int,
height: int,
duration: float,
fps: Optional[float] = None,
board_id: Optional[str] = None,
image_category: ImageCategory = ImageCategory.GENERAL,View on GitHub (pinned to 0b6a024f2f)
Solutions
- Reactivate the user account tied to the queue item
- Cancel and requeue the item under an active user
- Purge stale queue items when deactivating accounts
- Catch PermissionError and fail the invocation gracefully
Example fix
# before
frame = context.videos.get_pil(video_name)
# after
user = services.users.get(context.queue_item.user_id)
if user is None or not user.is_active:
raise CancelledException
frame = context.videos.get_pil(video_name) Defensive patterns
Strategy: try-catch
Validate before calling
user = services.users.get(queue_item.user_id)
if user is None or not user.is_active:
raise CancelledException("queue user deactivated") Type guard
def queue_user_active(services, queue_item) -> bool:
user = services.users.get(queue_item.user_id)
return user is not None and user.is_active Try / catch
try:
meta = context.videos.get_metadata(video_name)
except PermissionError:
meta = None # skip / fail gracefully Prevention
- Cancel queue items when deactivating users
- Check account status before processing stale queue items
- Assume zero privileges for missing/deactivated users in custom nodes
When it happens
Trigger: Invocations calling videos.get_pil/get_metadata/get_dto/get_path while users.get(queue_item.user_id) returns None or is_active=False in multiuser mode.
Common situations: Video-generation queue items still executing after the submitting user was deactivated or deleted; reprocessing stale queue items from removed accounts.
Understand the failure class
Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.
Related errors
- The selected saved workflow '${self.workflow_id}' is not acc
- Queue user is not authorized to access this image
- Queue user is not authorized to save images
- Queue user is not authorized to save images to this board
- Queue user is not authorized to save videos
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/7ab43a81bb448979.
Report an issue: GitHub.