Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending test email causes dial failed: EOF and ends with panic #98

Open
hashimaziz1 opened this issue Oct 24, 2024 · 0 comments
Open

Sending test email causes dial failed: EOF and ends with panic #98

hashimaziz1 opened this issue Oct 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hashimaziz1
Copy link
Contributor

hashimaziz1 commented Oct 24, 2024

Describe the bug
Sending a test email with known working SMTP credentials causes the error dial failed: EOF, which eventually results in a fatal panic.

To Reproduce

  1. Have main.exe open in a terminal window
  2. In the GUI, go to the Alert tab and add a valid email to receive alerts at, then go to the SMTP tab and add known working SMTP credentials
  3. Click Send Test Email

Expected behavior
A test email should be sent to the email in the Alerts tab - instead the following output is produced:

⇨ http server started on [::]:3124
{"time":"2024-10-24T21:48:14.7867453+01:00","id":"","remote_ip":"127.0.0.1","host":"localhost:3124","method":"GET","uri":"/config/alerts","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0","status":200,"error":"","latency":560
900,"latency_human":"560.9µs","bytes_in":0,"bytes_out":0}
{"time":"2024-10-24T21:48:16.5343045+01:00","id":"","remote_ip":"127.0.0.1","host":"localhost:3124","method":"GET","uri":"/config/smtp","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0","status":200,"error":"","latency":0,"la
tency_human":"0s","bytes_in":0,"bytes_out":0}
2024/10/24 21:48:16 🔄 Refreshing WHOIS cache
2024/10/24 21:48:17 Error parsing whois for https://www.watcheddomain.uk: whoisparser: domain whois data is invalid
2024/10/24 21:48:17 💾 Flushed WHOIS data cache to whois-cache.yaml
2024/10/24 21:48:17 💾 Flushed WHOIS data cache to whois-cache.yaml
2024/10/24 21:48:17 📆 Scheduler running WHOIS expiration checks every 4h0m0s
2024/10/24 21:48:30 failed to deliver mail: dial failed: EOF
2024/10/24 21:48:30 ❌ Failed to send test mail to [email protected]: dial failed: EOF
{"time":"2024-10-24T21:48:30.6773651+01:00","level":"ERROR","prefix":"echo","file":"error.handler.go","line":"15","message":"dial failed: EOF"}
{"time":"2024-10-24T21:48:30.7865444+01:00","id":"","remote_ip":"127.0.0.1","host":"localhost:3124","method":"POST","uri":"/mailer/test","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0","status":200,"error":"dial failed: EOF
","latency":10800009000,"latency_human":"10.800009s","bytes_in":0,"bytes_out":1443}
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0xd8 pc=0x799722]

goroutine 24 [running]:
main.domainExpirationCheckOnSchedule({{{0xc000002480, 0x3, 0x3}}, {0xc000014948, 0x17}}, {{{0xc00012ae00, 0x3, 0x3}}, {0xc000014858, 0x12}}, ...)
        D:/Users/Hashim/Desktop/domain-monitor/cmd/main.go:127 +0x442
main.main.func2()
        D:/Users/Hashim/Desktop/domain-monitor/cmd/main.go:102 +0x88
created by time.goFunc
        C:/Program Files/Go/src/time/sleep.go:215 +0x2d

Desktop (please complete the following information):

  • OS: Windows 10 via Cygwin
  • Browser: Firefox 131.0.3

Additional context
It's possible that the error parsing https://www.watcheddomain.uk could also be contributing here, I notice now that I accidentally added it with the protocol instead of just the FQDN, but I'm now unable to edit or delete this entry from the GUI even on a fresh start of main.exe, so this is likely another separate bug that needs reporting.

I also notice that none of the files in assets/data have any config data inside of them, and deleting them doesn't seem to recreate them automatically as would be expected, so I'm not sure where it's being stored. On a server somewhere, or just in one of the files in the parent directory?

@nwesterhausen nwesterhausen added the bug Something isn't working label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants