nhost / hasura-backend-plus

🔑Auth and 📦Storage for Hasura. The quickest way to get Auth and Storage working for your next app based on Hasura.
https://nhost.github.io/hasura-backend-plus/
MIT License
1.17k stars 187 forks source link

SSL Wrong Version Number Error #653

Open joshmedeski opened 3 years ago

joshmedeski commented 3 years ago

Describe the bug When user's registers, I get the following error:

To Reproduce Steps to reproduce the behavior:

  1. Set AUTO_ACTIVATE_NEW_USERS="false"
  2. Enable emails with SMTP
  3. Send a POST /auth/register

Expected behavior Register a user successfully

Desktop (please complete the following information):

Additional context

[Error: 140369955355976:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
] {
  library: 'SSL routines',
  function: 'ssl3_get_record',
  reason: 'wrong version number',
  code: 'ESOCKET',
  command: 'CONN'
}
elitan commented 3 years ago

I've seen this bug with some SMTP vendors.

Could be related to this: https://github.com/nodemailer/nodemailer/issues/165#issuecomment-20733858

elitan commented 3 years ago

@joshmedeski Can you also try to set SMTP_SECURE: false?

joshmedeski commented 3 years ago

That fixed it. I may change the port numbers and turn SMTP_SECURE back to true.

MaxSchilling commented 3 years ago

@elitan that was also the error message that we received. Not finished with testing / fixing, works for some mails, but some users receive the mail now in their spam folder. Will try to provide clearer picture.