PANIC type not registered for interface: oauth2.Source #14781

Closed
opened 2025-11-02 11:22:48 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @earthjasonlin on GitHub (Jul 19, 2025).

Description

Generally, I can log in if I have already linked my account to Github before, but new users aren't able to use "Sign in with GitHub" button on login page.
app.ini

APP_NAME =Gitea
RUN_USER = git
WORK_PATH = /data/gitea
[server]
APP_DATA_PATH = /data/gitea
DOMAIN = xxxxxxxxxxxxxxxxxxx
HTTP_PORT = 3000
ROOT_URL = xxxxxxxxxxxxxxxxxxx
DISABLE_SSH = true
LFS_START_SERVER = true
LFS_JWT_SECRET = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
OFFLINE_MODE = false
[repository]
ROOT = /data/repositories
[repository.local]
LOCAL_COPY_PATH = /data/gitea/tmp/local-repo
[repository.upload]
TEMP_PATH = /data/gitea/uploads
[database]
PATH = /data/gitea/gitea.db
DB_TYPE = sqlite3
[indexer]
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
[picture]
AVATAR_UPLOAD_PATH = /data/gitea/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars
[attachment]
PATH = /data/gitea/attachments
[session]
PROVIDER_CONFIG = /data/gitea/sessions
PROVIDER = file
[log]
MODE = console, file
LEVEL = info
[security]
INSTALL_LOCK = true
SECRET_KEY = 
REVERSE_PROXY_LIMIT = 1
REVERSE_PROXY_TRUSTED_PROXIES = *
INTERNAL_TOKEN = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PASSWORD_HASH_ALGO = pbkdf2
[service]
ALLOW_ONLY_EXTERNAL_REGISTRATION = true
ENABLE_CAPTCHA = true
[lfs]
PATH = /data/lfs
[openid]
ENABLE_OPENID_SIGNUP = false
[oauth2]
JWT_SECRET = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[ui]
DEFAULT_THEME = lutinglt-github
THEMES = 
[cron.update_checker]
ENABLED = false

log

2025/07/19 19:29:29 HTTPRequest [W] router: failed    GET /user/oauth2/GitHub/callback?code=d4d33c437024418d34fc&state=c54eb4a5-292a-49f6-96c2-3e52acf74f99 for 119.34.177.217:0, panic in 762.8ms @ auth/oauth.go:74(auth.SignInOAuthCallback), err=session(release): gob: type not registered for interface: oauth2.Source
2025/07/19 19:29:29 routers/common/errpage.go:25:RenderPanicErrorPage() [E] PANIC: session(release): gob: type not registered for interface: oauth2.Source
/usr/local/go/src/runtime/panic.go:792 (0x47da31)
/go/src/code.gitea.io/gitea/modules/web/routing/logger_manager.go:116 (0x179c8c4)
/usr/local/go/src/runtime/panic.go:792 (0x47da31)

Gitea Version

1.25.0+dev-319-g3531e9dbfd

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Image Image Image (Yes for some reason Idk I get two screen of 500)

Git Version

No response

Operating System

No response

How are you running Gitea?

docker nightly

Database

SQLite

Originally created by @earthjasonlin on GitHub (Jul 19, 2025). ### Description Generally, I can log in if I have already linked my account to Github before, but new users aren't able to use "Sign in with GitHub" button on login page. app.ini ```config APP_NAME =Gitea RUN_USER = git WORK_PATH = /data/gitea [server] APP_DATA_PATH = /data/gitea DOMAIN = xxxxxxxxxxxxxxxxxxx HTTP_PORT = 3000 ROOT_URL = xxxxxxxxxxxxxxxxxxx DISABLE_SSH = true LFS_START_SERVER = true LFS_JWT_SECRET = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx OFFLINE_MODE = false [repository] ROOT = /data/repositories [repository.local] LOCAL_COPY_PATH = /data/gitea/tmp/local-repo [repository.upload] TEMP_PATH = /data/gitea/uploads [database] PATH = /data/gitea/gitea.db DB_TYPE = sqlite3 [indexer] ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve [picture] AVATAR_UPLOAD_PATH = /data/gitea/avatars REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars [attachment] PATH = /data/gitea/attachments [session] PROVIDER_CONFIG = /data/gitea/sessions PROVIDER = file [log] MODE = console, file LEVEL = info [security] INSTALL_LOCK = true SECRET_KEY = REVERSE_PROXY_LIMIT = 1 REVERSE_PROXY_TRUSTED_PROXIES = * INTERNAL_TOKEN = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PASSWORD_HASH_ALGO = pbkdf2 [service] ALLOW_ONLY_EXTERNAL_REGISTRATION = true ENABLE_CAPTCHA = true [lfs] PATH = /data/lfs [openid] ENABLE_OPENID_SIGNUP = false [oauth2] JWT_SECRET = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [ui] DEFAULT_THEME = lutinglt-github THEMES = [cron.update_checker] ENABLED = false ``` log ```log 2025/07/19 19:29:29 HTTPRequest [W] router: failed GET /user/oauth2/GitHub/callback?code=d4d33c437024418d34fc&state=c54eb4a5-292a-49f6-96c2-3e52acf74f99 for 119.34.177.217:0, panic in 762.8ms @ auth/oauth.go:74(auth.SignInOAuthCallback), err=session(release): gob: type not registered for interface: oauth2.Source 2025/07/19 19:29:29 routers/common/errpage.go:25:RenderPanicErrorPage() [E] PANIC: session(release): gob: type not registered for interface: oauth2.Source /usr/local/go/src/runtime/panic.go:792 (0x47da31) /go/src/code.gitea.io/gitea/modules/web/routing/logger_manager.go:116 (0x179c8c4) /usr/local/go/src/runtime/panic.go:792 (0x47da31) ``` ### Gitea Version 1.25.0+dev-319-g3531e9dbfd ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots <img width="1485" height="976" alt="Image" src="https://github.com/user-attachments/assets/49cb5e11-4c64-4900-8d3b-d25d83e8ec7c" /> <img width="537" height="1027" alt="Image" src="https://github.com/user-attachments/assets/20a0fee9-bc51-40d8-b178-fc679da76256" /> <img width="1677" height="1046" alt="Image" src="https://github.com/user-attachments/assets/11ad7297-39f2-4edb-ac98-5ceaf51c19ae" /> (Yes for some reason Idk I get two screen of 500) ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? docker nightly ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 11:22:48 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jul 19, 2025):

Will fix

@wxiaoguang commented on GitHub (Jul 19, 2025): Will fix
Author
Owner

@wxiaoguang commented on GitHub (Jul 19, 2025):

-> Fix session gob #35128

@wxiaoguang commented on GitHub (Jul 19, 2025): -> Fix session gob #35128
Author
Owner

@wxiaoguang commented on GitHub (Jul 20, 2025):

-> Fix session gob #35128

1.25 nightly is ready and contains the fix (1.24 is not affected):

Feel free to reopen if there is still any problem.

@wxiaoguang commented on GitHub (Jul 20, 2025): > -> Fix session gob [#35128](https://github.com/go-gitea/gitea/pull/35128) 1.25 nightly is ready and contains the fix (1.24 is not affected): * https://dl.gitea.com/gitea/main-nightly/ * https://hub.docker.com/r/gitea/gitea/tags?name=nightly Feel free to reopen if there is still any problem.
Author
Owner

@earthjasonlin commented on GitHub (Jul 20, 2025):

Solved, ty

@earthjasonlin commented on GitHub (Jul 20, 2025): Solved, ty
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14781