Panic: runtime error: invalid memory address
I thought I should report this.
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x18512b1] goroutine 68 [running]: gopkg.in/gomail%2ev2.send(0x0, 0x0, 0xc024aa0140, 0x140f9a8, 0xc000465600) /email@example.com/send.go:57 +0x91 gopkg.in/gomail%2ev2.Send(0x0, 0x0, 0xc000177f68, 0x1, 0x1, 0x2, 0x0) /firstname.lastname@example.org/send.go:38 +0x73 code.vikunja.io/api/pkg/mail.StartMailDaemon.func1() /bigus/vikunja/api/pkg/mail/mail.go:73 +0x345 created by code.vikunja.io/api/pkg/mail.StartMailDaemon /bigus/vikunja/api/pkg/mail/mail.go:55 +0x167
The entry in
standard.log was this:
2021-05-24T14:06:05.707537588-07:00: ERROR ▶ mail/func1 0ea Error during connect to smtp server: %s x509: certificate has expired or is not yet valid: current time 2021-05-24T14:06:05-07:00 is after 2020-06-23T17:36:24Z
The version I used was git cloned at the commit indicated below:
> git log --oneline | head -1 67f86312 Update module go-testfixtures/testfixtures/v3 to v3.6.1 (#868) > ./vikunja version Vikunja api version v0.17.0+11-67f863120e Built with go1.15.8
FreeBSD 12.2-STABLE r368820 amd64
The panic shouldn't happen, but this looks like the TLS certificate of the mail server is not valid.
You could disable the certificate verification: https://vikunja.io/docs/config-options/#skiptlsverify
Does the error go away when you enable that option?
I'll leave this issue open until the panicking itself is fixed and the error is handled properly.
I can't be 100% sure, since I am new to this software, but it seems it works now. I do see a mail message sent after skiptlsverify was set to true.
The mail certificates here are self-signed and won't verify. I know I can use Let's Encrypt to get a valid one, but as a developer myself I do not believe the software should panic with a SEGV for any reason. :)
Deleting a branch is permanent. It CANNOT be undone. Continue?