isomorphic-git: [Obsidian-git] SHA check failed!
Please be sure to mention:
- whether you are using Node or the Browser
Obsidian app, iOS version, in one of its plugin called obsidian-git. Guess it’s counted in the Browser category?
- how you are using it (if you are using a bundler what bundler; if you are using a
<script>
tag what CDN URL)
A Javascript plugin of Obsidian mentioned above: obsidian-git
This obsidian-git plugin makes Obsidian vaults of Markdown notes able to do Git actions, which can be executed on major OS platforms.
Recently on iOS, we are encountering this issue: https://github.com/denolehov/obsidian-git/issues/503 i.e. when pushing changes to the remote repo, an error message reads:
InternalError: An internal error caused this
command to fail. Please file a bug report at
https://github.com/isomorphic-git/isomorphic-
git/issues with this error message: SHA check
failed! Expected
27eb43e79ec4b1236d2ba1b27e738f279420bd93
, computed
b77dOb17f624d487b84cc67d4510794aeb34981
9
(SHA values vary with different instances)
Could you provide some insights so that we can have better information to fix on the obsidian-git side, or try to workaround/fix the situations? (I’m one of users of Obsidian, not developer of obsidian-git)
Feel free to correct me if this issue does not belong here.
Best regards
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 22 (7 by maintainers)
But this project some time ago introduced a big by merging the wrong PR, it seems right but it was causing for very slow statusMatrix. Maybe all the Obsidian Git has to do is update dependencies. But you need to report this to the Obsidian Git extension, we can’t fix this on our part.
I experience this issue reliably and do not use iCloud at all
I didn’t really change something in my setup. I’m also just reporting that I got a pop-up telling me that this is something I should open an issue about in this Github and saw that someone else had the same issue than me on the same day. I see that neither obsidian-git nor this project has received updates in the last days but that can also mean that there is a bug in there that hasn’t been caused by the last commit. “Pretty stable” does not mean void of bugs.
My problem was not replicateable with other git clients and after copied out my changed files, deleted the repository, cloned it again, applied the changes as before I could push. I did not dive into the source code but judging from the hash error it feels a bit like that the state during which the file was pushed was modified during the commit (e.g. the hash was computed while I was still typing) and that lead to a hash that did not correspond to the hash that was commited last into the repo.
Is that possible? If yes, then file buffers would need to be locked before starting the commit. That could also be something of interest to obsidian-git in that case. Just trying to find a productive solution approach here and collect some info we can pass on to the obsidian-git devs.