Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Failed to run issue: Error: GitRPC::BadObjectState #29

Open
RKeelan opened this issue Jul 27, 2024 · 2 comments
Open

Error: Failed to run issue: Error: GitRPC::BadObjectState #29

RKeelan opened this issue Jul 27, 2024 · 2 comments

Comments

@RKeelan
Copy link

RKeelan commented Jul 27, 2024

I got Error: Failed to run issue: Error: GitRPC::BadObjectState - https://docs.github.com/rest/git/trees#create-a-tree when trying to run a simple PR.

Here is a screenshot of the error message:
image

Here is an extract from the log:

GET /repos/RKeelan/Website/contents/Site%2Fstories.html?ref=buildware-ai%2FRename-Index.html%2F1722103982687 - 404 with id D41C:1A417E:D1F760:1843DF4:66A538AF in 225ms
File not found: Site/stories.html. Treating as new file.
POST /repos/RKeelan/Website/git/trees - 422 with id D41B:1D97B1:CB67CE:1785DB1:66A538AF in 207ms
 ⨯ HttpError: GitRPC::BadObjectState - https://docs.github.com/rest/git/trees#create-a-tree
    at async generatePR (./actions/github/generate-pr.ts:101:28)
digest: "560742415"
 POST /4263aac5-fec9-4629-bf7b-3352ec81b4b9/f80b0781-27f8-487b-b81a-ac9a029ee08a/issues/ea10275b-e32b-487c-988b-d2c32cc9b99b 500 in 1194ms
 POST /4263aac5-fec9-4629-bf7b-3352ec81b4b9/f80b0781-27f8-487b-b81a-ac9a029ee08a/issues/ea10275b-e32b-487c-988b-d2c32cc9b99b 200 in 361ms
 POST /4263aac5-fec9-4629-bf7b-3352ec81b4b9/f80b0781-27f8-487b-b81a-ac9a029ee08a/issues/ea10275b-e32b-487c-988b-d2c32cc9b99b 200 in 302ms

Buildware is running locally in Simple mode. This is the first issue I've attempted to run, so I can't rule out a permissions issue, but I did follow the simple setup instructions. I've checked the Postgres DB, and I see records in issues and issues_messages. I was able to reproduce the issue by re-running the PR.

@RKeelan
Copy link
Author

RKeelan commented Jul 27, 2024

I took a look at generate-pr.ts on the debugger and it looks like the PR that Buildware was trying to make had changes to three files:

  • Site/index.html: Edit content
  • Site/about.html: Edit content
  • Site/index.html: Delete

The request I'm running is "Change the name of index.html to stories.html," so it seems like one problem is that the PR should be adding Site/stories.html as the first change. I tried modifying the path of the first change directly in the debugger, which resulted in a different error: TypeError: Cannot read properties of undefined (reading 'headers') (But it wouldn't surprise me at all if modifying the changes directly in the debugger like that broke something.

Perhaps updating the same path in two ways is what causes the GitRPC::BadObjectState? I don't know enough about GitHub's API to say.

@RKeelan RKeelan closed this as completed Jul 27, 2024
@RKeelan RKeelan reopened this Jul 27, 2024
@RKeelan
Copy link
Author

RKeelan commented Jul 27, 2024

(I pressed the wrong button for my previous comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant