Skip to content

Activity pages (besides Pulse) brocken - Server sends negative Unix-time #31248

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

Closed
snoweuph opened this issue Jun 4, 2024 · 7 comments
Closed
Labels

Comments

@snoweuph
Copy link

snoweuph commented Jun 4, 2024

Description

The Activity Tab are loading a long time, and then are just empty.
This does not seeme to be the same problem as: #30851

This happens to all Repos on my Instance:.
Test Repo: https://git.euph.dev/Snoweuph/Dotfiles/activity/contributors

it looks like my server is sending negative unix time:
https://git.euph.dev/Snoweuph/Dotfiles/activity/contributors/data
specificly all unixtimestamps are -62135596800000

Gitea Version

22.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://pastebin.com/LU9eVE2W

Screenshots

image
image

Git Version

2.20.1

Operating System

Debian 10 - Kernel 4.19.0-26

How are you running Gitea?

I run gitea as a Systemd Service.

gitea.service

[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target

[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea

[Install]
WantedBy=multi-user.target

app.ini

APP_NAME = Giteuph
RUN_USER = git
RUN_MODE = prod
WORK_PATH = /var/lib/gitea

[oauth2]
JWT_SECRET = ...

[security]
INTERNAL_TOKEN = ...
INSTALL_LOCK = true
SECRET_KEY = ...

[database]
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = gitea
USER = gitea
PASSWD = ...
SCHEMA =
SSL_MODE = disable
CHARSET = utf8
PATH = /var/lib/gitea/data/gitea.db
LOG_SQL = false

[repository]
ROOT = /home/git/gitea-repositories

[attachment]
MAX_SIZE = 1000

[server]
SSH_DOMAIN = git.euph.dev
DOMAIN = git.euph.dev
HTTP_PORT = 3000
ROOT_URL = https://git.euph.dev/
DISABLE_SSH = false
SSH_PORT = 22
LFS_START_SERVER = true
LFS_JWT_SECRET = ...
OFFLINE_MODE = false

[storage.packages]
STORAGE_TYPE = local
PATH = /mnt/gitea-data/packages

[mailer]
ENABLED = true
SMTP_ADDR = box.euph.email:465
FROM = [email protected]
USER = [email protected]
PASSWD = ...

[service]
REGISTER_EMAIL_CONFIRM = true
ENABLE_NOTIFY_MAIL = true
DISABLE_REGISTRATION = true
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
ENABLE_CAPTCHA = true
REQUIRE_SIGNIN_VIEW = false
DEFAULT_KEEP_EMAIL_PRIVATE = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = noreply.localhost

[picture]
DISABLE_GRAVATAR = false
ENABLE_FEDERATED_AVATAR = false

[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false

[session]
PROVIDER = file

[log]
MODE = file
LEVEL = info
ROOT_PATH = /var/lib/gitea/log
REDIRECT_MACARON_LOG = true
MACARON = console

[ui]
THEMES = gitea-auto,gitea-light,gitea-dark,catppuccin-latte-blue,catppuccin-latte-flamingo,catppuccin-latte-green,catppuccin-latte-lavender,catppuccin-latte-maroon,catppuccin-latte-mauve,catppuccin-latte-peach,catppuccin-latte-pink,cat$
DEFAULT_THEME = gitea-auto

[actions]
ENABLED = true

Database

MySQL/MariaDB

@snoweuph
Copy link
Author

snoweuph commented Jun 4, 2024

I did a small test, to make sure that the go time lib works, and it seems to look fine:

root@euph:~/test# cat main.go 
package main

import (
        "fmt"
        "time"
)

func main() {
        now := time.Now()
        fmt.Println("The current time and date is:", now)
}
root@euph:~/test# go run main.go 
The current time and date is: 2024-06-04 15:35:18.373897005 +0000 UTC m=+0.000015481

@snoweuph
Copy link
Author

snoweuph commented Jun 4, 2024

@kemzeb you said:

After looking at the code that builds these Unix times, I haven't been able to determine the cause (or if the problem resides elsewhere). If you wish, you can open a new issue so that we can track this potential bug.

so, i'm just now building a gitea binary myself, based on the v22 tag and i'm changing it up to return the startingOfWeek as debugging data

@snoweuph
Copy link
Author

snoweuph commented Jun 4, 2024

well, my compiled binary ( compiled on the Server) directly crashes (using make build) so I guess, I will have to try somethign else

@snoweuph
Copy link
Author

snoweuph commented Jun 4, 2024

I fixed it, by installing a nwer git version with sha256 support (the newest one) from source.

the git on debian 10 is to old

@snoweuph
Copy link
Author

snoweuph commented Jun 4, 2024

On Linode Debian 10, the git version is 2.20 which is not working with the new version of gitea, solution: install git from source

@snoweuph snoweuph closed this as completed Jun 4, 2024
@kemzeb
Copy link
Member

kemzeb commented Jun 4, 2024

Glad that you were able to solve it! Did not expect it to be because of an outdated git

@snoweuph
Copy link
Author

snoweuph commented Jun 5, 2024

Yea, same

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants