Bug: Packfile payload corrupted - calculated SHA mismatch on Android (Obsidian Git plugin)

Author: Git-creat7Created Jun 24, 2026Updated Jun 24, 2026

Bug Report

Error Message

\
Packfile payload corrupted: calculated aa1b820f224c194fa6b9bb94b0ee51e6dc392638 but expected 7eb1cb6c883ee3724c5104b1f6a8b8175aabd4c2. The packfile may have been tampered with. \\

Environment

  • Platform: Android
  • Application: Obsidian (mobile app) using the Obsidian Git plugin
  • Library: isomorphic-git (bundled within Obsidian Git plugin)

Description

When attempting to perform git operations (clone/fetch/pull) via the Obsidian Git plugin on Android, the command fails with a \Packfile payload corrupted\ error. The calculated SHA (\a1b820f224c194fa6b9bb94b0ee51e6dc392638) does not match the expected SHA (\7eb1cb6c883ee3724c5104b1f6a8b8175aabd4c2), indicating that the packfile content received does not match what the server advertised.

This suggests the packfile data was either corrupted during transfer or truncated before the full payload was received.

Possible Causes

  1. Network instability on mobile: Android devices on mobile networks may experience intermittent connections, leading to truncated HTTP responses that isomorphic-git does not detect gracefully.
  2. HTTP response not fully buffered: isomorphic-git may be reading the packfile stream before the complete response body has been received, especially on high-latency mobile connections.
  3. Missing Content-Length validation: There may be insufficient validation that the received packfile size matches expectations before computing the SHA checksum.

Reproduction Steps

  1. Install Obsidian on an Android device.
  2. Install the Obsidian Git plugin.
  3. Configure a remote git repository.
  4. Attempt to clone or pull the repository.
  5. Observe the \Packfile payload corrupted\ error.

Workaround

Re-running the operation sometimes succeeds, suggesting the issue is transient and likely related to network conditions on mobile.

Additional Notes

This error originates from isomorphic-git's internal packfile parsing. The Obsidian Git plugin delegates all git operations to isomorphic-git, so the root cause lies here rather than in the plugin.

Source: isomorphic-git/isomorphic-git