{"record":{"id":"f4fcbf9fcdd64129","repo":"can1357/oh-my-pi","slug":"arj-member-memberpath-has-invalid-no-data-met","errorCode":null,"errorMessage":"ARJ member '${memberPath}' has invalid no-data method sizes","messagePattern":"ARJ member '(.+?)' has invalid no-data method sizes","errorType":"exception","errorClass":"ArchiveError","httpStatus":null,"severity":"error","filePath":"packages/utils/src/ar/arj.ts","lineNumber":193,"sourceCode":"\t\tlet output: Uint8Array;\n\t\tswitch (this.#method) {\n\t\t\tcase 0:\n\t\t\t\tif (packed.byteLength !== size)\n\t\t\t\t\tthrow new ArchiveError(`ARJ member '${memberPath}' has inconsistent stored size`);\n\t\t\t\toutput = packed.slice();\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\tcase 2:\n\t\t\tcase 3:\n\t\t\t\toutput = decompressLhStatic(packed, size, 26_624, 5, 17, `ARJ method ${this.#method}`);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\toutput = decompressArjMethod4(packed, size);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\tcase 9:\n\t\t\t\tif (size !== 0 || packed.byteLength !== 0) {\n\t\t\t\t\tthrow new ArchiveError(`ARJ member '${memberPath}' has invalid no-data method sizes`);\n\t\t\t\t}\n\t\t\t\toutput = new Uint8Array(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new ArchiveError(`ARJ member '${memberPath}' uses unsupported compression method ${this.#method}`);\n\t\t}\n\t\tif (output.byteLength !== size)\n\t\t\tthrow new ArchiveError(`ARJ member '${memberPath}' extracted to an unexpected size`);\n\t\tif (this.#method !== 8 && crc32(output) !== this.#crc) {\n\t\t\tthrow new ArchiveError(`ARJ member '${memberPath}' failed CRC32 verification`);\n\t\t}\n\t\treturn output;\n\t}\n}\n\nfunction normalizeHostPath(rawPath: string, hostOs: number): string {\n\tlet path = rawPath.replaceAll(\"\\\\\", \"/\");\n\tif (hostOs === 1) path = path.replaceAll(\">\", \"/\");","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/utils/src/ar/arj.ts#L175-L211","documentation":"This ArchiveError is thrown when an ARJ member uses a no-data compression method (8 = no data / descriptorless, 9) but the declared sizes are inconsistent: the uncompressed size must be 0 and the packed data range must also be empty. The library requires that no-data members carry no bytes at all.","triggerScenarios":"Calling member.read(size, memberPath) on an ARJ member whose method is 8 or 9 where either size !== 0 or packedSize !== 0 in the local header.","commonSituations":"Directories or placeholder entries mis-encoded with non-zero sizes by a buggy archiver; corrupted headers; archives created by tools that store directory entries with nonzero reserved sizes.","solutions":["Inspect the member's local header: ensure size and packedSize are both 0 for method 8/9 members.","Repack the archive with a compliant ARJ tool so directory entries are encoded with zero sizes.","Catch ArchiveError and skip the offending member path rather than aborting the whole extraction.","Report the archive to its producer if headers systematically disagree with the method field."],"exampleFix":"// before\nconst data = await member.read(0, member.path);\n// after\ntry {\n  const data = await member.read(0, member.path);\n} catch (e) {\n  if (e instanceof ArchiveError && e.message.includes('invalid no-data method sizes')) {\n    console.warn(`skipping malformed no-data member: ${member.path}`);\n  } else throw e;\n}","handlingStrategy":"validation","validationCode":"if ((member.method === 8 || member.method === 9) && (member.size !== 0 || member.packedSize !== 0)) {\n  throw new Error(`no-data member ${member.path} has non-zero sizes; header corrupt`);\n}","typeGuard":"function isNoDataMember(m: { method: number; size: number; packedSize: number }): boolean {\n  return (m.method === 8 || m.method === 9) && m.size === 0 && m.packedSize === 0;\n}","tryCatchPattern":"try {\n  const data = await member.read(size, path);\n} catch (e) {\n  if (e instanceof ArchiveError && e.message.includes('no-data method sizes')) {\n    // skip malformed placeholder/directory entry\n  } else throw e;\n}","preventionTips":["Skip method 8/9 members whose declared sizes are non-zero before reading","Treat directory/placeholder entries with non-zero sizes as suspect","Repack archives produced by non-standard tools"],"tags":["archive","arj","corruption","header-validation"],"backgroundTag":"archive-member-corrupt","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}