gchq/CyberChef · warning · OperationError
Error while attempting to extract ${detectedFile.fileDetails
Error message
Error while attempting to extract ${detectedFile.fileDetails.name} at offset ${detectedFile.offset}:\n${err.message} What it means
Thrown by the Extract Files operation when one or more file carving extractions fail and the 'Ignore failed extractions' option is disabled. The operation scans input for known file signatures and attempts extraction; failures are collected and surfaced as a combined error listing each failed file name and offset.
Source
Thrown at src/core/operations/ExtractFiles.mjs:104
const errors = [];
detectedFiles.forEach(detectedFile => {
try {
const file = extractFile(bytes, detectedFile.fileDetails, detectedFile.offset);
if (file.size >= minSize)
files.push(file);
} catch (err) {
if (!ignoreFailedExtractions && err.message.indexOf("No extraction algorithm available") < 0) {
errors.push(
`Error while attempting to extract ${detectedFile.fileDetails.name} ` +
`at offset ${detectedFile.offset}:\n` +
`${err.message}`
);
}
}
});
if (errors.length) {
throw new OperationError(errors.join("\n\n"));
}
return files;
}
/**
* Displays the files in HTML for web apps.
*
* @param {File[]} files
* @returns {html}
*/
async present(files) {
return await Utils.displayFilesAsHTML(files);
}
}
View on GitHub (pinned to 4290ea7539)
Solutions
- Enable the 'Ignore failed extractions' option (default is true) to suppress non-fatal extraction errors.
- Increase 'Minimum File Size' to filter out small false-positive signatures that fail extraction.
- Inspect the error message for each offset to identify which embedded file is problematic.
- Provide cleaner input data without truncated or overlapping embedded files.
Example fix
// before: args 'Ignore failed extractions' = false // extraction of a corrupted ZIP at offset 0x100 fails -> error // after: set 'Ignore failed extractions' = true // failed extractions are silently skipped, valid files returned
Defensive patterns
Strategy: validation
Validate before calling
// Enable 'Ignore failed extractions' to suppress non-fatal carving errors const args = [...categories, true /* ignoreFailed */, 100 /* minSize */];
Try / catch
try {
const files = chef.extractFiles(input, args);
} catch (e) {
if (e.message.includes('Error while attempting to extract')) {
// Toggle ignoreFailedExtractions or increase minSize and retry
} else throw e;
} Prevention
- Keep 'Ignore failed extractions' enabled (the default) unless debugging.
- Set a reasonable Minimum File Size to filter false positives.
- Inspect which offsets fail to identify problematic embedded files.
When it happens
Trigger: run(input, args) where ignoreFailedExtractions (second-to-last arg) is false, and at least one detected file signature's extractFile() throws an error whose message does NOT contain 'No extraction algorithm available'. All such errors are accumulated and thrown at line 104.
Common situations: User unchecks 'Ignore failed extractions' and processes data containing partial/overlapping file signatures, corrupted embedded files, or false-positive signature matches that fail during extraction.
Related errors
- Unsupported input IP format
- Unsupported output IP format
- Alphabet must be of length 58
- Alphabet must be of length 85
- The all-zero group char cannot appear in the alphabet
AI-assisted analysis of gchq/CyberChef@4290ea7539 (2026-08-13).
Data as JSON: /api/errors/e9c6d7b72b9ffbf2.
Report an issue: GitHub.