bugs/"invalid object" errors cropping upgit-annexhttp://git-annex.branchable.com/bugs/__34__invalid_object__34___errors_cropping_up/git-annexikiwiki2016-05-31T16:17:57Zcomment 1http://git-annex.branchable.com/bugs/__34__invalid_object__34___errors_cropping_up/comment_1_d146a64ef8d76c2a7e45bf85d8943456/joey2016-05-23T17:59:45Z2016-05-23T16:52:23Z
<p>Try running <code>git fsck</code> and see if it complains about a corrupt object file.
You may then need to delete the object file and fix up the repository to
not refer to it. <code>git annex repair</code> can probably handle that.</p>
<blockquote><p>Some object in the broken repo seems to be causing this issue somehow.</p></blockquote>
<p>Maybe, but you also say that the object it complains about has varied.
Perhaps you have multiple corrupt objects in the git repo..</p>
<p>You mention "litelog". What is that and how is it relevant? Is Android
involved somehow?</p>
comment 2http://git-annex.branchable.com/bugs/__34__invalid_object__34___errors_cropping_up/comment_2_6585b15aa7ae63175482d08b2b5b79fc/xloem2016-05-29T02:02:38Z2016-05-29T02:02:38Z
<p>This has occurred for me yet again, after starting a new remote.</p>
<p>Strangely 'git fsck' succeeds, showing only dangling objects, but 'git annex sync' fails on commit with this error.</p>
<p>litelog is a set of service scripts I'm making which automatically record and log from devices when they are connected. Voice recorder and sensor logs are copied off of android phones from a handful of supported apps.</p>
comment 3http://git-annex.branchable.com/bugs/__34__invalid_object__34___errors_cropping_up/comment_3_973d90a6fde1c6f26fcf594610693fad/joey2016-05-31T16:17:57Z2016-05-31T15:59:49Z
<p>It may be that .git/annex/index is referring to an object that is somehow
not present in the git object store. In this case, deleting the index file
may recover.</p>
<p>I can't see any way this can normally happen (short of the object file
getting deleted somehow); git should always write
objects to the object store before their sha1s are available to be put in
an index file. But, a couple of people have reported something like this
before.</p>
<p>Any clues to reproducing it would be useful.</p>