Open zc-devs opened 5 days ago
Works here: https://ci.woodpecker-ci.org/repos/3780/branches
Can you try to find the cause?
I think it's about user token.
I have not been logged in for a while, got errors. My user had tokens:
// users.token
{
"gnt": 1,
"tt": 0,
"exp": 1729508761, // Monday, October 21, 2024 11:06:01 AM
"iat": 1729505161 // Monday, October 21, 2024 10:06:01 AM
}
// users.secret
{
"gnt": 1,
"tt": 1,
"exp": 1732133161, // Wednesday, November 20, 2024 8:06:01 PM
"iat": 1729505161 // Monday, October 21, 2024 10:06:01 AM
}
After logging in and logging out, Branches list works under anonymous user too and I got updated users
table:
// users.token
{
"gnt": 1,
"tt": 0,
"exp": 1729765645, // Thursday, October 24, 2024 10:27:25 AM
"iat": 1729762045 // Thursday, October 24, 2024 9:27:25 AM
}
// users.secret
{
"gnt": 1,
"tt": 1,
"exp": 1732390045, // Saturday, November 23, 2024 7:27:25 PM
"iat": 1729762045 // Thursday, October 24, 2024 9:27:25 AM
}
So yes, after 1 hour since login/logout I have the same error. I've updated the issue.
Component
server, web-ui
Describe the bug
Trying to open Branches tab on public repo, I get infinite loading spinner and error
: failed to load branches: user does not exist [uid: 0, name: ]
Steps to reproduce
Error: : failed to load branches: user does not exist [uid: 0, name: ] _request https://domain.tld/assets/index-CaKTCYMy.js:44 _get https://domain.tld/assets/index-CaKTCYMy.js:44 getRepoBranches https://domain.tld/assets/index-CaKTCYMy.js:44
{"level":"trace","time":"2024-10-22T16:10:12Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/router/router.go:43","message":"[GET] /api/repos/2/branches?page=1"} {"level":"debug","time":"2024-10-22T16:10:12Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/router/middleware/session/repo.go:160","message":"guest granted &{UserID:0 RepoID:0 Repo: Pull:true Push:false Admin:false Synced:0 Created:0 Updated:0} to wp/test"}
{"level":"error","error":"user does not exist [uid: 0, name: ]","time":"2024-10-22T16:10:12Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/api/repo.go:363","message":"failed to load branches"}
{"level":"debug","ip":"1.2.3.4","latency":82.330564,"method":"GET","path":"/api/repos/2/branches","status":500,"time":"2024-10-22T16:10:12Z","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0","time":"2024-10-22T16:10:12Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/router/middleware/logger.go:59"}
2024/10/22 16:12:56 ...eb/routing/logger.go:102:func1() [I] router: completed GET /api/v1/version for [4.3.2.1]:0, 401 Unauthorized in 1.1ms @ v1/api.go:748(v1.Routes.apiAuth)
Additional context
The same on
2.7.1
, but there are twoAn unknown error occurred
in UI without details (in server logs the same error as onnext
).Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]