v1.2-rc1 cause repository 404 errors #1013

Closed
opened 2025-11-02 03:45:16 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @vfricou on GitHub (Aug 29, 2017).

  • Gitea version (or commit ref): 1.2-rc1
  • Git version: 2.1.4
  • Operating system: Debian Jessie (8u10)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Next to update from v1.1.3 to v1.2-rc1, all repository go to 404 when browsing with logs :

gitea.log :

2017/08/29 10:11:57 [...routers/repo/view.go:274 Home()] [E] Home: Cannot find any unit on this repository which you are allowed to access

xorm.log :

2017/08/29 10:21:17 [I] [SQL] SELECT count(*) FROM "notification" WHERE user_id = $1 AND status = $2 []interface {}{1, 0x1}
2017/08/29 10:21:17 [I] [SQL] SELECT "id", "owner_id", "lower_name", "name", "description", "website", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_bare", "is_mirror", "is_fork", "fork_id", "size", "created_unix", "updated_unix" FROM "repository" WHERE "owner_id"=$1 AND "lower_name"=$2 LIMIT 1 []interface {}{1, "hugo"}
2017/08/29 10:21:17 [I] [SQL] SELECT "id", "user_id", "repo_id" FROM "watch" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 []interface {}{1, 180}
2017/08/29 10:21:17 [I] [SQL] SELECT "id", "uid", "repo_id" FROM "star" WHERE "uid"=$1 AND "repo_id"=$2 LIMIT 1 []interface {}{1, 180}
2017/08/29 10:21:17 [I] [SQL] SELECT "id", "repo_id", "type", "index", "config", "created_unix" FROM "repo_unit" WHERE repo_id = $1 []interface {}{180}
2017/08/29 10:21:17 [I] [SQL] SELECT "id", "repo_id", "type", "index", "config", "created_unix" FROM "repo_unit" WHERE repo_id = $1 []interface {}{180}

All repository are in this case. But all newly created repo (Next to migration) haven't problem.

Exact same configuration on 1.1.3 work fine.

Originally created by @vfricou on GitHub (Aug 29, 2017). - Gitea version (or commit ref): 1.2-rc1 - Git version: 2.1.4 - Operating system: Debian Jessie (8u10) - Database (use `[x]`): - [X] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X] Not relevant - Log gist: ## Description Next to update from v1.1.3 to v1.2-rc1, all repository go to 404 when browsing with logs : **gitea.log :** ``` 2017/08/29 10:11:57 [...routers/repo/view.go:274 Home()] [E] Home: Cannot find any unit on this repository which you are allowed to access ``` **xorm.log :** ```2017/08/29 10:21:17 [I] [SQL] SELECT "id", "lower_name", "name", "full_name", "email", "keep_email_private", "passwd", "login_type", "login_source", "login_name", "type", "location", "website", "rands", "salt", "created_unix", "updated_unix", "last_login_unix", "last_repo_visibility", "max_repo_creation", "is_active", "is_admin", "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", "description", "num_teams", "num_members", "diff_view_style" FROM "user" WHERE "id"=$1 LIMIT 1 []interface {}{1} 2017/08/29 10:21:17 [I] [SQL] SELECT count(*) FROM "notification" WHERE user_id = $1 AND status = $2 []interface {}{1, 0x1} 2017/08/29 10:21:17 [I] [SQL] SELECT "id", "owner_id", "lower_name", "name", "description", "website", "default_branch", "num_watches", "num_stars", "num_forks", "num_issues", "num_closed_issues", "num_pulls", "num_closed_pulls", "num_milestones", "num_closed_milestones", "is_private", "is_bare", "is_mirror", "is_fork", "fork_id", "size", "created_unix", "updated_unix" FROM "repository" WHERE "owner_id"=$1 AND "lower_name"=$2 LIMIT 1 []interface {}{1, "hugo"} 2017/08/29 10:21:17 [I] [SQL] SELECT "id", "user_id", "repo_id" FROM "watch" WHERE "user_id"=$1 AND "repo_id"=$2 LIMIT 1 []interface {}{1, 180} 2017/08/29 10:21:17 [I] [SQL] SELECT "id", "uid", "repo_id" FROM "star" WHERE "uid"=$1 AND "repo_id"=$2 LIMIT 1 []interface {}{1, 180} 2017/08/29 10:21:17 [I] [SQL] SELECT "id", "repo_id", "type", "index", "config", "created_unix" FROM "repo_unit" WHERE repo_id = $1 []interface {}{180} 2017/08/29 10:21:17 [I] [SQL] SELECT "id", "repo_id", "type", "index", "config", "created_unix" FROM "repo_unit" WHERE repo_id = $1 []interface {}{180} ``` All repository are in this case. But all newly created repo (Next to migration) haven't problem. Exact same configuration on 1.1.3 work fine.
GiteaMirror added the issue/duplicate label 2025-11-02 03:45:16 -06:00
Author
Owner

@lunny commented on GitHub (Aug 29, 2017):

duplicated with #1794

@lunny commented on GitHub (Aug 29, 2017): duplicated with #1794
Author
Owner

@vfricou commented on GitHub (Sep 11, 2017):

For information, upgrade to 1.2-rc2 cause exactly same problem.

This issue not concern only team repository, but all of repository previously in gitea.

Is possible that issue be caused by an initial gogs upgrade from ?

@vfricou commented on GitHub (Sep 11, 2017): For information, upgrade to 1.2-rc2 cause exactly same problem. This issue not concern only team repository, but all of repository previously in gitea. Is possible that issue be caused by an initial gogs upgrade from ?
Author
Owner

@lunny commented on GitHub (Sep 12, 2017):

@vfricou maybe because from a gogs upgrade which missing some migrations.

@lunny commented on GitHub (Sep 12, 2017): @vfricou maybe because from a gogs upgrade which missing some migrations.
Author
Owner

@vfricou commented on GitHub (Sep 14, 2017):

Is possible to update database needed fields (I don't find any database structure information nowhere) ? Because I've done an upgrade from gogs in higher version than specified on website ?

@vfricou commented on GitHub (Sep 14, 2017): Is possible to update database needed fields (I don't find any database structure information nowhere) ? Because I've done an upgrade from gogs in higher version than specified on website ?
Author
Owner

@lunny commented on GitHub (Sep 15, 2017):

You should change the db version to 14 and then upgrade.

@lunny commented on GitHub (Sep 15, 2017): You should change the db version to 14 and then upgrade.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1013