Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot see Repositories on Gitea Dashboard after Gitea update (1.4.1 -> 1.6.4 -> 1.12.5) #13300

Closed
2 of 6 tasks
TitaneBoy opened this issue Oct 25, 2020 · 14 comments
Closed
2 of 6 tasks
Labels
issue/duplicate The issue has already been reported.

Comments

@TitaneBoy
Copy link

TitaneBoy commented Oct 25, 2020

  • Gitea version (or commit ref): 1.12.5 (from Binary download)
  • Git version: 2.11.0
  • Operating system: Raspbian GNU/Linux 9 (stretch)
  • Running gitea from systemctl
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

Hello there. When I tried to update my old version of gogs (1.4.1 Linux Arm7) to the latest version (1.12.5 Arm 6) on my raspberry Pi 3 B+, I've discovered in the gitea logs that I needed to update gitea first to version 1.6.4 and then to the latest version (1.12.5). So this is what I did. Everything seems to work perfectly... Except that when I get to my dashboard, I can see the number of repo I have, but cannot see the list like I was able before in previous version

I can navigate to my repository through the "Explore" tab as you can see here

image

But as you can see on my first screenshot, I'm unable to have the list of my repositories on my Gitea Dashboard..

Here are the logs you may need, according to the "Debugging problems" section of your docs.

gitea.log
router.log

The actions I did to get these logs is simple: Login...wait few seconds...then logout

Could you help me please to resolve this issue ?

Thank you in advance

...

Screenshots

image

image

@TitaneBoy TitaneBoy changed the title Cannot see Repository on Gitea Dashboard Cannot see Repositories on Gitea Dashboard Oct 25, 2020
@TitaneBoy TitaneBoy changed the title Cannot see Repositories on Gitea Dashboard Cannot see Repositories on Gitea Dashboard after Gitea update (1.4.1 -> 1.6.4 -> 1.12.5) Oct 25, 2020
@lunny
Copy link
Member

lunny commented Oct 25, 2020

Are there any error log on your log file or console.

@TitaneBoy
Copy link
Author

@lunny Hi... Didn't see any error log on my log file or console...

@zeripath
Copy link
Contributor

Ok first thoughts, In your database could you check that the repository table has the owner_name set correctly for each repository?

Somehow people can end up with migrations incompletely being performed.

@zeripath
Copy link
Contributor

The next thing to check is whether it's possible that the issue is actually at your browser. To that end checking the result of:

/api/v1/repos/search?sort=updated&order=desc&uid=1&q=&page=1&limit=15&mode=&archived=false

And

/api/v1/repos/search?sort=updated&order=desc&uid=1&q=&page=1&mode=

Would be helpful to determine if this is a JavaScript or other template issue.

(Although it's notable that both of these requests seem correct to me - suggesting that your js is likely correct )

@aswild
Copy link
Contributor

aswild commented Oct 25, 2020

I saw something similar when upgrading to 1.12 or thereabouts - somehow all of my repos got marked as archived and thus wouldn't show up on the dashboard. It happened on two or three installations, all using postgres. This smells like a broken migration, but I didn't dig into it.

I used the psql console to clear the archived column on all the repos (something along the lines of UPDATE repository SET is_archived = FALSE) but obviously that's not ideal.

@TitaneBoy
Copy link
Author

@zeripath Thanks a lot for your answer and suggestion...Here is what I got:

1 - It seems that "owner_name" value is set properly in the "repository" table
image

2- Here are the result of the requests to the API

/api/v1/repos/search?sort=updated&order=desc&uid=1&q=&page=1&limit=15&mode=&archived=false

image

/api/v1/repos/search?sort=updated&order=desc&uid=1&q=&page=1&mode=

{
    "ok": true,
    "data": [
        {
            "id": 1,
            "owner": {
                "id": 1,
                "login": "TitaneBoy",
                "full_name": "",
                "email": "[email protected]",
                "avatar_url": "http:https://192.168.0.18:3000/user/avatar/TitaneBoy/-1",
                "language": "en-US",
                "is_admin": true,
                "last_login": "2020-10-25T18:03:59-04:00",
                "created": "2018-05-12T01:04:43-04:00",
                "username": "TitaneBoy"
            },
            "name": "Skynet_Video_Updater",
            "full_name": "TitaneBoy/Skynet_Video_Updater",
            "description": "Logiciel de mise à jour de bibliothèque vidéo",
            "empty": false,
            "private": false,
            "fork": false,
            "template": false,
            "parent": null,
            "mirror": false,
            "size": 13822,
            "html_url": "http:https://192.168.0.18:3000/TitaneBoy/Skynet_Video_Updater",
            "ssh_url": "philoufelin@localhost:TitaneBoy/Skynet_Video_Updater.git",
            "clone_url": "http:https://192.168.0.18:3000/TitaneBoy/Skynet_Video_Updater.git",
            "original_url": "",
            "website": "",
            "stars_count": 0,
            "forks_count": 0,
            "watchers_count": 1,
            "open_issues_count": 3,
            "open_pr_counter": 0,
            "release_counter": 0,
            "default_branch": "master",
            "archived": false,
            "created_at": "2018-05-12T01:36:33-04:00",
            "updated_at": "2020-10-22T19:07:16-04:00",
            "permissions": {
                "admin": true,
                "push": true,
                "pull": true
            },
            "has_issues": true,
            "internal_tracker": {
                "enable_time_tracker": true,
                "allow_only_contributors_to_track_time": true,
                "enable_issue_dependencies": true
            },
            "has_wiki": true,
            "has_pull_requests": true,
            "ignore_whitespace_conflicts": false,
            "allow_merge_commits": false,
            "allow_rebase": false,
            "allow_rebase_explicit": true,
            "allow_squash_merge": false,
            "avatar_url": ""
        },
        {
            "id": 2,
            "owner": {
                "id": 1,
                "login": "TitaneBoy",
                "full_name": "",
                "email": "[email protected]",
                "avatar_url": "http:https://192.168.0.18:3000/user/avatar/TitaneBoy/-1",
                "language": "en-US",
                "is_admin": true,
                "last_login": "2020-10-25T18:03:59-04:00",
                "created": "2018-05-12T01:04:43-04:00",
                "username": "TitaneBoy"
            },
            "name": "Web_Server",
            "full_name": "TitaneBoy/Web_Server",
            "description": "",
            "empty": false,
            "private": false,
            "fork": false,
            "template": false,
            "parent": null,
            "mirror": false,
            "size": 640,
            "html_url": "http:https://192.168.0.18:3000/TitaneBoy/Web_Server",
            "ssh_url": "philoufelin@localhost:TitaneBoy/Web_Server.git",
            "clone_url": "http:https://192.168.0.18:3000/TitaneBoy/Web_Server.git",
            "original_url": "",
            "website": "",
            "stars_count": 0,
            "forks_count": 0,
            "watchers_count": 1,
            "open_issues_count": 0,
            "open_pr_counter": 0,
            "release_counter": 0,
            "default_branch": "master",
            "archived": false,
            "created_at": "2018-08-24T08:44:46-04:00",
            "updated_at": "2019-02-17T16:32:15-05:00",
            "permissions": {
                "admin": true,
                "push": true,
                "pull": true
            },
            "has_issues": true,
            "internal_tracker": {
                "enable_time_tracker": true,
                "allow_only_contributors_to_track_time": true,
                "enable_issue_dependencies": true
            },
            "has_wiki": true,
            "has_pull_requests": true,
            "ignore_whitespace_conflicts": false,
            "allow_merge_commits": false,
            "allow_rebase": false,
            "allow_rebase_explicit": true,
            "allow_squash_merge": false,
            "avatar_url": ""
        },
        {
            "id": 3,
            "owner": {
                "id": 1,
                "login": "TitaneBoy",
                "full_name": "",
                "email": "[email protected]",
                "avatar_url": "http:https://192.168.0.18:3000/user/avatar/TitaneBoy/-1",
                "language": "en-US",
                "is_admin": true,
                "last_login": "2020-10-25T18:03:59-04:00",
                "created": "2018-05-12T01:04:43-04:00",
                "username": "TitaneBoy"
            },
            "name": "Basic_Client_HTTP_Request",
            "full_name": "TitaneBoy/Basic_Client_HTTP_Request",
            "description": "",
            "empty": false,
            "private": false,
            "fork": false,
            "template": false,
            "parent": null,
            "mirror": false,
            "size": 136,
            "html_url": "http:https://192.168.0.18:3000/TitaneBoy/Basic_Client_HTTP_Request",
            "ssh_url": "philoufelin@localhost:TitaneBoy/Basic_Client_HTTP_Request.git",
            "clone_url": "http:https://192.168.0.18:3000/TitaneBoy/Basic_Client_HTTP_Request.git",
            "original_url": "",
            "website": "",
            "stars_count": 0,
            "forks_count": 0,
            "watchers_count": 1,
            "open_issues_count": 0,
            "open_pr_counter": 0,
            "release_counter": 0,
            "default_branch": "master",
            "archived": false,
            "created_at": "2018-09-04T15:43:30-04:00",
            "updated_at": "2018-09-21T23:01:49-04:00",
            "permissions": {
                "admin": true,
                "push": true,
                "pull": true
            },
            "has_issues": true,
            "internal_tracker": {
                "enable_time_tracker": true,
                "allow_only_contributors_to_track_time": true,
                "enable_issue_dependencies": true
            },
            "has_wiki": true,
            "has_pull_requests": true,
            "ignore_whitespace_conflicts": false,
            "allow_merge_commits": false,
            "allow_rebase": false,
            "allow_rebase_explicit": true,
            "allow_squash_merge": false,
            "avatar_url": ""
        },
        {
            "id": 4,
            "owner": {
                "id": 1,
                "login": "TitaneBoy",
                "full_name": "",
                "email": "[email protected]",
                "avatar_url": "http:https://192.168.0.18:3000/user/avatar/TitaneBoy/-1",
                "language": "en-US",
                "is_admin": true,
                "last_login": "2020-10-25T18:03:59-04:00",
                "created": "2018-05-12T01:04:43-04:00",
                "username": "TitaneBoy"
            },
            "name": "Open_SSL",
            "full_name": "TitaneBoy/Open_SSL",
            "description": "",
            "empty": true,
            "private": false,
            "fork": false,
            "template": false,
            "parent": null,
            "mirror": false,
            "size": 0,
            "html_url": "http:https://192.168.0.18:3000/TitaneBoy/Open_SSL",
            "ssh_url": "philoufelin@localhost:TitaneBoy/Open_SSL.git",
            "clone_url": "http:https://192.168.0.18:3000/TitaneBoy/Open_SSL.git",
            "original_url": "",
            "website": "",
            "stars_count": 0,
            "forks_count": 0,
            "watchers_count": 1,
            "open_issues_count": 0,
            "open_pr_counter": 0,
            "release_counter": 0,
            "default_branch": "master",
            "archived": false,
            "created_at": "2018-09-09T22:59:14-04:00",
            "updated_at": "2018-09-09T22:59:14-04:00",
            "permissions": {
                "admin": true,
                "push": true,
                "pull": true
            },
            "has_issues": true,
            "internal_tracker": {
                "enable_time_tracker": true,
                "allow_only_contributors_to_track_time": true,
                "enable_issue_dependencies": true
            },
            "has_wiki": true,
            "has_pull_requests": true,
            "ignore_whitespace_conflicts": false,
            "allow_merge_commits": false,
            "allow_rebase": false,
            "allow_rebase_explicit": true,
            "allow_squash_merge": false,
            "avatar_url": ""
        }
    ]
}

@TitaneBoy
Copy link
Author

Also, just to notify you that when I create a new repository through the Dashboard, I can see the new created repository on the Dashboard, but not the previous repositories I'm trying to display

@zeripath
Copy link
Contributor

I wonder if @aswild 's suggestion is happening here and the archived value is somehow different.

@TitaneBoy
Copy link
Author

From @aswild and @zeripath comment, I decided to take a look to the "is_archived" column value for all my repositories and this is what I got:

image

When I set the "is_archived" column values to 0, it seems now that I can see all my repositories on the Dashboard 🎉

image

image

@TitaneBoy
Copy link
Author

Thanks a lot @aswild & @zeripath for your support... I think that somehow in the migration process, this column must not be set correctly (at least for MySQL databases)..

@TitaneBoy
Copy link
Author

Not related anymore to this issue, but I wonder why sometimes, after a successfull login, I am redirected to /user/events

image

It Happened sometimes since I have done the updated to the latest version. When I disconnect and reconnect after, all seems fine and I get to the dashboard route.. But it seems that after a while, when disconnected, when I log in again, I got redirected to this path (/user/events)...Any ideas of what is happening for this one ? Thanks again for your support and answer...

@aswild
Copy link
Contributor

aswild commented Oct 28, 2020

I'm not a maintainer so this is just my unqualified opinion, but I'm not sure that this issue should be closed, unless the migration bug is already being tracked elsewhere.

If there's a bad migration path which can cause all repos to get flagged as archived, that sounds to me like a bug that should be fixed. "Manually fix the database using raw SQL commands" isn't really a great solution, just a quick hack that worked for me personally (since I didn't have any repos that I wanted to be archived).

@TitaneBoy
Copy link
Author

@aswild I think I'm kind of agree with you...The bug is still here and should be fixed...I can Reopen this issue if needed

@zeripath
Copy link
Contributor

This was already fixed in June.

It's fixed in v142.go which is in 1.13 and there is a doctor command to fix it in 1.12.5.

gitea doctor --run check-db-consistency --fix

The issue that spurred this was #11824

It was fixed in #11853 which backported to 1.12 the doctor fix as #11853

So no the bug is not still there.

@zeripath zeripath added the issue/duplicate The issue has already been reported. label Oct 28, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported.
Projects
None yet
Development

No branches or pull requests

4 participants