Error 500 when trying to open issue #2037

Closed
opened 2025-11-02 04:21:56 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @arthur-bauer on GitHub (Jul 10, 2018).

  • Gitea version (or commit ref): 1.4.3
  • Git version: 2.18.0
  • Operating system: macOS High Sierra 10.13.6 (17G65) updated today, might be the problem
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite (3.19.3)
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

After updating macOs to the latest released version today, clicking on an existing issue or creating a new issue leads to a HTTP 500 error page. Interestingly, the log shows a 404 instead:

2018/07/10 19:12:29 [T] AppPath: /usr/local/bin/gitea
2018/07/10 19:12:29 [T] AppWorkPath: /usr/local/bin
2018/07/10 19:12:29 [T] Custom path: /usr/local/bin/custom
2018/07/10 19:12:29 [T] Log path: /usr/local/bin/log
2018/07/10 19:12:29 Serving [::]:3000 with pid 2434
[Macaron] 2018-07-10 19:12:31: Started GET / for 192.168.74.10
[Macaron] 2018-07-10 19:12:31: Started GET /api/v1/repos/search?uid=1&q=&limit=15&mode= for 192.168.74.10
[Macaron] 2018-07-10 19:12:31: Completed GET /api/v1/repos/search?uid=1&q=&limit=15&mode= 200 OK in 5.718733ms
[Macaron] 2018-07-10 19:12:31: Completed GET / 200 OK in 21.477864ms
[Macaron] 2018-07-10 19:12:34: Started GET /Private-projects/18-0631_Another_Test_Repo/issues/3 for 192.168.74.10
[Macaron] 2018-07-10 19:12:34: Completed GET /Private-projects/18-0631_Another_Test_Repo/issues/3 404 Not Found in 52.800474ms
[Macaron] 2018-07-10 19:12:38: Started GET /issues for 192.168.74.10
[Macaron] 2018-07-10 19:12:38: Completed GET /issues 200 OK in 11.66975ms
[Macaron] 2018-07-10 19:12:42: Started GET /Admin_GMSheet/issues/3 for 192.168.74.10
[Macaron] 2018-07-10 19:12:42: Completed GET /Admin_GMSheet/issues/3 404 Not Found in 113.60914ms
Originally created by @arthur-bauer on GitHub (Jul 10, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.4.3 - Git version: 2.18.0 - Operating system: macOS High Sierra 10.13.6 (17G65) *updated today, might be the problem* - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite (3.19.3) - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description After updating macOs to the latest released version today, clicking on an existing issue or creating a new issue leads to a HTTP 500 error page. Interestingly, the log shows a 404 instead: 2018/07/10 19:12:29 [T] AppPath: /usr/local/bin/gitea 2018/07/10 19:12:29 [T] AppWorkPath: /usr/local/bin 2018/07/10 19:12:29 [T] Custom path: /usr/local/bin/custom 2018/07/10 19:12:29 [T] Log path: /usr/local/bin/log 2018/07/10 19:12:29 Serving [::]:3000 with pid 2434 [Macaron] 2018-07-10 19:12:31: Started GET / for 192.168.74.10 [Macaron] 2018-07-10 19:12:31: Started GET /api/v1/repos/search?uid=1&q=&limit=15&mode= for 192.168.74.10 [Macaron] 2018-07-10 19:12:31: Completed GET /api/v1/repos/search?uid=1&q=&limit=15&mode= 200 OK in 5.718733ms [Macaron] 2018-07-10 19:12:31: Completed GET / 200 OK in 21.477864ms [Macaron] 2018-07-10 19:12:34: Started GET /Private-projects/18-0631_Another_Test_Repo/issues/3 for 192.168.74.10 [Macaron] 2018-07-10 19:12:34: Completed GET /Private-projects/18-0631_Another_Test_Repo/issues/3 404 Not Found in 52.800474ms [Macaron] 2018-07-10 19:12:38: Started GET /issues for 192.168.74.10 [Macaron] 2018-07-10 19:12:38: Completed GET /issues 200 OK in 11.66975ms [Macaron] 2018-07-10 19:12:42: Started GET /Admin_GMSheet/issues/3 for 192.168.74.10 [Macaron] 2018-07-10 19:12:42: Completed GET /Admin_GMSheet/issues/3 404 Not Found in 113.60914ms
GiteaMirror added the type/question label 2025-11-02 04:21:56 -06:00
Author
Owner

@lafriks commented on GitHub (Jul 12, 2018):

Could be that paths or dir rights have changed in upgrade process?

@lafriks commented on GitHub (Jul 12, 2018): Could be that paths or dir rights have changed in upgrade process?
Author
Owner

@arthur-bauer commented on GitHub (Jul 12, 2018):

Not sure about that. I can create new repos, milestones and even issues (I checked it in the sqlite db, the issues are created correctly). I can even add labels or close them in the issue overview. I just can't open/view the issue itself.

@arthur-bauer commented on GitHub (Jul 12, 2018): Not sure about that. I can create new repos, milestones and even issues (I checked it in the sqlite db, the issues are created correctly). I can even add labels or close them in the issue overview. I just can't open/view the issue itself.
Author
Owner

@lafriks commented on GitHub (Jul 12, 2018):

There must be error in gitea.log or gitea stdout about internal server error

@lafriks commented on GitHub (Jul 12, 2018): There must be error in gitea.log or gitea stdout about internal server error
Author
Owner

@arthur-bauer commented on GitHub (Jul 13, 2018):

Here's the stdout, from starting gitea to clicking on the issue:

2018/07/13 10:47:47 [T] AppPath: /usr/local/bin/gitea
2018/07/13 10:47:47 [T] AppWorkPath: /usr/local/bin
2018/07/13 10:47:47 [T] Custom path: /usr/local/bin/custom
2018/07/13 10:47:47 [T] Log path: /usr/local/bin/log
2018/07/13 10:47:47 Serving [::]:3000 with pid 47310
[Macaron] 2018-07-13 10:47:50: Started GET /Admin/GMSheet/ for 192.168.74.10
[Macaron] 2018-07-13 10:47:50: Completed GET /Admin/GMSheet/ 200 OK in 198.326532ms
[Macaron] 2018-07-13 10:47:52: Started GET /Admin/GMSheet/issues for 192.168.74.10
[Macaron] 2018-07-13 10:47:52: Completed GET /Admin/GMSheet/issues 200 OK in 106.824118ms
[Macaron] 2018-07-13 10:47:54: Started GET /Admin/GMSheet/issues/4 for 192.168.74.10
[Macaron] 2018-07-13 10:47:55: Completed GET /Admin/GMSheet/issues/4 404 Not Found in 56.167319ms

And this is the output of the log:

2018/07/13 10:47:47 [I] Log Mode: File(Info)
2018/07/13 10:47:47 [I] XORM Log Mode: File(Info)
2018/07/13 10:47:47 [I] Cache Service Enabled
2018/07/13 10:47:47 [I] Session Service Enabled
2018/07/13 10:47:47 [I] Git Version: 2.18.0
2018/07/13 10:47:47 [I] SQLite3 Supported
2018/07/13 10:47:47 [I] Run Mode: Production
2018/07/13 10:47:47 [I] Listen: http://0.0.0.0:3000
2018/07/13 10:47:47 [I] LFS server enabled
2018/07/13 10:47:55 [...outers/repo/issue.go:636 ViewIssue()] [E] GetIssueByID: issue does not exist [id: 17, repo_id: 0, index: 0]
@arthur-bauer commented on GitHub (Jul 13, 2018): Here's the stdout, from starting gitea to clicking on the issue: 2018/07/13 10:47:47 [T] AppPath: /usr/local/bin/gitea 2018/07/13 10:47:47 [T] AppWorkPath: /usr/local/bin 2018/07/13 10:47:47 [T] Custom path: /usr/local/bin/custom 2018/07/13 10:47:47 [T] Log path: /usr/local/bin/log 2018/07/13 10:47:47 Serving [::]:3000 with pid 47310 [Macaron] 2018-07-13 10:47:50: Started GET /Admin/GMSheet/ for 192.168.74.10 [Macaron] 2018-07-13 10:47:50: Completed GET /Admin/GMSheet/ 200 OK in 198.326532ms [Macaron] 2018-07-13 10:47:52: Started GET /Admin/GMSheet/issues for 192.168.74.10 [Macaron] 2018-07-13 10:47:52: Completed GET /Admin/GMSheet/issues 200 OK in 106.824118ms [Macaron] 2018-07-13 10:47:54: Started GET /Admin/GMSheet/issues/4 for 192.168.74.10 [Macaron] 2018-07-13 10:47:55: Completed GET /Admin/GMSheet/issues/4 404 Not Found in 56.167319ms And this is the output of the log: 2018/07/13 10:47:47 [I] Log Mode: File(Info) 2018/07/13 10:47:47 [I] XORM Log Mode: File(Info) 2018/07/13 10:47:47 [I] Cache Service Enabled 2018/07/13 10:47:47 [I] Session Service Enabled 2018/07/13 10:47:47 [I] Git Version: 2.18.0 2018/07/13 10:47:47 [I] SQLite3 Supported 2018/07/13 10:47:47 [I] Run Mode: Production 2018/07/13 10:47:47 [I] Listen: http://0.0.0.0:3000 2018/07/13 10:47:47 [I] LFS server enabled 2018/07/13 10:47:55 [...outers/repo/issue.go:636 ViewIssue()] [E] GetIssueByID: issue does not exist [id: 17, repo_id: 0, index: 0]
Author
Owner

@arthur-bauer commented on GitHub (Jul 18, 2018):

Anything else I could have a look at? The database doesn't contain an issue with the id 17 right now. The highest ID is 16.

@arthur-bauer commented on GitHub (Jul 18, 2018): Anything else I could have a look at? The database doesn't contain an issue with the id 17 right now. The highest ID is 16.
Author
Owner

@lafriks commented on GitHub (Jul 20, 2018):

What issue id is with index 4?

@lafriks commented on GitHub (Jul 20, 2018): What issue id is with index 4?
Author
Owner

@arthur-bauer commented on GitHub (Jul 21, 2018):

There are two issues with index 4 (in two different repos). One has the id 10, the other the id 14.

sqlite> select "id","repo_id","index" from "issue" where "index"=4;
14|9|4
10|24|4
@arthur-bauer commented on GitHub (Jul 21, 2018): There are two issues with index 4 (in two different repos). One has the id 10, the other the id 14. ``` sqlite> select "id","repo_id","index" from "issue" where "index"=4; 14|9|4 10|24|4 ```
Author
Owner

@arthur-bauer commented on GitHub (Jul 23, 2018):

Ok... I think I'm on the right track now.

Recently, I deleted one or two test repos. There were entries in the repos' issue trackers. Now, these issues were deleted as well. And the time tracker was still running on one of these issues (the issue 17 above), although this wasn't the actual problem.

I now filled the deleted issue ids manually with some dump entries, and all issues can be opened again.

@arthur-bauer commented on GitHub (Jul 23, 2018): Ok... I think I'm on the right track now. Recently, I deleted one or two test repos. There were entries in the repos' issue trackers. Now, these issues were deleted as well. And the time tracker was still running on one of these issues (the issue 17 above), although this wasn't the actual problem. I now filled the deleted issue ids manually with some dump entries, and all issues can be opened again.
Author
Owner

@biju-ps commented on GitHub (Mar 13, 2019):

same here ..
giteaError

On ubuntu 18.04 and sqlite ..

@biju-ps commented on GitHub (Mar 13, 2019): same here .. ![giteaError](https://user-images.githubusercontent.com/2868701/54255336-a8660e80-457d-11e9-8004-9ab7e5405e40.gif) On ubuntu 18.04 and sqlite ..
Author
Owner

@zeripath commented on GitHub (Mar 13, 2019):

Hi! Thanks for your report however it looks like you're using Gitea version 1.6.1 which is very old. I suggest you update to 1.7.4 which has just been released. I think this issue might already be solved.

However if you can replicate on 1.7.4 we will need some more information, in particular what the log files are showing and preferably a way to replicate the issue.

@zeripath commented on GitHub (Mar 13, 2019): Hi! Thanks for your report however it looks like you're using Gitea version 1.6.1 which is very old. I suggest you update to 1.7.4 which has just been released. I think this issue might already be solved. However if you can replicate on 1.7.4 we will need some more information, in particular what the log files are showing and preferably a way to replicate the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2037