Kong/insomnia · error

Failed to get commit id=

Error message

Failed to get commit id=${id}

What it means

Guard inside VCS.getHistory while walking branch.snapshots: an id recorded on the branch does not resolve to a stored snapshot, indicating inconsistent local VCS history (snapshot file deleted or branch record corrupted). The unresolvable id is included.

Solutions

  1. Pull from the remote to restore missing snapshots
  2. Re-create the project sync data if history is unrecoverable
  3. Report storage corruption if it recurs
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/insomnia-vcs/src/vcs.ts:620 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26). Data as JSON: /api/errors/f0ba980967875662. Report an issue: GitHub.

Appendix: source

Thrown at packages/insomnia-vcs/src/vcs.ts:620

    };
  }

  async getHistoryCount() {
    const branch = await this._getCurrentBranch();
    return branch?.snapshots.length || 0;
  }

  async getHistory(count = 0) {
    const branch = await this._getCurrentBranch();
    const snapshots: Snapshot[] = [];
    const total = branch.snapshots.length;
    const slice = count <= 0 || count > total ? 0 : total - count;

    for (const id of branch.snapshots.slice(slice)) {
      const snapshot = await this._getSnapshot(id);

      if (snapshot === null) {
        throw new Error(`Failed to get commit id=${id}`);
      }

      snapshots.push(snapshot);
    }

    return snapshots;
  }

  async getCurrentBranchName() {
    const branch = await this._getCurrentBranch();
    return branch.name;
  }

  async getRemoteBranchNames(): Promise<string[]> {
    const { branches } = await this._runGraphQL<{ branches: { name: string }[] | null }>(
      `
      query ($projectId: ID!) {
        branches(project: $projectId) {

View on GitHub (pinned to d9bb2b0142)