Closed
Description
- Gitea version (or commit ref): 1.15.0+dev-517-g096634935 built with GNU Make 4.3, go1.16.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify
- Git version: 2.30.2
- Operating system: Ubuntu 20.04, docker latest tag
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Log gist: With database debug logging enabled:
gitea_1 | 2021/06/30 13:25:05 Started GET /admin/emails for 10.10.10.10:0
gitea_1 | 2021/06/30 13:25:05 models/user.go:1370:getUserByID() [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "email_notifications_preference", "passwd", "passwd_hash_algo", "must_change_password", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "language", "description", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "is_restricted", "allow_git_hook", "allow_import_local", "allow_create_organization", "prohibit_login", "avatar", "avatar_email", "use_custom_avatar", "num_followers", "num_following", "num_stars", "num_repos", "num_teams", "num_members", "visibility", "repo_admin_change_team_access", "diff_view_style", "theme", "keep_activity_private" FROM "user" WHERE "id"=$1 LIMIT 1 [2] - 3.396415ms
gitea_1 | 2021/06/30 13:25:05 ...s/issue_stopwatch.go:67:HasUserStopwatch() [I] [SQL] SELECT "id", "issue_id", "user_id", "created_unix" FROM "stopwatch" WHERE (user_id = $1) LIMIT 1 [2] - 1.344389ms
gitea_1 | 2021/06/30 13:25:05 .../web/admin/emails.go:79:Emails() [I] [SQL] SELECT count(*) FROM "email_address" INNER JOIN "user" ON "user".ID = email_address.uid WHERE user."type"=$1 [0] - 1.206426ms
gitea_1 | 2021/06/30 13:25:05 .../web/admin/emails.go:81:Emails() [E] SearchEmails: Count: pq: syntax error at or near "."
gitea_1 | 2021/06/30 13:25:05 ...dels/notification.go:716:GetNotificationCount() [I] [SQL] SELECT count(*) FROM "notification" WHERE (user_id = $1) AND (status = $2) [2 1] - 822.306µs
gitea_1 | 2021/06/30 13:25:05 models/avatar.go:135:SizedAvatarLink() [I] [SQL] BEGIN TRANSACTION [] - 1.221931ms
gitea_1 | 2021/06/30 13:25:05 models/avatar.go:99:func1() [I] [SQL] SELECT "hash", "email" FROM "email_hash" WHERE (email = $1 AND hash = $2) LIMIT 1 [adyanthh@gmail.com 56c1a30ce27236aaa99c65c60f73cde0] - 4.274246ms
gitea_1 | 2021/06/30 13:25:05 models/avatar.go:87:HashedAvatarLink() [I] [SQL] ROLLBACK [] - 275.952µs
gitea_1 | 2021/06/30 13:25:05 Completed GET /admin/emails 500 Internal Server Error in 60.734787ms
Description
I do not have an idea from when this started, since I rarely visit that URL. Today, when I did, I can see a 500 internal server error.
From the debug logging for SQL, I can see that the 1st line where user."type"
seems to be wrong? and should have been "user"."type"
?
This is the closest I can see in code:
Line 319 in 1bfb0a2
Screenshots
Sample of what I see, a generic 500 page.