{"record":{"id":"b31b9987e09ab982","repo":"affaan-m/ECC","slug":"nasiko-archive-size-mismatch","errorCode":null,"errorMessage":"Nasiko archive size mismatch.","messagePattern":"Nasiko archive size mismatch\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/nasiko-release.js","lineNumber":278,"sourceCode":"  if (!options.yes) throw new Error('Nasiko installation requires explicit --yes consent.');\n  fs.mkdirSync(installDirectory, { recursive: true, mode: 0o755 });\n  assertPrivateInstallDirectory(installDirectory);\n  const releaseLock = acquireLifecycleLock(installDirectory);\n  const metadataPath = metadataPathFor(destination);\n  let destinationOwned = false;\n  let metadataOwned = false;\n  try {\n    const existing = inspectInstalledNasiko(destination);\n    if (existing.installed) {\n      if (existing.qualified && existing.version === version) return { ...plan, dryRun: false, installed: true, reused: true };\n      throw new Error('An unqualified or incompatible Nasiko executable or receipt already exists at the destination.');\n    }\n    const retrieve = dependencies.fetchBytes || fetchBytes;\n    const manifestBytes = await retrieve(`${REGISTRY_ORIGIN}/v2/${REPOSITORY}/manifests/${release.manifestDigest}`, { accept: 'application/vnd.oci.image.manifest.v1+json', maxBytes: MAX_MANIFEST_BYTES });\n    assertDigest(manifestBytes, release.manifestDigest, 'Nasiko manifest');\n    const layer = validateManifest(manifestBytes);\n    const archiveBytes = await retrieve(`${REGISTRY_ORIGIN}/v2/${REPOSITORY}/blobs/${layer.digest}`, { maxBytes: MAX_ARCHIVE_BYTES });\n    if (archiveBytes.length !== layer.size) throw new Error('Nasiko archive size mismatch.');\n    assertDigest(archiveBytes, layer.digest, 'Nasiko archive');\n    const binary = (dependencies.extractBinary || extractQualifiedTarGzip)(archiveBytes, release.binaryName);\n    assertDigest(binary, release.binaryDigest, 'Nasiko binary');\n    if (dependencies.beforePublish) dependencies.beforePublish(destination);\n    const descriptor = fs.openSync(destination, 'wx', 0o700);\n    destinationOwned = true;\n    try {\n      fs.writeFileSync(descriptor, binary);\n      fs.fsyncSync(descriptor);\n      if (fs.fstatSync(descriptor).size !== binary.length) throw new Error('Published Nasiko binary size mismatch.');\n    } finally { fs.closeSync(descriptor); }\n    const metadata = { version, platform: release.os, architecture: release.arch, manifestDigest: release.manifestDigest, artifactDigest: layer.digest, binaryDigest: release.binaryDigest, installedPath: destination, license: release.license, sourceUrl: release.sourceUrl };\n    (dependencies.writeMetadata || writeMetadataExclusive)(metadataPath, metadata);\n    metadataOwned = true;\n    return { ...plan, dryRun: false, installed: true, reused: false, artifactDigest: layer.digest };\n  } catch (error) {\n    if (metadataOwned) fs.rmSync(metadataPath, { force: true });\n    if (destinationOwned) fs.rmSync(destination, { force: true });","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/scripts/lib/nasiko-release.js#L260-L296","documentation":"During install, the downloaded Nasiko archive's actual size did not match the size declared in the verified OCI manifest. A size mismatch means the transfer was truncated or corrupted, so the installer aborts before extracting anything.","triggerScenarios":"Thrown at scripts/lib/nasiko-release.js:278 when the library encounters an invalid state.","commonSituations":"Raised when input validation fails because: Nasiko archive size mismatch.. Typically caused by a missing, malformed, or out-of-range argument or configuration value.","solutions":["Provide a value that satisfies the validation: Nasiko archive size mismatch.","Check the calling command or configuration for the reported field and correct it, then retry.","Run the command with --help to review the expected input shape and allowed values."],"exampleFix":"Correct the invalid input so that the following holds: Nasiko archive size mismatch.","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}