overleaf/overleaf · error
Split test '${splitTestName}' not found
Error message
Split test '${splitTestName}' not found What it means
Precondition failure in the feature-flag migration script's main(): no document in the splittests Mongo collection matches the configured splitTestName, so the script cannot derive a version to convert into a feature flag. Check the script's splitTestName constant against the database.
Source
Thrown at services/web/scripts/insert_feature_flag_alpha_phase_0.mjs:69
i--
j--
} else if (j > 0 && (i === 0 || dp[i][j - 1] >= dp[i - 1][j])) {
result.unshift(`${GREEN}+ ${bLines[j - 1]}${RESET}`)
j--
} else {
result.unshift(`${RED}- ${aLines[i - 1]}${RESET}`)
i--
}
}
return result.join('\n')
}
async function main() {
const splitTest = await db.splittests.findOne({ name: splitTestName })
if (!splitTest) {
throw new Error(`Split test '${splitTestName}' not found`)
}
if (!splitTest.versions || splitTest.versions.length === 0) {
throw new Error(`Split test '${splitTestName}' has no versions`)
}
const firstVersion = splitTest.versions[0]
const newVersion = {
...firstVersion,
versionNumber: 1,
phase: 'alpha',
active: true,
variants: firstVersion.variants.map(v => ({
...v,
rolloutPercent: 0,
rolloutStripes: [],
})),View on GitHub (pinned to 28ad3b03b7)
Solutions
- Verify the splitTestName constant matches an existing entry in the splittests collection
- Run against the correct database/environment
- Fix the name typo and re-run the script
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at services/web/scripts/insert_feature_flag_alpha_phase_0.mjs:69 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of overleaf/overleaf@28ad3b03b7 (2026-09-03).
Data as JSON: /api/errors/5fa7314a24de2444.
Report an issue: GitHub.