We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
[x]
Conditions: Repositories in Gitea:
Case 1) If I search for the "Test" (q=Test) repository via /repos/search (https://github.com/gogits/go-gogs-client/wiki/Repositories) I receive Error 500 "Internal Server Error".
Case 2) If I search for any other text like "Example" I receive a correct response: {"data":[],"ok":true}
{"data":[],"ok":true}
Console output (Case 1)
[Macaron] 2017-04-29 16:01:58: Started GET /api/v1/repos/search?q=Test for [::1] [Macaron] PANIC: runtime error: invalid memory address or nil pointer dereference C:/Go/src/runtime/panic.go:489 (0x42cf1d) gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz)) C:/Go/src/runtime/panic.go:63 (0x42bd75) panicmem: panic(memoryError) C:/Go/src/runtime/signal_windows.go:161 (0x440d5b) sigpanic: panicmem() C:/Users/Jonas/go/src/code.gitea.io/gitea/routers/api/v1/repo/repo.go:79 (0xdd0a7a) Search: accessMode, err := models.AccessLevel(ctx.User.ID, repo) C:/Go/src/runtime/asm_amd64.s:514 (0x45814f) call32: CALLFN(·call32, 32) C:/Go/src/reflect/value.go:434 (0x4d7dc6) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) C:/Go/src/reflect/value.go:302 (0x4d736b) Value.Call: return v.call("Call", in) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x875416) (*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x874dc1) (*injector).Invoke: return inj.callInvoke(f, t, t.NumIn()) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x8a2799) (*Context).run: vals, err := c.Invoke(c.handler()) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 (0x8a26ad) (*Context).Next: c.run() C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:186 (0x8fc167) Sessioner.func1: ctx.Next() C:/Go/src/runtime/asm_amd64.s:514 (0x45814f) call32: CALLFN(·call32, 32) C:/Go/src/reflect/value.go:434 (0x4d7dc6) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) C:/Go/src/reflect/value.go:302 (0x4d736b) Value.Call: return v.call("Call", in) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x875416) (*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x874dc1) (*injector).Invoke: return inj.callInvoke(f, t, t.NumIn()) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x8a2799) (*Context).run: vals, err := c.Invoke(c.handler()) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 (0x8a26ad) (*Context).Next: c.run() C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/recovery.go:161 (0x8b5cd2) Recovery.func1: c.Next() C:/Go/src/runtime/asm_amd64.s:514 (0x45814f) call32: CALLFN(·call32, 32) C:/Go/src/reflect/value.go:434 (0x4d7dc6) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) C:/Go/src/reflect/value.go:302 (0x4d736b) Value.Call: return v.call("Call", in) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x875416) (*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x874dc1) (*injector).Invoke: return inj.callInvoke(f, t, t.NumIn()) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x8a2799) (*Context).run: vals, err := c.Invoke(c.handler()) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:104 (0x8a26ad) (*Context).Next: c.run() C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/logger.go:43 (0x8b4f8b) Logger.func1: ctx.Next() C:/Go/src/runtime/asm_amd64.s:514 (0x45814f) call32: CALLFN(·call32, 32) C:/Go/src/reflect/value.go:434 (0x4d7dc6) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) C:/Go/src/reflect/value.go:302 (0x4d736b) Value.Call: return v.call("Call", in) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x875416) (*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x874dc1) (*injector).Invoke: return inj.callInvoke(f, t, t.NumIn()) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:113 (0x8a2799) (*Context).run: vals, err := c.Invoke(c.handler()) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:184 (0x8b6ff0) (*Router).Handle.func1: c.run() C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:288 (0x8aef84) (*Router).ServeHTTP: h(rw, req, p) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/macaron.go:177 (0x8a6cd3) (*Macaron).ServeHTTP: m.Router.ServeHTTP(rw, req) C:/Users/Jonas/go/src/code.gitea.io/gitea/vendor/github.com/gorilla/context/context.go:141 (0xad8562) ClearHandler.func1: h.ServeHTTP(w, r) C:/Go/src/net/http/server.go:1942 (0x6e280b) HandlerFunc.ServeHTTP: f(w, r) C:/Go/src/net/http/server.go:2568 (0x6e5159) serverHandler.ServeHTTP: handler.ServeHTTP(rw, req) C:/Go/src/net/http/server.go:1825 (0x6e1359) (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req) C:/Go/src/runtime/asm_amd64.s:2197 (0x45a931) goexit: BYTE $0x90 // NOP [Macaron] 2017-04-29 16:01:58: Completed /api/v1/repos/search?q=Test 500 Internal Server Error in 128.0074ms `
The text was updated successfully, but these errors were encountered:
Fixed with #1622
Edit:: Hmm, or maybe not still seems to be issues with it. 500 on https://try.gitea.io/ if not signed in.
Edit2:: PR#1622 was in user/repo.go, problem is the same though. ctx.User is not set unless signed in.
ctx.User
Sorry, something went wrong.
woho. Another ctx.User != nil bug 😂
ctx.User != nil
fix go-gitea#1643 and improve integration test
2621e57
fix #1643 and improve integration test (#1645)
0308d44
lunny
Successfully merging a pull request may close this issue.
[x]
):Description
Conditions:
Repositories in Gitea:
Case 1) If I search for the "Test" (q=Test) repository via /repos/search (https://github.com/gogits/go-gogs-client/wiki/Repositories) I receive Error 500 "Internal Server Error".
Case 2) If I search for any other text like "Example" I receive a correct response:
{"data":[],"ok":true}
Console output (Case 1)
The text was updated successfully, but these errors were encountered: