mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-15 20:09:18 -05:00
500 Error On Release Page #4106
Closed
opened 2025-11-02 05:38:10 -06:00 by GiteaMirror
·
25 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16.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.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#4106
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @carc1n0gen on GitHub (Oct 12, 2019).
[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
@lafriks commented on GitHub (Oct 12, 2019):
Could be that you have pushed tags for branches that are not pushed to repo?
@carc1n0gen commented on GitHub (Oct 12, 2019):
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.
@carc1n0gen commented on GitHub (Oct 12, 2019):
I think if that were the case, I would have been able to reproduce on the try.gitea.io instance
@carc1n0gen commented on GitHub (Oct 12, 2019):
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)
@zeripath commented on GitHub (Oct 12, 2019):
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
RUN_MODEfrom prod todevin app.iniIn fact that would probably be quite helpful as we should see the trace of the error.
@carc1n0gen commented on GitHub (Oct 12, 2019):
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.
@zeripath commented on GitHub (Oct 12, 2019):
So that's coming from:
3249c0ccba/routers/repo/release.go (L36-L40)@zeripath commented on GitHub (Oct 12, 2019):
And from your logs it looks like it's release id 10
@zeripath commented on GitHub (Oct 12, 2019):
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
@carc1n0gen commented on GitHub (Oct 12, 2019):
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
@carc1n0gen commented on GitHub (Oct 12, 2019):
This is the release record:
I'll take a look at that tag
@zeripath commented on GitHub (Oct 13, 2019):
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.
@carc1n0gen commented on GitHub (Oct 13, 2019):
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?
@zeripath commented on GitHub (Oct 13, 2019):
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.
@zeripath commented on GitHub (Oct 13, 2019):
IsBranchExist is:
5e759b60cc/modules/git/repo_branch.go (L29-L33)I suspect this might return true I think if name was empty.
So that's probably a problem.
@zeripath commented on GitHub (Oct 13, 2019):
ee11974719/modules/git/repo_commit.go (L147-L154)ee11974719/modules/git/repo_commit.go (L37-L40)So if name is empty this would cause your error.
@carc1n0gen commented on GitHub (Oct 13, 2019):
The target is for sure empty
@zeripath commented on GitHub (Oct 13, 2019):
If you're able to rebuild Gitea you could try adjusting
IsBranchExistto check if name is empty before it does the reference check by adding:Appropriately fmt'd of course.
@carc1n0gen commented on GitHub (Oct 13, 2019):
I'm using the binary package provided from freebsd so I cannot do that.
@carc1n0gen commented on GitHub (Oct 13, 2019):
So it actually turns out that every release record from that release and onward have an empty target. No idea why that is, and not sure what to do at this point.Not a single release record has a target and there are 51 of them
@zeripath commented on GitHub (Oct 13, 2019):
Oks I should just check that this function hasn't changed between 1.10 and 1.9.3
They haven't.
@zeripath commented on GitHub (Oct 13, 2019):
Where have you got this FreeBSD release? Is it the Darwin release?
@carc1n0gen commented on GitHub (Oct 13, 2019):
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.
@zeripath commented on GitHub (Oct 13, 2019):
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?
@carc1n0gen commented on GitHub (Oct 13, 2019):
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