{"record":{"id":"8719863f193cf53a","repo":"goreleaser/goreleaser","slug":"refresh-artifacts-w","errorCode":null,"errorMessage":"refresh artifacts: %w","messagePattern":"refresh artifacts: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pipe/notary/macos.go","lineNumber":158,"sourceCode":"\t\t\treturn fmt.Errorf(\"%s: %w\", bin.Path, err)\n\t\t}\n\n\t\tswitch status {\n\t\tcase notary.AcceptedStatus:\n\t\t\tlog.WithField(\"binary\", bin.Path).Info(\"notarized\")\n\t\tcase notary.InvalidStatus:\n\t\t\treturn fmt.Errorf(\"%s: invalid\", bin.Path)\n\t\tcase notary.RejectedStatus:\n\t\t\treturn fmt.Errorf(\"%s: rejected\", bin.Path)\n\t\tcase notary.TimeoutStatus:\n\t\t\tlog.WithField(\"binary\", bin.Path).Info(\"notarize timeout\")\n\t\tdefault:\n\t\t\tlog.WithField(\"binary\", bin.Path).Info(\"notarize still pending\")\n\t\t}\n\t}\n\n\tif err := binaries.Refresh(); err != nil {\n\t\treturn fmt.Errorf(\"refresh artifacts: %w\", err)\n\t}\n\treturn nil\n}\n","sourceCodeStart":140,"sourceCodeEnd":162,"githubUrl":"https://github.com/goreleaser/goreleaser/blob/f5edd7395693c0c6b501dc722d445d2e86af854d/internal/pipe/notary/macos.go#L140-L162","documentation":"After processing all binaries, signAndNotarize calls binaries.Refresh() to update the in-memory artifact list. If that fails (file system or artifact store problem), the error is wrapped as 'refresh artifacts: %w' and the release fails even though notarization itself completed.","triggerScenarios":"binaries.Refresh() returns a non-nil error at the end of signAndNotarize — the artifacts registry cannot re-read/refresh the signed binaries from disk.","commonSituations":"Artifact files deleted or moved by another process during the release; disk errors; permission changes on the dist directory; concurrency issues when other pipes rewrite artifacts mid-run.","solutions":["Check that the dist directory and all built binaries still exist and are readable after the build","Re-run the release to rule out a transient file system race","Ensure no external process (e.g. antivirus, cleanup script) touches dist during the release","Inspect the wrapped inner error for the concrete file/permission problem"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// pre-flight: ensure dist artifacts exist and are readable\nfor _, f := range artifacts { if _, err := os.Stat(f); err != nil { return err } }","typeGuard":null,"tryCatchPattern":"err := run(); if err != nil {\n    var refErr *fs.PathError\n    if errors.As(err, &refErr) {\n        // missing/moved artifact file: clean dist and rebuild\n    }\n    return err\n}","preventionTips":["Do not delete or modify the dist directory while goreleaser runs","Exclude dist from antivirus/cleanup daemons during releases","Run a clean release (fresh dist) when in doubt","Check disk space on CI runners before long builds"],"tags":["artifacts","filesystem","release"],"backgroundTag":"artifact-refresh-failed","analyzedSha":"f5edd7395693c0c6b501dc722d445d2e86af854d","analyzedAt":"2026-09-05T09:57:18.807Z","contentChangedAt":"2026-09-05T09:57:18.807Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}