{"record":{"id":"20091b7a60abf599","repo":"microsoft/typescript-go","slug":"some-files-failed-to-sign-n","errorCode":null,"errorMessage":"Some files failed to sign:\\n","messagePattern":"Some files failed to sign:\\\\n","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"Herebyfile.mjs","lineNumber":1458,"sourceCode":"                }\r\n                else {\r\n                    failures.push(message);\r\n                    continue;\r\n                }\r\n            }\r\n\r\n            if (src === dst) {\r\n                console.log(`Signed ${src}`);\r\n            }\r\n            else {\r\n                console.log(`Signed ${src} -> ${dst}`);\r\n            }\r\n            console.log(`  sha256: ${dstHash}`);\r\n        }\r\n    }\r\n\r\n    if (failures.length) {\r\n        throw new Error(\"Some files failed to sign:\\n\" + failures.map(f => \" - \" + f).join(\"\\n\"));\r\n    }\r\n}\r\n\r\n/**\r\n * @param {string} src\r\n * @param {string} dest\r\n * @param {(p: string) => boolean} [filter]\r\n */\r\nfunction cpRecursive(src, dest, filter) {\r\n    return fs.promises.cp(src, dest, {\r\n        recursive: true,\r\n        filter: filter ? src => filter(src.replace(/\\\\/g, \"/\")) : undefined,\r\n    });\r\n}\r\n\r\n/**\r\n * @param {string} src\r\n * @param {string} dest\r","sourceCodeStart":1440,"sourceCodeEnd":1476,"githubUrl":"https://github.com/microsoft/typescript-go/blob/1bcfa18d79a3be41772223d5c05dfe4480e614ff/Herebyfile.mjs#L1440-L1476","documentation":"After signing, outputs are verified (hashes etc.); files that fail verification are collected into a failures list and reported together in one aggregate error at the end of the signing run.","triggerScenarios":"Signing-service errors, partially written outputs, post-sign hash mismatches, or unreadable signed files add entries to failures and trigger this error.","commonSituations":"Transient signing-service/network failures; code-signing auth problems; antivirus or post-processing modifying files after signing on Windows.","solutions":["Read the per-file bullet lines in the error to see exactly which files failed and why","Fix the root cause (auth, disk, service availability) and re-run the signing task","If transient, retry the signing step, then verify sha256 hashes of the outputs manually"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await signAll(files); } catch (e) { if (/Some files failed to sign/.test(e.message)) { log the failure list; await delay(backoffMs); return signAll(files); // signing is idempotent per file } throw e; }","preventionTips":["Capture the per-file failure bullets before retrying so root causes are not lost","Verify sha256 hashes of signed outputs as a separate post-step","Exclude signing output directories from antivirus scanning on Windows"],"tags":["signing","verification","retry","release"],"backgroundTag":null,"analyzedSha":"1bcfa18d79a3be41772223d5c05dfe4480e614ff","analyzedAt":"2026-08-16T02:12:00.115Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}