mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-12 02:24:21 -05:00
Error 500 when viewing some of repo's subdirectories #3286
Closed
opened 2025-11-02 05:06:35 -06:00 by GiteaMirror
·
18 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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4.0-rc1
v1.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
type/bug
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#3286
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 @achikhv on GitHub (May 2, 2019).
[x]):Description
I get error 500 when I try to view contents of some directories inside my repo. One subdirs are opened successfully but another gives an error. I can not find any quick reason to it.
All subdirs have simple names with only ASCII encoding, no special symbols or spaces.
In my gitea.log I see:
For example I get 500 when I follow:
http://sc.lers.ru/LersUchet/LersUchet/src/branch/master/Client
But following http://sc.lers.ru/LersUchet/LersUchet/src/branch/master/Server works as expected.
@lafriks commented on GitHub (May 5, 2019):
Can you reproduce this on try.gitea.io?
@achikhv commented on GitHub (May 6, 2019):
Unfortunately no. I can't upload my repo as it is commercial software. This repo is quite big - over 500MB in size and has 35K commits over last 7 years , so it is hard to reproduce it.
Also I get 500 with same error code when I try to view some old commits by SHA-1.
Not a big deal for me anyway, but it's quite strange.
@zeripath commented on GitHub (May 27, 2019):
Hmm... Two possible encoding problems come to mind:
Git internally just thinks of filenames as a byte array of non NULs and likely we're just enforcing UTF-8 on that because that's the most likely case. Similarly for the commit messages but AFAIU there's supposed to be an encoding marker for these - which I also suspect we're ignoring.
@achikhv commented on GitHub (May 28, 2019):
Anyway I can't be sure about it. In this comment I pointed that 500 occurs when viewing older commits, so maybe it is commit encoding that causes 500.
@zeripath commented on GitHub (May 28, 2019):
Ok that's good to know. I think there are some Chinese users who have used big5 as their commit messages too and are also having problems.
https://www.git-tower.com/help/mac/faq-and-tips/faq/encoding
Might be of some help.
@zeripath commented on GitHub (May 28, 2019):
In particular:
Which is just for testing one commit's stored encoding but should be extendable to look at all or a particular file.
Now iirc svn is actually quite good at dealing with encodings - so I expect that the encoding will be stored rather than just the data being dumped in the message, however it may not be. If it's the first case that should be relatively easy to fix - assuming go git handles this correctly. If it's the second case well that's more difficult but again should be solvable.
If you could find a commit which doesn't have the utf8 encoding that would be good to know.
@zeripath commented on GitHub (May 28, 2019):
Oh would it be possible to check this is still a problem on master? We made substantial changes to our git infrastructure between 1.7 and 1.9 so it would be good to know if it's still a problem.
You certainly should move off 1.7.6 though.
@achikhv commented on GitHub (May 29, 2019):
Hello!
I have already upgraded to the latest 1.8.1 and 500 is still there.
All commits in my repo are encoded UTF-8 , ie "Encoding: %e" shows empty string **Encoding: ** As I understand it defaults to UTF-8.
@zeripath commented on GitHub (May 29, 2019):
I was meaning master not 1.8.
The lack of encoding headers doesn't rule out misencoded commits, it just means that we're unlikely to be able to easily fix them without catching an error first. But it does make it less likely.
Are you able to find the commit that causes the 500? It sounds like you know a SHA that causes the problem. Is there anything at all you can tell me about that SHA that might help?
@achikhv commented on GitHub (May 29, 2019):
Sorry, right now I can't try master, because it's preferable to stay on stable release.
Actually all commits that was made earlier than 04.07.2016 causes 500. I know last commit causing 500. There is nothing special about it, only couple of line changes in one file. No moves or renames.
What particular information about this commit would you like to know?
@zeripath commented on GitHub (May 29, 2019):
Hmm. I'm trying to work out how to get the information without you revealing your internal data. I'm guessing that the commit message is not in English but likely in Russian - my suspicion is still that the message is not stored as utf8 even though it claims it is.
Basically I would like to check that the commit and the tree make sense.
git show --format=raw $SHAshould show us the commit raw but what we want is to definitely prove that its message is in utf8 rather than Windows-1251 or iso-8859-5.In some ways without being able to check whether this bug is still present on master means that we don't know if it's fixed already.
@BNolet commented on GitHub (Jul 12, 2019):
Having a similar problem myself, using MySQL as the DB though. Running on v799f5e0.
Can't view here: https://gitea.bnolet.me/brandon/personal-blog/src/branch/master/themes/hello-friend-ng
But can view here: https://gitea.bnolet.me/brandon/personal-blog/src/branch/master/themes
There's a README.md in the folder, yes, but I am able to view the file directly here: https://gitea.bnolet.me/brandon/personal-blog/src/branch/master/themes/hello-friend-ng/README.md
Haven't done much troubleshooting yet, but if I find anything interesting I'll post here. Feel free to download and mirror the source.
@lunny commented on GitHub (Jul 13, 2019):
@BNolet I mirrored your repo to local and https://gitea.com/lunny/test-personal-blog/src/branch/master/themes/hello-friend-ng , but it's OK. Is your database setting as utf8mb4?
@BNolet commented on GitHub (Jul 15, 2019):
@lunny Strange! I didn't actively change the encoding for the DB and looking at some threads, it doesn't seem that's the default either, so I'm inclined to say no
@BNolet commented on GitHub (Jul 15, 2019):
The following is from the logs at the moment where I get a 500 error code:
@lunny commented on GitHub (Jul 15, 2019):
@BNolet It seems you have a version of v1.8.x or before.
@BNolet commented on GitHub (Jul 15, 2019):
welp, upgrade fixed the issue. I was running 1.8.0 upgraded to 1.10.
Thank you @lunny. I'll try to remember to upgrade before posting here next time
@achikhv commented on GitHub (Jul 15, 2019):
Yes, upgrade to 1.9.0 RC2 fixed issue.
Thanks!