gchq/CyberChef · error · OperationError
A minimum of three rotors must be supplied
Error message
A minimum of three rotors must be supplied
What it means
Thrown by MultipleBombe.run when the main-rotors text area (args[1]) splits into fewer than 3 lines. The Bombe needs at least three rotors to search rotor orders, so fewer than three is an invalid configuration. Each line was already individually validated by validateRotor before this count check.
Source
Thrown at src/core/operations/MultipleBombe.mjs:198
* @param {Object[]} args
* @returns {string}
*/
run(input, args) {
const mainRotorsStr = args[1];
const fourthRotorsStr = args[2];
const reflectorsStr = args[3];
let crib = args[4];
const offset = args[5];
const check = args[6];
const rotors = [];
const fourthRotors = [];
const reflectors = [];
for (let rstr of mainRotorsStr.split("\n")) {
rstr = this.validateRotor(rstr);
rotors.push(rstr);
}
if (rotors.length < 3) {
throw new OperationError("A minimum of three rotors must be supplied");
}
if (fourthRotorsStr !== "") {
for (let rstr of fourthRotorsStr.split("\n")) {
rstr = this.validateRotor(rstr);
fourthRotors.push(rstr);
}
}
if (fourthRotors.length === 0) {
fourthRotors.push("");
}
for (const rstr of reflectorsStr.split("\n")) {
const reflector = new Reflector(rstr);
reflectors.push(reflector);
}
if (reflectors.length === 0) {
throw new OperationError("A minimum of one reflector must be supplied");
}
if (crib.length === 0) {View on GitHub (pinned to 4290ea7539)
Solutions
- Provide at least three rotor lines in the main-rotors field (the standard five Wehrmacht rotors I–V are typical).
- Paste the canonical rotor set from the operation defaults.
- Confirm there are no blank trailing lines that consume a slot.
Example fix
// before (only 2 rotors) EKMFLGDQVZNTOWYHXUSPAIBRCJ AJDKSIRUXBLHINTMCYGFPZWOEV // after (add a third) EKMFLGDQVZNTOWYHXUSPAIBRCJ AJDKSIRUXBLHINTMCYGFPZWOEV BDFHJLCPRTXVZNYEIWGAKMUSQO
Defensive patterns
Strategy: validation
Validate before calling
const mainRotorsStr = args[1];
if (mainRotorsStr.split("\n").length < 3) {
// add more rotor lines before running
} Type guard
const hasMinThreeRotors = (s) => s.split("\n").length >= 3; Try / catch
try { chef.bake("Multiple Bombe", args); }
catch (e) { if (e.message === "A minimum of three rotors must be supplied") addRotors(); else throw e; } Prevention
- Keep the standard five-rotor pool (I–V) in the field.
- Avoid deleting rotor lines below three.
- Validate line count before baking.
When it happens
Trigger: run(input, args) where args[1].split('\n').length < 3 — i.e. the main rotors field contains 0, 1, or 2 lines. An empty string still splits to [''] (length 1) and validateRotor will throw first on that empty line, so this specific error is reached when 1 or 2 valid rotors are supplied.
Common situations: User deleted rotor lines leaving only two; pasting a partial rotor set; recipe shared with a trimmed rotor field; misunderstanding that the field needs a pool of at least three rotors to choose from.
Related errors
- Rotor wiring must be 26 unique uppercase letters
- A minimum of one reflector must be supplied
- Crib cannot be empty
- Offset cannot be negative
- ${name} connects ${pair[1]} more than once
AI-assisted analysis of gchq/CyberChef@4290ea7539 (2026-08-13).
Data as JSON: /api/errors/1f920573f4b0cbd8.
Report an issue: GitHub.