{"record":{"id":"448e135aa501e1ad","repo":"argoproj/argo-workflows","slug":"failed-to-create-artifact-driver-v","errorCode":null,"errorMessage":"Failed to create artifact driver: %v","messagePattern":"Failed to create artifact driver: (.+?)","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"server/artifacts/artifact_server.go","lineNumber":261,"sourceCode":"\t}\n\n\t// Create a copy of the artifact for uploading (using artifactCopy which has resolved location)\n\toutputArtifact := artifactCopy.DeepCopy()\n\tif setErr := outputArtifact.SetKey(newKey); setErr != nil {\n\t\thttp.Error(w, fmt.Sprintf(\"Failed to set artifact key: %v\", setErr), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\ta.logger.WithFields(logging.Fields{\n\t\t\"originalKey\": originalKey,\n\t\t\"newKey\":      newKey,\n\t}).Info(ctx, \"Uploading artifact with new key\")\n\n\t// Get the driver for the artifact\n\tkubeClient := auth.GetKubeClient(ctx)\n\tdriver, err := a.artDriverFactory(ctx, outputArtifact, resources{kubeClient, namespace})\n\tif err != nil {\n\t\thttp.Error(w, fmt.Sprintf(\"Failed to create artifact driver: %v\", err), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Upload using SaveStream\n\tif err := driver.SaveStream(ctx, file, outputArtifact); err != nil {\n\t\thttp.Error(w, fmt.Sprintf(\"Failed to save artifact: %v\", err), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\ta.logger.WithFields(logging.Fields{\n\t\t\"artifactName\": artifactName,\n\t\t\"key\":          newKey,\n\t}).Info(ctx, \"Successfully uploaded artifact\")\n\n\t// Return only name/key. The resolved ArtifactLocation contains bucket\n\t// endpoints and Secret selector names that the client does not need.\n\tresponse := map[string]any{\n\t\t\"name\": artifactName,","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/server/artifacts/artifact_server.go#L243-L279","documentation":"The server builds a storage driver for the artifact via artDriverFactory using the artifact's location and the caller's Kubernetes client (for secret lookups). If driver construction fails — usually missing/invalid credentials or an unsupported/invalid location configuration — the upload returns HTTP 500 with this message.","triggerScenarios":"The s3/gcs/azure/oss Secret referenced by the artifact (accessKey/secretKey, serviceAccountKeySecret, etc.) is missing or unreadable with the caller's RBAC; the artifact location specifies an unsupported type reaching the factory; invalid endpoint/region configuration causing driver init to fail.","commonSituations":"Artifact repository credentials not deployed to the namespace; users uploading with an SSO/client token whose service account lacks secret get permissions; misconfigured artifactRepository in the controller configmap (wrong secret name or key); storage backend not enabled in the Argo build.","solutions":["Verify the credentials Secret referenced by the artifact location exists in the workflow namespace and has the expected keys.","Check RBAC: the client calling the upload (auth.GetKubeClient) must be able to read that Secret.","Validate the artifactRepository config (endpoint, region, bucket, secretKeySelector) against the driver's requirements.","Confirm the storage backend type is supported/enabled; the full driver error is included in the HTTP 500 body."],"exampleFix":"// before: secret missing\n# no secret 'my-argo-s3-credentials' in namespace\n// after\nkubectl -n my-ns create secret generic my-argo-s3-credentials \\\n  --from-literal=accessKey=... --from-literal=secretKey=...","handlingStrategy":"validation","validationCode":"# Credentials Secret must exist and be readable in the workflow namespace\nkubectl -n $NS get secret $ARTIFACT_SECRET \\\n  || echo \"credentials secret $ARTIFACT_SECRET missing in $NS\"\nargo auth token  # confirm the identity you upload with can read that secret","typeGuard":null,"tryCatchPattern":"try {\n  await uploadArtifact(...)\n} catch (e) {\n  if (e.status === 500 && e.body.includes('Failed to create artifact driver')) {\n    // credentials/RBAC/config problem; inspect appended driver error, do not blind-retry\n    await verifySecretAndRbac(namespace);\n  }\n}","preventionTips":["Deploy artifact credential Secrets to every namespace that uploads artifacts.","Grant the uploading identity RBAC get on those Secrets.","Validate artifactRepository config (secret names, endpoint, region) against the driver docs.","Confirm the storage backend is supported by your Argo build."],"tags":["artifacts","driver","credentials","internal-error"],"backgroundTag":"artifact-driver-creation-failed","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"}