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

Closed
opened 2025-11-02 09:28:42 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @dxas90 on GitHub (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

Originally created by @dxas90 on GitHub (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](https://gist.github.com/dramirez-qb/95427673555cd21097c4a3a5b4914ad5) ``` 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](https://github.com/go-gitea/gitea/assets/1261887/5d0b190f-707e-4abe-9056-60e697326e2b) ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? kubernetes deployment with helm ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 09:28:42 -06:00
Author
Owner

@lunny commented on GitHub (Jul 1, 2023):

Do you have customized template?

@lunny commented on GitHub (Jul 1, 2023): Do you have customized template?
Author
Owner

@dxas90 commented on GitHub (Jul 1, 2023):

Do you have customized template?

No, I'm running all the defaults

@dxas90 commented on GitHub (Jul 1, 2023): > Do you have customized template? No, I'm running all the defaults
Author
Owner

@wxiaoguang commented on GitHub (Jul 1, 2023):

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

@wxiaoguang commented on GitHub (Jul 1, 2023): Maybe related to this one: Fix Bug in Explore when Repo has no Owner #24873 , no owner
Author
Owner

@lunny commented on GitHub (Jul 5, 2023):

Maybe we should have a doctor command to check them.

@lunny commented on GitHub (Jul 5, 2023): Maybe we should have a doctor command to check them.
Author
Owner

@dxas90 commented on GitHub (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

@dxas90 commented on GitHub (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](https://github.com/go-gitea/gitea/assets/1261887/54036039-4131-4371-85b0-02d7c15eab67)
Author
Owner

@lunny commented on GitHub (Jul 26, 2023):

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

@lunny commented on GitHub (Jul 26, 2023): For some reason, one or more repositories have no owner or owner was deleted from database directly.
Author
Owner

@dxas90 commented on GitHub (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
@dxas90 commented on GitHub (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 ```
Author
Owner

@lunny commented on GitHub (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.

@lunny commented on GitHub (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.
Author
Owner

@dxas90 commented on GitHub (Jul 27, 2023):

How can I fix that?

@dxas90 commented on GitHub (Jul 27, 2023): How can I fix that?
Author
Owner

@6543 commented on GitHub (Oct 19, 2023):

-> #27290

@6543 commented on GitHub (Oct 19, 2023): -> #27290
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11138