{"record":{"id":"34f0a533ad72941b","repo":"apache/beam","slug":"unable-to-provide-v-to-worker","errorCode":null,"errorMessage":"unable to provide %v to worker","messagePattern":"unable to provide (.+?) to worker","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/jobservices/artifact.go","lineNumber":107,"sourceCode":"\t\t\ts.artifacts[string(dep.GetTypePayload())] = buf.Bytes()\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (s *Server) ResolveArtifacts(_ context.Context, req *jobpb.ResolveArtifactsRequest) (*jobpb.ResolveArtifactsResponse, error) {\n\treturn &jobpb.ResolveArtifactsResponse{\n\t\tReplacements: req.GetArtifacts(),\n\t}, nil\n}\n\nfunc (s *Server) GetArtifact(req *jobpb.GetArtifactRequest, stream jobpb.ArtifactRetrievalService_GetArtifactServer) error {\n\tinfo := req.GetArtifact()\n\tbuf, ok := s.artifacts[string(info.GetTypePayload())]\n\tif !ok {\n\t\tpt := prototext.Format(info)\n\t\tslog.Warn(\"unable to provide artifact to worker\", \"artifact_info\", pt)\n\t\treturn fmt.Errorf(\"unable to provide %v to worker\", pt)\n\t}\n\tchunk := 128 * 1024 * 1024 // 128 MB\n\tvar i int\n\tfor i+chunk < len(buf) {\n\t\tstream.Send(&jobpb.GetArtifactResponse{\n\t\t\tData: buf[i : i+chunk],\n\t\t})\n\t\ti += chunk\n\t}\n\tstream.Send(&jobpb.GetArtifactResponse{\n\t\tData: buf[i:],\n\t})\n\treturn nil\n}\n","sourceCodeStart":89,"sourceCodeEnd":122,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/jobservices/artifact.go#L89-L122","documentation":"GetArtifact serves staged artifacts to the worker from the server's in-memory artifacts map, keyed by the artifact's type payload. If the requested artifact's key is not present, the server logs a warning and returns 'unable to provide <prototext> to worker'. This means the prism server never staged (or already discarded) the artifact the SDK harness asked for.","triggerScenarios":"A worker requests an artifact whose type payload has no entry in s.artifacts — e.g. the artifact was never registered via the staging path, or the request's type payload doesn't match what was stored.","commonSituations":"Reverse-artifact retrieval setups where the harness computes a different artifact type payload than the server stored; jobs restarted against a fresh prism server that lost staged artifacts; custom artifact staging omitted.","solutions":["Check the warning log line 'unable to provide artifact to worker' for the exact artifact_info requested and compare it to what was staged.","Ensure the artifact staging step ran before workers request dependencies (e.g. correct --artifact/staging flags).","Verify prism server and harness agree on the artifact type payload encoding; upgrade both to the same version."],"exampleFix":"// before: artifact never staged\n// ensure staging before running:\njobStager.Stage(artifacts...)\n\n// after: server has s.artifacts[typePayload] populated, GetArtifact succeeds","handlingStrategy":"try-catch","validationCode":"// Pre-check artifact availability before requesting from the worker\nif _, ok := stagedArtifacts[string(info.GetTypePayload())]; !ok {\n    return fmt.Errorf(\"artifact with type payload %q was never staged\", info.GetTypePayload())\n}","typeGuard":null,"tryCatchPattern":"err := stream.Recv() // or the client-side equivalent\nif err != nil && strings.Contains(err.Error(), \"unable to provide\") {\n    log.Fatalf(\"artifact missing from prism server staging; re-stage artifacts: %v\", err)\n}","preventionTips":["Run artifact staging before workers start requesting dependencies","Reuse the same prism server instance across staging and execution","Compare the warning log's artifact_info against staged payloads when debugging"],"tags":["go","beam","artifacts","worker"],"backgroundTag":"resource-not-found","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}