Crash when sending email Reminder

Hi,
first of all I like to thank you for the awesome work you put together :slight_smile: . I really like the beautful UI and flexibility of vikunja :slight_smile:

I´ve set up Vikunja 0.16 with a SQLite Database on SLES. So far everything works great except email reminders. It seems to me that vikunja crashes everytime a reminder is due to send.

standard.log

2021-03-10T10:14:12.655953071+01:00: INFO       ▶ cmd/func2 032 Vikunja version v0.16.0
2021-03-10T10:15:00.00011365+01:00: DEBUG       ▶ models/getTasksWithRemindersInTheNextMinute 04c [Task Reminder Cron] Looking for reminders between 2021-03-10 09:15:00 +0000 GMT and 2021-03-10 09:16:00 +0000 GMT to send...
2021-03-10T10:15:00.000361186+01:00: DEBUG      ▶ models/getTasksWithRemindersInTheNextMinute 050 [Task Reminder Cron] Found 1 reminders
2021-03-10T10:15:00.000737293+01:00: DEBUG      ▶ models/func1 056 [Task Reminder Cron] Sending reminders to 1 users
2021-03-10T10:15:02.15180923+01:00: INFO        ▶ migration/Migrate 030 Ran all migrations successfully.

Vikunja ist started with the default sysmtemd script so it gets instaltly restarted after a crash.

Testmails via the ./vikunja testmail are working fine.

2021-03-10T10:08:09.802138805+01:00: INFO       ▶ cmd/func12 001 Sending testmail...
2021-03-10T10:08:10.053825475+01:00: INFO       ▶ cmd/func12 002 Testmail successfully sent.

Am I missing someting?

Thanks a lot :slight_smile:

Thanks for the kind words :slightly_smiling_face:

Do you have any logs from the crash itself?

Hi, thanks for your reply.

When starting vikunja without systemd, direktly from the shell, I get the follow error message:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0xd9102c]

goroutine 67 [running]:
code.vikunja.io/api/pkg/models.RegisterReminderCron.func1()
        /go/src/code.vikunja.io/api/pkg/models/task_reminder.go:170 +0x3ec
github.com/robfig/cron/v3.FuncJob.Run(0xc000032970)
        /srv/app/pkg/mod/github.com/robfig/cron/v3@v3.0.1/cron.go:136 +0x25
github.com/robfig/cron/v3.(*Cron).startJob.func1(0xc00033d0e0, 0x164f760, 0xc000032970)
        /srv/app/pkg/mod/github.com/robfig/cron/v3@v3.0.1/cron.go:312 +0x65
created by github.com/robfig/cron/v3.(*Cron).startJob
        /srv/app/pkg/mod/github.com/robfig/cron/v3@v3.0.1/cron.go:310 +0x73

The standard.log does not contain any details.

The crash is reproducable with every email reiminder. As soon, as the email is due to send vikunja crashes.

That definitely looks like a bug. I’ll take a look.

Do you think you could check this with the unstable release? (make a backup first)
I think I’ve seen this already and there might be a fix already in unstable, not sure though.

Hi thanks for your reply.
I´ve set up a second instance of vikunja with a copy of the original datatbase and a compiled version of HEAD (Vikunja api version v0.16.0+99-87f7cbfa73).

Vikunja isnt crashing anymore when a email reminder is due to be sent.

Still Vikunja isnt able to sent reminders:
Output from the started Binary:

⇨ http server started on [::]:3457
2021-03-18T12:03:41.753369415+01:00: INFO       ▶ [EVENTS] 0cc No subscribers to send message, message_uuid=50059b9c-934b-4332-b00b-bc2f06046092, topic=task.updated

Output from standard.log

2021-03-18T12:15:00.01114257+01:00: DEBUG       ▶ models/getTasksWithRemindersInTheNextMinute 2ae [Task Reminder Cron] Found 1 reminders
2021-03-18T12:15:00.011505893+01:00: DEBUG      ▶ models/func1 2b4 [Task Reminder Cron] Sending reminders to 0 users

Vikunja test-email and registration-emails are working fine. Ive tried this with my existing user and a newly created one.

I suppose the user you’re trying this with has reminders enabled and is the one who created the task with the reminder? And the task is not done?

Could you enable the database debug log and post relevant parts here? (obfuscate any sensitive stuff or send it to me privately)

I’m sorry my user did not have the email reminder option set under settings.

After enabling this option everythings works perfectly.

1 Like