phacility/phabricator · error · Exception

Expected "multipart/form-data" parse to end in state "epilog

Error message

Expected "multipart/form-data" parse to end in state "epilogue".

What it means

Thrown by 'bin/repository update' when the resolved repository set does not contain exactly one repository. This workflow runs pull and discovery for a single repository; passing zero or multiple resolved repositories is rejected before any pull starts. Because loadLocalRepositories() filters to repositories hosted on the current device, a correctly-named repository that is not local to this machine also resolves to zero and produces this error.

Source

Thrown at src/aphront/multipartparser/AphrontMultipartParser.php:239

          $this->state = 'endboundary';
          break;
        case 'epilogue':
          // We just discard any epilogue.
          $this->buffer = '';
          $continue = false;
          break;
        default:
          throw new Exception(
            pht(
              'Unknown parser state "%s".\n',
              $this->state));
      }
    }
  }

  public function endParse() {
    if ($this->state !== 'epilogue') {
      throw new Exception(
        pht(
          'Expected "multipart/form-data" parse to end '.
          'in state "epilogue".'));
    }

    return $this->parts;
  }


}

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Pass exactly one repository identifier: 'bin/repository update R123'.
  2. Run the command on a device that actually hosts the working copy (verify with Almanac bindings or the repository's Cluster URI).
  3. Check scripts for empty or unquoted repository variables.

Example fix

# before
bin/repository update

# after
bin/repository update R123 --verbose
Defensive patterns

Strategy: validation

Validate before calling

# Resolve the monogram on this host before updating:
bin/repository list "$REPO" >/dev/null 2>&1 || { echo 'repo not found on this device' >&2; exit 1; }
bin/repository update "$REPO"

Prevention

When it happens

Trigger: Running 'bin/repository update' with no repos argument, with several monikers, or with a moniker whose repository is not hosted on this device: count($repos) !== 1 at PhabricatorRepositoryManagementUpdateWorkflow.php:52 throws.

Common situations: Running update on the wrong cluster node or on a web host without local working copies; scripts looping with a variable that expanded empty; passing a monogram with a typo so it resolves to nothing.

Related errors


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