overleaf/overleaf · error

failed to check project

Error message

failed to check project

What it means

Warning logged in the bulk_resync fix-up's checkProject when one of the heuristic condition checks throws while inspecting a project document (e.g. unexpected document shape making a condition accessor fail). The remaining conditions are still evaluated and the loop continues — the error only prevents that single condition from matching, so a genuinely affected project could be missed.

Source

Thrown at services/project-history/scripts/bulk_resync_file_fix_up.mjs:172

}

/**
 * @param {Project} project
 * @return {Promise<{projectId: string, historyId: string} | null>}
 */
async function checkProject(project) {
  if (gracefulShutdownInitiated) return null
  if (project._id.getTimestamp() > FILESTORE_READ_OFF) {
    STATS.skipped++ // Project created after all bugs were fixed.
    return null
  }
  const projectId = project._id.toString()
  const historyId = project.overleaf.history.id.toString()
  for (const [condition, check] of Object.entries(conditions)) {
    try {
      if (await check(project)) return { projectId, historyId }
    } catch (err) {
      logger.err({ projectId, condition, err }, 'failed to check project')
      STATS.checkFailure++
      return null
    }
  }
  STATS.skipped++
  return null
}

/**
 * @param {string} projectId
 * @param {string} historyId
 * @return {Promise<void>}
 */
async function processProject(projectId, historyId) {
  if (gracefulShutdownInitiated) return
  const t0 = performance.now()
  try {
    await tryProcessProject(projectId, historyId)

View on GitHub (pinned to 28ad3b03b7)

Solutions

  1. Inspect the logged err to see which condition accessor failed
  2. Harden condition checks against missing/legacy project fields
  3. Re-run the script for the affected project once the condition is fixed
  4. Cross-check STATS to see how many projects had conditions skipped
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at services/project-history/scripts/bulk_resync_file_fix_up.mjs:172 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/444df4d6bf46002e. Report an issue: GitHub.