Gitea: Error 500 when trying to open issue

Created on 10 Jul 2018  路  10Comments  路  Source: go-gitea/gitea

  • 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
kinquestion

All 10 comments

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

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.

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

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]

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.

What issue id is with index 4?

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

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.

same here ..
giteaError

On ubuntu 18.04 and sqlite ..

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

jakimfett picture jakimfett  路  3Comments

BRMateus2 picture BRMateus2  路  3Comments

flozz picture flozz  路  3Comments

thehowl picture thehowl  路  3Comments