Skip to content

No user avatars #13159

Closed
Closed
@pboguslawski

Description

@pboguslawski

Gitea build from release/v1.13 and master with

[picture]
DISABLE_GRAVATAR        = true
ENABLE_FEDERATED_AVATAR = false

do not show avatars for users and throws internal server error (500) on avatar image get with log:

2020/10/15 14:24:39 Started GET /user/avatar/test/-1 for 127.0.0.1
2020/10/15 14:24:39 Completed GET /user/avatar/test/-1 302 Found in 2.687614ms
2020/10/15 14:24:39 [email protected]/recovery.go:141:1() �[1;32m[I] [Macaron] PANIC: middleware render hasn't been registered
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/render.go:653 (0x117f128)
		renderNotRegistered: panic("middleware render hasn't been registered")
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/render.go:710 (0x117f47f)
		(*DummyRender).Error: renderNotRegistered()
	/myhome/code/src/github.com/go-gitea/gitea/routers/routes/routes.go:155 (0x2c60f99)
		storageHandler.func2: ctx.Error(500, err.Error())
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/context.go:79 (0x11722a2)
		ContextInvoker.Invoke: invoke(params[0].(*Context))
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/inject.go:157 (0x11702ff)
		(*injector).fastInvoke: return f.Invoke(in)
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/inject.go:135 (0x116fc5c)
		(*injector).Invoke: return inj.fastInvoke(v, t, t.NumIn())
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/context.go:121 (0x117259f)
		(*Context).run: vals, err := c.Invoke(c.handler())
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/context.go:112 (0x1172443)
		(*Context).Next: c.run()
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/recovery.go:161 (0x118a4d6)
		Recovery.func1: c.Next()
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/logger.go:40 (0x1176e2f)
		LoggerInvoker.Invoke: invoke(params[0].(*Context), params[1].(*log.Logger))
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/inject.go:157 (0x11702ff)
		(*injector).fastInvoke: return f.Invoke(in)
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/inject.go:135 (0x116fc5c)
		(*injector).Invoke: return inj.fastInvoke(v, t, t.NumIn())
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/context.go:121 (0x117259f)
		(*Context).run: vals, err := c.Invoke(c.handler())
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/context.go:112 (0x1172443)
		(*Context).Next: c.run()
	/myhome/code/src/github.com/go-gitea/gitea/routers/routes/routes.go:106 (0x2c60060)
		RouterHandler.func1: ctx.Next()
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/context.go:79 (0x11722a2)
		ContextInvoker.Invoke: invoke(params[0].(*Context))
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/inject.go:157 (0x11702ff)
		(*injector).fastInvoke: return f.Invoke(in)
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/inject.go:135 (0x116fc5c)
		(*injector).Invoke: return inj.fastInvoke(v, t, t.NumIn())
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/context.go:121 (0x117259f)
		(*Context).run: vals, err := c.Invoke(c.handler())
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/router.go:187 (0x118c09e)
		(*Router).Handle.func1: c.run()
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/router.go:303 (0x1182bbf)
		(*Router).ServeHTTP: h(rw, req, p)
	/myhome/go/pkg/mod/gitea.com/macaron/[email protected]/macaron.go:218 (0x11787f0)
		(*Macaron).ServeHTTP: m.Router.ServeHTTP(rw, req)
	/myhome/go/pkg/mod/github.com/gorilla/[email protected]/context.go:141 (0x189aca1)
		ClearHandler.func1: h.ServeHTTP(w, r)
	/usr/lib/go-1.13/src/net/http/server.go:2007 (0x8af463)
		HandlerFunc.ServeHTTP: f(w, r)
	/usr/lib/go-1.13/src/net/http/server.go:2802 (0x8b3c6e)
		serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
	/usr/lib/go-1.13/src/net/http/server.go:1890 (0x8ae405)
		(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
	/usr/lib/go-1.13/src/runtime/asm_amd64.s:1357 (0x46fda0)
		goexit: BYTE	$0x90	// NOP
2020/10/15 14:24:39 Started GET /avatars/7112ca6ffcdbc82b1a4735aec33678c6 for 127.0.0.1
2020/10/15 14:24:39 Completed GET /avatars/7112ca6ffcdbc82b1a4735aec33678c6 �[1;41m500 �[1;41mInternal Server Error in 1.648505ms

No such problem with org avatars with same config.

No such problem with user avatars with default settings:

[picture]
DISABLE_GRAVATAR        = false
ENABLE_FEDERATED_AVATAR = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions