Panic: runtime error: invalid memory address #870

Open
opened 4 weeks ago by Dave · 3 comments
Dave commented 4 weeks ago

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)
	/home/dave/go/pkg/mod/gopkg.in/gomail.v2@v2.0.0-20160411212932-81ebce5c23df/send.go:57 +0x91
gopkg.in/gomail%2ev2.Send(0x0, 0x0, 0xc000177f68, 0x1, 0x1, 0x2, 0x0)
	/home/dave/go/pkg/mod/gopkg.in/gomail.v2@v2.0.0-20160411212932-81ebce5c23df/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

on OS

FreeBSD 12.2-STABLE r368820 amd64
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) /home/dave/go/pkg/mod/gopkg.in/gomail.v2@v2.0.0-20160411212932-81ebce5c23df/send.go:57 +0x91 gopkg.in/gomail%2ev2.Send(0x0, 0x0, 0xc000177f68, 0x1, 0x1, 0x2, 0x0) /home/dave/go/pkg/mod/gopkg.in/gomail.v2@v2.0.0-20160411212932-81ebce5c23df/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 ``` on OS ``` FreeBSD 12.2-STABLE r368820 amd64 ```
Owner

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.

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.
Poster

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. :)

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. :)
Owner

Oh yeah it definitely should not panic 🙃

Oh yeah it definitely should not panic 🙃
konrad added the
kind/bug
label 4 weeks ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.