-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
500 Error On Release Page #8482
Comments
Could be that you have pushed tags for branches that are not pushed to repo? |
All of the tags are version tags off of master unless I made a mistake along the way. Is there a way to find out? But I am very confident I've only ever tagged off master EDIT: I've only ever had maybe 4 temp branches besides master on this repo. |
I think if that were the case, I would have been able to reproduce on the try.gitea.io instance |
If someone wants to take a look at my database I can send it. There's no secret repos in it. I'll scrub the password hashes first (its just me) |
Hmm, those logs are xorm logs. Is there any console output? For a 500 you should have something logged. Another option is to switch the In fact that would probably be quite helpful as we should see the trace of the error. |
Sounds like I am indeed missing a referenced branch from that error? The problem is this project began on GitHub, and I'm migrating it to gitea. I've pushed the only branch I still have lying around to gitea with no luck. Not sure where to go from here. |
So that's coming from: Lines 36 to 40 in 3249c0c
|
And from your logs it looks like it's release id 10 |
Now this is odd, because we first of all test is the BranchExists and then when we try to get the commit it fails. So it's a bit weird. Either one of these is lying to us or the git object db and it's references are broken. Hmm what to do... I guess it would be nice to find out what the target is - that can be done by interrogating the database. Then it would be helpful to check the git repository on the server to see if that target is there. It could be that the tags haven't been pushed completely or some other weirdness. Another thing is to check those functions above to see if they really are looking at the same thing |
Very early in the project I did rebase master one time. I know thats a no-no, but the project wasn't public yet, and I already had some tagged releases. Would that have this effect? I'll try to take a look at the db and see what release id 10 points at |
This is the release record:
I'll take a look at that tag |
It's the target you should be looking at. In your record it appears to be empty. Not sure why it would be that way though. |
Okay. What data from the tag should be there? Even if we can't figure out why it's missing, I'd like fix it so I can use the releases page. Or maybe I should just remove the record/tag and move on? |
I guess you could just add the tag name as the target? Assuming it's present in the git references. Just double check it's actually empty because if it's not we're going down the wrong route. I don't know this bit of code at all - I've never actually looked at it. So I literally have no idea how it have gone wrong. Target clearly needs to be a commit reference that git can find. TBF It's a bit crap that one error in one release causes a 500 - I think this needs a review. IsBranchExist is probably to blame though here - it shouldn't be returning true if the target is empty or can't be got. So I think I'm gonna look at that first. |
IsBranchExist is: gitea/modules/git/repo_branch.go Lines 29 to 33 in 5e759b6
I suspect this might return true I think if name was empty. So that's probably a problem. |
gitea/modules/git/repo_commit.go Lines 147 to 154 in ee11974
gitea/modules/git/repo_commit.go Lines 37 to 40 in ee11974
So if name is empty this would cause your error. |
The target is for sure empty |
If you're able to rebuild Gitea you could try adjusting if name == "" {
return false
} Appropriately fmt'd of course. |
I'm using the binary package provided from freebsd so I cannot do that. |
Not a single release record has a target and there are 51 of them |
Oks I should just check that this function hasn't changed between 1.10 and 1.9.3 They haven't. |
Where have you got this FreeBSD release? Is it the Darwin release? |
No Darwin is macOS. FreeBSD has it in their package manager, so they're building it themselves. I get updates when installing updates to installed packages and it prints out additional instructions in the case there were changes that require manual intervention, which has happened in the past. |
OK, well that means that I cannot test if my fix works because I can't build it for you. There's also the potential issue that you're looking at a bug introduced by the FreeBSD port - or some weirdness to do with it. Looking again at #8485 I can't see why it shouldn't work originally unless that go-git does something on freebsd... Is there any chance you could check whether the problem exists using the same DB and repos on linux, or can reproduce it on try.gitea.io? |
My original post indicates I was not able to reproduce on try.gitea.io. I'll try to find the proper channels to investigate the freebsd port |
[x]
):Description
I created a repo on my gitea instance, added as a remote on an existing repo, and pushed. That was fine. I then noticed the releases page was empty since I hadn't pushed the tags. So I pushed the tags. Now the releases page yields a 500 error page.
The repo is public, so here it is: https://gitea.carsonevans.ca/carson/quickpaste/releases
The text was updated successfully, but these errors were encountered: