rbt post fails with git cat-file: could not get object info

1,496 views
Skip to first unread message

Greg Burcher

unread,
Mar 3, 2017, 12:14:59 PM3/3/17
to reviewboard
Not sure what has changed in our configuration or repository that could be the problem. We have been using reviewboard for a couple of years. In the past couple of days, "rbt post" is failing for multiple users with:

rbtools.commands.CommandError: Error validating diff

The specified diff file could not be parsed. (HTTP 400, API Error 224)

I used --debug and got this detail, with certain fields obfuscated:

$ rbt post --debug --tracking-branch=origin/myTrackingBranch
>>> RBTools 0.7.4
>>> Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
>>> Running on Windows-7-6.1.7601-SP1
>>> Home = C:\Users\myUserName\AppData\Roaming
>>> Current directory = C:\myDirectory
>>> Running: git version
>>> Checking for a Subversion repository...
>>> Unable to execute "svn help": skipping SVN
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git config --get branch.myBranchName.merge
>>> Command exited with rc 1: ['git', 'config', '--get', u'branch.myBranchName.merge']
---
>>> Running: git config --get branch.myBranchName.remote
>>> Command exited with rc 1: ['git', 'config', '--get', u'branch.myBranchName.remote']
---
>>> Running: git config --get remote.origin.url
>>> repository info: Path: https://myUserName@myGitServer/bitbucket/scm/myRepository.git, Base path: , Supports changesets: False
>>> Making HTTP GET request to http://myReviewBoardServer/api/
>>> Running: git rev-parse refs/heads/myBranchName
>>> Running: git merge-base 71f1767180902f1cf6b3defbc8d5a9869576bf25 origin/myTrackingBranch
>>> Running: git rev-parse 2250f117eedb858afeaf824e2c45b22246a1d2fa
>>> Running: git status --porcelain --untracked-files=no
>>> Running: git rev-parse --git-dir
>>> Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules -M --no-ext-diff 2250f117eedb858afeaf824e2c45b22246a1d2fa..71f1767180902f1cf6b3defbc8d5a9869576bf25
>>> Cached response for HTTP GET http://myReviewBoardServer/api/validation/diffs/ expired and was modified
>>> Making HTTP POST request to http://myReviewBoardServer/api/validation/diffs/
>>> Got API Error 224 (HTTP code 400): The specified diff file could not be parsed.
>>> Error data: {u'stat': u'fail', u'reason': u'fatal: git cat-file: could not get object info\n', u'err': {u'msg': u'The specified diff file could not be parsed.', u'code': 224}}
Traceback (most recent call last):
  File "C:/tools/RBTools/bin/../Python27/Scripts/rbt-script.py", line 8, in <module>
    load_entry_point('RBTools==0.7.4', 'console_scripts', 'rbt')()
  File "C:\tools\RBTools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\commands\main.py", line 133, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "C:\tools\RBTools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\commands\__init__.py", line 612, in run_from_argv
    exit_code = self.main(*args) or 0
  File "C:\tools\RBTools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\commands\post.py", line 754, in main
    (msg_prefix, e))
rbtools.commands.CommandError: Error validating diff

The specified diff file could not be parsed. (HTTP 400, API Error 224)

Can anyone help with this error?

Christian Hammond

unread,
Mar 3, 2017, 4:01:22 PM3/3/17
to revie...@googlegroups.com
Hi Greg,

Are older diffs in Review Board able to load? (Ones that would have fallen out of cache). I'm curious if this is something affecting only newer diffs.

This is often due to changes on the Git repository. Mirroring may be failing, for instance, if this is a clone of the main repository.

Might want to also manually run some commands on that Git repository and see if the state of the tree looks correct.

Christian


--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
-- 
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Greg Burcher

unread,
Mar 6, 2017, 10:04:02 AM3/6/17
to reviewboard, chri...@beanbaginc.com
Thanks Christian. Our RB server keeps a local repository, and pulls via cron job to stay current. When we checked that local repository, there were merge conflicts, so all the pulls had been failing for a few days. I have no idea why that repository would have merge conflicts, but we reset and now all is well. Thanks again for your reply. That was the clue that set us on the right track to resolve the issue.

Christian Hammond

unread,
Mar 6, 2017, 2:43:39 PM3/6/17
to Greg Burcher, reviewboard
Hi Greg,

Glad you were able to find the cause! Perhaps a force push caused that somewhere?

Christian 

Caroline

unread,
Jan 8, 2018, 5:06:52 PM1/8/18
to Review Board Community
Hi, 

I have same issue here.

Could you post your command of how to do reset here?

Thanks

C

Christian Hammond

unread,
Jan 9, 2018, 12:13:34 AM1/9/18
to revie...@googlegroups.com
Hi Caroline,

I'd be interested in seeing how you're handling keeping the clone active. I'm not sure what command he ran exactly, so I don't want to give the wrong advice for your setup.

Does the clone exist solely for Review Board? Where does the main repository live?

Christian

You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages