unclecode/crawl4ai · error · ArtifactNotFound
Artifact not found
Error message
Artifact not found
What it means
Error "Artifact not found" thrown in unclecode/crawl4ai.
Source
Thrown at deploy/docker/artifacts.py:104
artifact_id = uuid.uuid4().hex # 32 hex chars, unguessable
path = os.path.join(ARTIFACT_DIR, artifact_id + ext)
# O_EXCL: never follow/overwrite an existing entry; O_NOFOLLOW: refuse a
# symlink at the final component. Server-chosen name => no traversal.
flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL | getattr(os, "O_NOFOLLOW", 0)
fd = os.open(path, flags, 0o600)
with os.fdopen(fd, "wb") as f:
f.write(data)
return {"artifact_id": artifact_id, "mime": mime, "size": len(data)}
def resolve_artifact(artifact_id: str) -> Tuple[str, str]:
"""Map an opaque id to (path, mime), enforcing hex-id, no-symlink, TTL.
Raises ArtifactNotFound for an invalid id, a non-regular/symlink file, a
missing file, or an expired artifact (so existence is never revealed).
"""
if not isinstance(artifact_id, str) or not _HEX32.match(artifact_id):
raise ArtifactNotFound()
for ext, mime in _KIND.values():
path = os.path.join(ARTIFACT_DIR, artifact_id + ext)
try:
st = os.lstat(path) # do NOT follow symlinks
except FileNotFoundError:
continue
if not os.path.stat.S_ISREG(st.st_mode):
raise ArtifactNotFound() # symlink / special file
if time.time() - st.st_mtime > ARTIFACT_TTL_SECONDS:
try:
os.unlink(path)
except OSError:
pass
raise ArtifactNotFound()
return path, mime
raise ArtifactNotFound()
View on GitHub (pinned to 7e80152142)
Solutions
- Verify the artifact id is correct and the artifact has not expired or been deleted.
- List artifacts to find the correct identifier.
Example fix
GET /artifacts # locate the correct artifact id
When it happens
Trigger: Thrown at deploy/docker/artifacts.py:104 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of unclecode/crawl4ai@7e80152142 (2026-08-14).
Data as JSON: /api/errors/8ba36387edc005c1.
Report an issue: GitHub.