Skip to content

500 error on opening any question #1426

@Giorgio-Bonvicini-R4P

Description

@Giorgio-Bonvicini-R4P

Describe the bug

When any user tries to open any question, they get a 500 error and this error in the log

apache-answer  | 2025-11-14 12:04:43.747        ERROR   handler/handler.go:53   code: 500, reason: base.database_error, message: , error: pq: invalid input syntax for type bigint: "null"
apache-answer  | /go/answer_build4056531135/vendor/github.com/apache/answer/internal/repo/comment/comment_repo.go:112 github.com/apache/answer/internal/repo/comment.(*commentRepo).GetComment
apache-answer  | /go/answer_build4056531135/vendor/github.com/apache/answer/internal/service/comment/comment_service.go:399 github.com/apache/answer/internal/service/comment.(*CommentService).GetCommentWithPage
apache-answer  | /go/answer_build4056531135/vendor/github.com/apache/answer/internal/controller/comment_controller.go:261 github.com/apache/answer/internal/controller.(*CommentController).GetCommentWithPage
apache-answer  | /go/answer_build4056531135/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
apache-answer  | /go/answer_build4056531135/vendor/github.com/apache/answer/internal/base/middleware/auth.go:106 github.com/apache/answer/internal/base/server.NewHTTPServer.(*AuthUserMiddleware).EjectUserBySiteInfo.func9
apache-answer  | /go/answer_build4056531135/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
apache-answer  | /go/answer_build4056531135/vendor/github.com/apache/answer/internal/base/middleware/auth.go:75 github.com/apache/answer/internal/base/server.NewHTTPServer.(*AuthUserMiddleware).Auth.func8
apache-answer  | /go/answer_build4056531135/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
apache-answer  | /go/answer_build4056531135/vendor/github.com/anargu/gin-brotli/gin_brotli.go:71 github.com/apache/answer/internal/base/server.NewHTTPServer.Brotli.func3
apache-answer  | /go/answer_build4056531135/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
apache-answer  | /go/answer_build4056531135/vendor/github.com/gin-gonic/gin/gin.go:633 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
apache-answer  | /go/answer_build4056531135/vendor/github.com/gin-gonic/gin/gin.go:589 github.com/gin-gonic/gin.(*Engine).ServeHTTP
apache-answer  | /usr/local/go/src/net/http/server.go:3210 net/http.serverHandler.ServeHTTP
apache-answer  | /usr/local/go/src/net/http/server.go:2092 net/http.(*conn).serve
apache-answer  | /usr/local/go/src/runtime/asm_amd64.s:1700 runtime.goexit

Additionally:

  • the home page and search page are working fine
  • when opening a question the page is briefly rendered correctly before being replaced by the 500 error page

To Reproduce

I am not sure what could have triggered this.

Had a version 1.6.0 working ok until yesterday, then yesterday we upgraded to 1.7.0 and enabled the mellisearch plugin. After the upgrade I seem to recall opening a few questions and they were ok (not 100% sure though, might have just opened the home and search page without opening any specific questions)

Platform

  • Device: Both desktop and mobile
  • OS: Debian Bookworm
  • Browser and version: Chrome
  • Version: v1.7.0

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

Status

Review

Relationships

None yet

Development

No branches or pull requests

Issue actions