{"record":{"id":"f7763b55eae04065","repo":"argoproj/argo-workflows","slug":"no-artifact-logs-are-available","errorCode":null,"errorMessage":"no artifact logs are available","messagePattern":"no artifact logs are available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"ui/src/shared/services/workflows-service.ts","lineNumber":246,"sourceCode":"    async isWorkflowNodePendingOrRunning(workflow: Workflow, nodeId?: string) {\n        // We always refresh the workflow rather than inspecting the state locally since it doubles\n        // as a check to determine whether or not the API is currently reachable\n        const updatedWorkflow = await this.get(workflow.metadata.namespace, workflow.metadata.name);\n        const node = updatedWorkflow.status.nodes[nodeId];\n        if (!node) {\n            return !updatedWorkflow.status || ['Pending', 'Running'].includes(updatedWorkflow.status.phase);\n        }\n        return isNodePendingOrRunning(node);\n    },\n\n    getContainerLogsFromArtifact(workflow: Workflow, nodeId: string, container: string, grep: string, archived: boolean): Observable<LogEntry> {\n        return of(hasArtifactLogs(workflow, nodeId, container)).pipe(\n            switchMap(isArtifactLogs => {\n                if (!isArtifactLogs) {\n                    if (!nodeId) {\n                        throw new Error('Should specify a node when we get archived logs');\n                    }\n                    throw new Error('no artifact logs are available');\n                }\n\n                return from(requests.get(this.getArtifactLogsPath(workflow, nodeId, container, archived)));\n            }),\n            mergeMap(r => r.text.split('\\n')),\n            map(content => ({content, podName: workflow.status.nodes[nodeId].displayName}) as LogEntry),\n            filter(x => !!x.content.match(grep))\n        );\n    },\n\n    getContainerLogs(workflow: Workflow, podName: string, nodeId: string, container: string, grep: string, archived: boolean): Observable<LogEntry> {\n        const getLogsFromArtifact = () => this.getContainerLogsFromArtifact(workflow, nodeId, container, grep, archived);\n        const getLogsFromCluster = () => this.getContainerLogsFromCluster(workflow, podName, container, grep);\n\n        // If our workflow was deleted, try to get logs from artifacts.\n        if (!isWorkflowInCluster(workflow)) {\n            return getLogsFromArtifact();\n        }","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/ui/src/shared/services/workflows-service.ts#L228-L264","documentation":"When a node has no log artifacts stored (hasArtifactLogs returns false) and a nodeId IS provided, the service throws 'no artifact logs are available'. This means Argo never archived logs for that container, so there is nothing to download from the artifact repository.","triggerScenarios":"Calling getContainerLogsFromArtifact with a valid nodeId for a node whose outputs contain no logs artifact (e.g. logs were not saved, pod deleted before archiving, or container never ran).","commonSituations":"Pods deleted before log archiving completed; workflows run with archiveLogs disabled or no artifact repository configured; steps that failed before producing output; viewing old workflows in the archive UI.","solutions":["Check the node's outputs.artifacts in workflow.status.nodes[nodeId] for a logs artifact before requesting.","Enable log archiving (workflow.spec.archiveLogs: true) or configure an artifact repository so logs are saved.","Fall back to fetching live pod logs via the k8s API if the pod still exists."],"exampleFix":"// before\nlogsService.getLogsFromArtifact(wf, nodeId, 'main', '', true).subscribe(...)\n// after\nconst node = wf.status.nodes?.[nodeId];\nconst hasLogs = node?.outputs?.artifacts?.some(a => a.artifactGC || a.name === 'main-logs');\nif (!hasLogs) { showError('no artifact logs are available'); } else { logsService.getLogsFromArtifact(wf, nodeId, 'main', '', true).subscribe(...); }","handlingStrategy":"fallback","validationCode":"const node = wf.status?.nodes?.[nodeId];\nconst hasLogArtifact = node?.outputs?.artifacts?.some(a => a.name.endsWith('-logs')) ?? false;\nif (!hasLogArtifact) console.warn('No archived logs for node', nodeId);","typeGuard":"function hasArchivedLogs(wf: Workflow, nodeId: string): boolean {\n  const node = wf.status?.nodes?.[nodeId];\n  return Array.isArray(node?.outputs?.artifacts) &&\n    node.outputs.artifacts.some(a => a.name.includes('logs'));\n}","tryCatchPattern":"service.getLogsFromArtifact(wf, nodeId, 'main', '', true).subscribe({\n  error: err => {\n    if (err.message === 'no artifact logs are available') {\n      showEmptyLogsMessage(nodeId);\n    }\n  }\n});","preventionTips":["Set workflow.spec.archiveLogs: true on workflows whose logs you need later.","Configure an artifact repository so logs are actually persisted.","Check node.outputs.artifacts before rendering the logs tab."],"tags":["ui","logs","artifacts"],"backgroundTag":"artifact-not-found","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}