phacility/phabricator · error · Exception

Synchronization of child task from Asana failed!

Error message

Synchronization of child task from Asana failed!

What it means

While syncing subtasks, the worker imports every Asana object referenced by existing subtask edges and checks each ref. A ref with getSyncFailed() true — the Asana API fetch for that child task failed — triggers this plain Exception. Like error 531 it is a generic Exception, so the task queue retries the whole story worker with backoff rather than dropping it.

Source

Thrown at src/applications/doorkeeper/worker/DoorkeeperAsanaFeedWorker.php:274

    $sub_editor = new PhabricatorEdgeEditor();

    // First, find all the object references in Phabricator for tasks that we
    // know about and import their objects from Asana.
    $sub_edges = $edges[$src_phid][$etype_sub];
    $sub_refs = array();
    $subtask_data = $this->getAsanaSubtaskData($object);
    $have_phids = array();

    if ($sub_edges) {
      $refs = id(new DoorkeeperImportEngine())
        ->setViewer($possessed_user)
        ->withPHIDs(array_keys($sub_edges))
        ->execute();

      foreach ($refs as $ref) {
        if ($ref->getSyncFailed()) {
          throw new Exception(
            pht('Synchronization of child task from Asana failed!'));
        }
        if (!$ref->getIsVisible()) {
          $ref->getExternalObject()->delete();
          continue;
        }
        $have_phids[$ref->getExternalObject()->getPHID()] = $ref;
      }
    }

    // Remove any edges in Phabricator which don't have valid tasks in Asana.
    // These are likely tasks which have been deleted. We're going to respawn
    // them.
    foreach ($sub_edges as $sub_phid => $sub_edge) {
      if (isset($have_phids[$sub_phid])) {
        continue;
      }

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Check the daemon log to identify which subtask import failed and why
  2. Leave the worker to retry if Asana was transiently failing (this Exception is retried, not permanent)
  3. Fix access on the specific Asana subtask if it is a permissions problem
  4. Remove the stale Phabricator edge to the problematic subtask if it no longer exists
Defensive patterns

Strategy: retry

Try / catch

// Same scaffolding as the parent-task case: only permanent failures end the task.
try {
  $this->syncSubtasks();
} catch (PhabricatorWorkerPermanentFailureException $ex) {
  phlog($ex);
  throw $ex;
}
// Plain Exceptions (sync failure) are retried with backoff by the worker queue.

Prevention

When it happens

Trigger: Any one of the imported Asana subtask refs reports a failed sync: transient Asana API errors, rate limiting mid-batch, or one inaccessible subtask while others import fine. Note that an invisible (deleted) subtask does NOT throw here — it is deleted locally and skipped; only sync failure throws.

Common situations: Objects with many Asana subtasks where one fetch fails mid-batch; Asana throttling during bulk updates; a subtask whose permissions changed so the possessed users cannot fetch it.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/8a88ed1588f70078. Report an issue: GitHub.