The title is a bit of a swing, but I think those are the elements involved. I’m on version 0.24.5, running in docker. I use OIDC to log in. I have two saved filters:
- Today’s MITs:
done = false && dueDate > now/d && dueDate < now/d+1d && priority >=4
- Tomorrow’s MITs:
done = false && dueDate > now/d+1d && dueDate < now/d+2d && priority >= 4
Last Thursday and Friday, these filters seemed to work very smoothly. All the tasks involved were created and edited in the Vikunja UI.
Over the weekend, I added some tasks via caldav (davx5 + Tasks on Android). This morning, these two filters are pretty busted. The “Today’s MITs” filter is only showing tasks due in the next couple of hours (by roughly 16:00 EST) and the “Tomorrow’s MITs” are showing multiple tasks due well before midnight:
My first guess was that this was a timezone problem, although those due dates are today even in UTC. My user account is set to America/New_York, the API config was set to America/New_York, but the ubuntu server itself is running on UTC. I changed the API config to Etc/UTC, but that made no difference. If I add hour-based offsets to my saved filters (dueDate < now/d+1d+8h
), the filters show more of what I expect them to, but that seems like a bad workaround.
Thinking that the caldav connection might have broken some of those tasks, I edited a couple via the Vikunja UI, clearing and re-setting their due dates and removing reminders. After doing so and then visiting the saved filters, I get this in my docker logs:
vikunja | 2025-02-03T16:53:26Z: ERROR ▶ 178a9 Error while handling message 592c41a0-09b5-4eeb-a9cd-3078892a1966, handler_poisoned=task.updated.task.set.saved.filter.views, subscriber_poisoned=gochannel.GoChannel, reason_poisoned=panic occurred: "invalid memory address or nil pointer dereference", stacktrace:
vikunja | goroutine 21264 [running]:
vikunja | runtime/debug.Stack()
vikunja | /usr/local/go/src/runtime/debug/stack.go:26 +0x5e
vikunja | github.com/ThreeDotsLabs/watermill/message/router/middleware.Recoverer.func1.1()
vikunja | /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.7/message/router/middleware/recoverer.go:29 +0x50
vikunja | panic({0x1696420?, 0x4a1d7a0?})
vikunja | /usr/local/go/src/runtime/panic.go:785 +0x132
vikunja | github.com/typesense/typesense-go/v2/typesense.GenericCollection[...](...)
vikunja | /go/pkg/mod/github.com/typesense/typesense-go/v2@v2.0.0/typesense/client.go:32
vikunja | github.com/typesense/typesense-go/v2/typesense.(*Client).Collection(...)
vikunja | /go/pkg/mod/github.com/typesense/typesense-go/v2@v2.0.0/typesense/client.go:36
vikunja | code.vikunja.io/api/pkg/models.reindexTasksInTypesense(0xc00098add0, 0xc0008f7ae0)
vikunja | /go/src/code.vikunja.io/api/pkg/models/typesense.go:325 +0x42d
vikunja | code.vikunja.io/api/pkg/models.(*UpdateTaskInSavedFilterViews).Handle(0x3e04d38?, 0xc0007d5140)
vikunja | /go/src/code.vikunja.io/api/pkg/models/listeners.go:734 +0xefd
vikunja | github.com/ThreeDotsLabs/watermill/message.(*Router).AddNoPublisherHandler.func1(0xc0003be230?)
vikunja | /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.7/message/router.go:338 +0x17
vikunja | github.com/ThreeDotsLabs/watermill/message/router/middleware.Recoverer.func1(0xc0008f7d50?)
vikunja | /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.7/message/router/middleware/recoverer.go:33 +0x70
vikunja | github.com/ThreeDotsLabs/watermill/message/router/middleware.Retry.Middleware-fm.Retry.Middleware.func1(0xc0007d5140)
vikunja | /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.7/message/router/middleware/retry.go:72 +0x27e
vikunja | github.com/ThreeDotsLabs/watermill/message/router/middleware.poisonQueue.Middleware-fm.poisonQueue.Middleware.func1(0x16b2a40?)
vikunja | /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.7/message/router/middleware/poison.go:99 +0xa2
vikunja | github.com/ThreeDotsLabs/watermill/components/metrics.HandlerPrometheusMetricsMiddleware.Middleware-fm.HandlerPrometheusMetricsMiddleware.Middleware.func1(0xc0007d5140)
vikunja | /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.7/components/metrics/handler.go:58 +0x19b
vikunja | github.com/ThreeDotsLabs/watermill/message.(*handler).handleMessage(0xc000294270, 0xc0007d5140, 0xc000532570)
vikunja | /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.7/message/router.go:783 +0x15b
vikunja | created by github.com/ThreeDotsLabs/watermill/message.(*handler).run in goroutine 249
vikunja | /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.7/message/router.go:628 +0x2a5
vikunja | , topic_poisoned=task.updated, payload={"task":{"id":1468,"title":"Task name","description":"\u003cp\u003e\u003c/p\u003e","done":false,"done_at":"0001-01-01T00:00:00Z","due_date":"2025-02-03T22:00:00Z","reminders":[{"reminder":"2025-02-03T22:00:00Z","relative_period":0,"relative_to":"due_date"}],"project_id":16,"repeat_after":0,"repeat_mode":0,"priority":5,"start_date":"0001-01-01T00:00:00Z","end_date":"0001-01-01T00:00:00Z","assignees":[],"labels":null,"hex_color":"","percent_done":0,"identifier":"#7","index":7,"related_tasks":{},"attachments":null,"cover_image_attachment_id":0,"is_favorite":false,"created":"2025-01-28T05:01:59Z","updated":"2025-02-03T16:53:15Z","bucket_id":0,"position":0,"reactions":{},"created_by":{"id":1,"name":"Me","username":"me","created":"2023-10-16T17:27:02Z","updated":"2025-02-03T16:11:14Z"}},"doer":{"id":1,"name":"Me","username":"me","email":"myemail@example.com","created":"0001-01-01T00:00:00Z","updated":"0001-01-01T00:00:00Z"}}
Not sure if this is a metrics middleware issue (I see prometheus mentioned in the stacktrace), me misunderstanding something about the query syntax, or something else about my setup, but I am able to replicate the offset problem in the demo environment if I set due dates and filter the two projects set up there. I can’t see if the null reference is happening there, of course.
Any thoughts on what could be going wrong here?