Skip to content

bug: Error 500 for /admin/repos page #25610

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

Closed
dxas90 opened this issue Jun 30, 2023 · 10 comments
Closed

bug: Error 500 for /admin/repos page #25610

dxas90 opened this issue Jun 30, 2023 · 10 comments
Labels

Comments

@dxas90
Copy link

dxas90 commented Jun 30, 2023

Description

Hey there team

I recently updated my gitea instance with helm

helm upgrade --install gitea gitea-charts/gitea -n REDACTED -f REDACTED/gitea.yaml --version 8.3.0

and now I'm facing an error 500 I let a link with the logs

2023/06/30 11:46:53 ...s/context/context.go:263:HTML() [E] [649ec0ad] Render failed: template: admin/repo/list:48:25: executing "admin/repo/list" at <.Owner.HomeLink>: error calling HomeLink: runtime error: invalid memory address or nil pointer dereference
	in template file (builtin) templates/admin/repo/list.tmpl:
	----------------------------------------------------------------------
								<td>{{.ID}}</td>
								<td>
									<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
									           ^^^^^^^^^^^^^^^
	----------------------------------------------------------------------

No custom templates or changes to the default folder structure

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/dramirez-qb/95427673555cd21097c4a3a5b4914ad5

Screenshots

Screenshot 2023-06-30 at 14 44 15

Git Version

No response

Operating System

No response

How are you running Gitea?

kubernetes deployment with helm

Database

PostgreSQL

@lunny
Copy link
Member

lunny commented Jul 1, 2023

Do you have customized template?

@dxas90
Copy link
Author

dxas90 commented Jul 1, 2023

Do you have customized template?

No, I'm running all the defaults

@wxiaoguang
Copy link
Contributor

Maybe related to this one: Fix Bug in Explore when Repo has no Owner #24873 , no owner

@lunny
Copy link
Member

lunny commented Jul 5, 2023

Maybe we should have a doctor command to check them.

@dxas90
Copy link
Author

dxas90 commented Jul 26, 2023

hey there @lunny I tried gitea doctor and a couple of things nothing works so far I upgraded yesterday to the latest version 1.20.1 and now I Know that the project with id 13 is the problem any sugestions?
Screenshot 2023-07-26 at 14 21 55

@lunny
Copy link
Member

lunny commented Jul 26, 2023

For some reason, one or more repositories have no owner or owner was deleted from database directly.

@dxas90
Copy link
Author

dxas90 commented Jul 26, 2023

hey @lunny

I deleted the repo and the PRs made to the repo are some kind of problems

gitea doctor

[1] Garbage collect LFS
 - [I] Checking 38:dxas90/fastapi
 - [I] Found 0 total LFSMetaObjects in 38:dxas90/fastapi
ERROR
[2] Check paths and basic configuration
 - [I] Configuration File Path:    "/data/gitea/conf/app.ini"
 - [I] Repository Root Path:       "/data/git/gitea-repositories"
 - [I] Data Root Path:             "/data"
 - [I] Custom File Root Path:      "/data/gitea"
 - [I] Work directory:             "/data"
 - [I] Log Root Path:              "/data/log"
OK
[3] Check if there are orphaned archives in storage
 - [I] Found 0 (0 B) repo archive(s)
OK
[4] Check if there are orphaned attachments in storage
 - [I] Found 0 (0 B) attachment(s)
OK
[5] Check if there are orphaned avatars in storage
 - [W] Found 3/4 (26 KiB/79 KiB) orphaned avatar(s)
 - [I] Found 0 (0 B) repo avatar(s)
OK
[6] Check if there are orphaned lfs files in storage
 - [I] Found 0 (0 B) LFS file(s)
OK
[7] Check if there are orphaned package blobs in storage
 - [I] Found 16 (326 MiB) package blob(s)
OK
[8] Check if there are orphaned storage files
 - [I] Found 0 (0 B) attachment(s)
 - [I] Found 0 (0 B) LFS file(s)
 - [W] Found 3/4 (26 KiB/79 KiB) orphaned avatar(s)
 - [I] Found 0 (0 B) repo avatar(s)
 - [I] Found 0 (0 B) repo archive(s)
 - [I] Found 16 (326 MiB) package blob(s)
OK
[9] Check Database Version
 - [I] Expected database version: 244
OK
[10] Check consistency of database
 - [W] Found 18 Orphaned Labels without existing repository or organisation
 - [W] Found 1 Collaborations without existing user
 - [W] Found 1 Access entries without existing user
 - [W] Found 16 Orphaned OAuth2AuthorizationCode without existing OAuth2Grant
 - [W] Found 1 Orphaned Redirects without existing redirect user
OK
[11] Check if user with wrong type exist
OK
[12] Check if OpenSSH authorized_keys file is up-to-date
OK
[13] Check if SCRIPT_TYPE is available
 - [I] ScriptType bash is on the current PATH at /bin/bash
OK
[14] Check if hook files are up-to-date and executable
OK
[15] Recalculate Stars number for all user
 - [I] No check available for User Stars numbers (skipped)
OK
[16] Check old archives
 - [I] 0 old archives in repository need to be deleted
OK
[17] Check that all git repositories have receive.advertisePushOptions set to true
 - [I] Checked 33 repositories, 0 need updates.
OK
[18] Check for incorrectly dumped repo_units (See #16961)
 - [I] Found no broken repo_units
OK
[19] Recalculate merge bases
 - [W] Unable to get parents for merged PR ID 2, #1 onto develop in internal/myrepo.net. Error: exit status 128 - fatal: bad object f79ceac57e2b842def1b6d9933cbff50882b9236
	 - fatal: bad object f79ceac57e2b842def1b6d9933cbff50882b9236

 - [W] Unable to get parents for merged PR ID 3, #2 onto main in internal/myrepo.net. Error: exit status 128 - fatal: bad object 58e4dae271de32b866273239100166b603aa5dba
	 - fatal: bad object 58e4dae271de32b866273239100166b603aa5dba

 - [W] Unable to get parents for merged PR ID 4, #3 onto main in internal/myrepo.net. Error: exit status 128 - fatal: bad object 5235c8512fc019b49976fe27608475500ee9d4ba
	 - fatal: bad object 5235c8512fc019b49976fe27608475500ee9d4ba

 - [W] Unable to get parents for merged PR ID 5, #4 onto develop in internal/myrepo.net. Error: exit status 128 - fatal: bad object 0ce2ae78ab950be18778853ec37f7c6004a5f77e
	 - fatal: bad object 0ce2ae78ab950be18778853ec37f7c6004a5f77e

 - [W] Unable to get parents for merged PR ID 6, #5 onto main in internal/myrepo.net. Error: exit status 128 - fatal: bad object 216bd84609151cf13380cf613f3c1411a649f9d4
	 - fatal: bad object 216bd84609151cf13380cf613f3c1411a649f9d4

 - [I] All 6 PRs in 33 repos have a correct mergebase
OK
[20] Synchronize repo HEADs
 - [I] All 33 repos have their HEADs in the correct state
OK
[21] Check git-daemon-export-ok files
 - [C] Unable to checkDaemonExport: user does not exist [uid: 4, name: , keyid: 0]
ERROR
[22] Check commit-graphs
 - [I] Checked 33 repositories, 1 without commit-graphs.
OK
[23] Check if users has an valid email address
 - [I] All users have a valid e-mail.
OK
[24] Check if users have a valid username
 - [I] All users have a valid username.
OK

@lunny
Copy link
Member

lunny commented Jul 27, 2023

[21] Check git-daemon-export-ok files

  • [C] Unable to checkDaemonExport: user does not exist [uid: 4, name: , keyid: 0]
    ERROR

That means the user with id 4 missed but repositories with owner id 4 does still exist.

@dxas90
Copy link
Author

dxas90 commented Jul 27, 2023

How can I fix that?

@6543
Copy link
Member

6543 commented Oct 19, 2023

-> #27290

@6543 6543 closed this as completed Oct 19, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants