Can't create a new account through Growstuff.org
Hi all! I tried to create a new account on Growstuff.org, but when I put my new username/password in there I got sent straight to an error screen.
Someone else has reported this, and added: "I then tried to get a confirmation email from https://www.growstuff.org/members/confirmation/new, but it also crashed when I tried."
After having a poke around, this looks like it could be an issue with sending emails. It would be worth checking Sendgrid to see if any emails have reached them. The Member record is being created as trying to signup again causes an email validation warning.
Is there any logging available in production which would allow this issue to be investigated further?
I see:
2022-03-27T11:09:42.840112+00:00 app[web.1]: [d9ba679b-a928-4954-bc4e-0bbe568dd4ba] Net::SMTPAuthenticationError (535 Authentication failed: account disabled
2022-03-27T11:09:42.840113+00:00 app[web.1]: ):
2022-03-27T11:09:42.840114+00:00 app[web.1]: [d9ba679b-a928-4954-bc4e-0bbe568dd4ba]
2022-03-27T11:09:42.840114+00:00 app[web.1]: [d9ba679b-a928-4954-bc4e-0bbe568dd4ba] vendor/ruby-2.7.2/lib/ruby/2.7.0/net/smtp.rb:975:in `check_auth_response'
2022-03-27T11:09:42.840116+00:00 app[web.1]: [d9ba679b-a928-4954-bc4e-0bbe568dd4ba] vendor/ruby-2.7.2/lib/ruby/2.7.0/net/smtp.rb:736:in `auth_plain'
2022-03-27T11:09:42.840116+00:00 app[web.1]: [d9ba679b-a928-4954-bc4e-0bbe568dd4ba] vendor/ruby-2.7.2/lib/ruby/2.7.0/net/smtp.rb:728:in `authenticate'
2022-03-27T11:09:42.840117+00:00 app[web.1]: [d9ba679b-a928-4954-bc4e-0bbe568dd4ba] vendor/ruby-2.7.2/lib/ruby/2.7.0/net/smtp.rb:565:in `do_start'
2022-03-27T11:09:42.840117+00:00 app[web.1]: [d9ba679b-a928-4954-bc4e-0bbe568dd4ba] vendor/ruby-2.7.2/lib/ruby/2.7.0/net/smtp.rb:518:in `start'
2022-03-27T11:09:42.840118+00:00 app[web.1]: [d9ba679b-a928-4954-bc4e-0bbe568dd4ba] mail (2.7.1) lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
2022-03-27T11:09:42.840119+00:00 app[web.1]: [d9ba679b-a928-4954-bc4e-0bbe568dd4ba] mail (2.7.1) lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
2022-03-27T11:09:42.840120+00:00 app[web.1]: [d9ba679b-a928-4954-bc4e-0bbe568dd4ba] mail (2.7.1) lib/mail/message.rb:2159:in `do_delivery'
2022-03-27T11:09:42.840121+00:00 app[web.1]: [d9ba679b-a928-4954-bc4e-0bbe568dd4ba] mail (2.7.1) lib/mail/message.rb:260:in `block in deliver'
when I tail production logs and trigger an email.
@cesy or @Br3nda ; I don't know the details of the sendgrid account, if its just free tier or something else.
The send grid is an attached resource on heroku. Do u have access to that?
Hi. We haven’t seen you in a while. For your protection, we have closed this account. If you would like to use Twilio Sendgrid, please set up a new account here.
Welp:
Please share how you'd like to use SendGrid. Since your profile was flagged as high risk by our system, we ask that you provide as much information as possible and our support team will respond to you at the email address provided below.
Kinda want to go with alternatives when given this run around...
Looks like we originally had the Growstuff Pty Ltd PO box as our company address which covered us for the spam rules, whereas that org no longer exists so we no longer have a registered address, which is probably what makes us high risk. I think any mail provider will have the same issue, though.
I've set up a new SendGrid account using info@ and put in the SMTP details, though at some point we may want to upgrade to the API or choose another provider. I've updated the config details to that new account. Details are in our shared LastPass folder.
It won't yet work until we restart/deploy and we're having other deploy issues right now.
Should be deployed now; please test :)
Unfortunately still failing, error on trying to sign up as a new user - we should probably look into the logs on prod again for a 500.
I've set up a new SendGrid account using info@ and put in the SMTP details, though at some point we may want to upgrade to the API or choose another provider. I've updated the config details to that new account. Details are in our shared LastPass folder.
I think it might still be the old one.
Config vars SENDGRID_USERNAME and SENDGRID_PASSWORD in Heroku are both the new ones - is there anywhere else we need to update? We've deployed since then so it should be using the new values.
https://dashboard.heroku.com/apps/growstuff-prod/resources -> navigating just through this UI, I get a "haven't see you/account closed" thing. Unclear if its a matter of closing + reopening the attached plan on the app via heroku.
I tried closing and readding the add-on in Heroku, had to remove the config vars to do it, and it still gave the same error about account closed afterwards. Looks like we need to create a new account with username [email protected], or ask SendGrid how we're meant to solve it with Heroku integration, since it appears to work by SSO rather than standard login.
Submitted support request to SendGrid, let's see what they say.
Giving up on SendGrid given their useless responses on the support request, trying MailGun instead. New error:
2023-03-13T07:36:36.637645+00:00 app[web.1]: [d201904e-f0d3-48db-a51d-f6923bc1fe37]
2023-03-13T07:36:36.637672+00:00 app[web.1]: [d201904e-f0d3-48db-a51d-f6923bc1fe37] Net::SMTPUnknownError (could not get 3xx (421: 421 Domain sandbox740dd809eb05442f8a2f3003dc487020.mailgun.org is not allowed to send: Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in Account Settings.
2023-03-13T07:36:36.637673+00:00 app[web.1]: )):
2023-03-13T07:36:36.637674+00:00 app[web.1]: [d201904e-f0d3-48db-a51d-f6923bc1fe37]
2023-03-13T07:36:36.637675+00:00 app[web.1]: [d201904e-f0d3-48db-a51d-f6923bc1fe37] net-smtp (0.3.3) lib/net/smtp.rb:1082:in `check_continue'
2023-03-13T07:36:36.637675+00:00 app[web.1]: [d201904e-f0d3-48db-a51d-f6923bc1fe37] net-smtp (0.3.3) lib/net/smtp.rb:1006:in `block in data'
And it appears that Mailgun charges $19 a month for custom domains, which is what we need for production to send to any email address, whereas SendGrid would have done it for free.
Looks like https://devcenter.heroku.com/articles/mailtrap may be a good option for staging, but would require us having a separate config/environments/staging.rb where we currently use production one on staging.
For prod, https://devcenter.heroku.com/articles/trustifi is free but slightly more complicated to set up, as it doesn't integrate with ActionMailer and you have to use their API instead. https://devcenter.heroku.com/articles/mailertogo#using-with-ruby is $9 a month but easier to set up as we can just put in credentials the same way we currently do.
Next thing to try: Mailgun free for staging, Mailertogo $9 for prod, minimum effort and cost combination.
Perhaps we do any of these https://moosend.com/blog/free-smtp-server/#smtp2go ?
Hi, what is going on with the signup, login process? Any news?
@Konstrukteur no further news beyond what you can see above, I'm afraid. If you would be up for adding some error handling so that if emails aren't working, it captures the exception and continues with the rest of the process, that would be a huge help. One of us will try to have another go as soon as day jobs allow.
Having merged mailgun for staging, it now gives error 400 instead of 500 when trying to request a new crop on my first attempt, and succeeds on my second attempt. However, a bit more testing has reminded me that if a crop wrangler tries to create a new crop, it will let them add it rather than triggering an approval email, so that's not the whole answer.
On prod, I've gone to mailgun on heroku, gone to Sending > Overview > Authorised recipients and added ourselves. I have successfully created and validated a secondary account for myself using an authorised email, and got the confirmation email. So we could get that fully working by paying $19 a month now, or try smtp2go or mailertogo. And in the meantime, if anyone wants to create an account, I can add them manually on mailgun and get a working email.
We'll continue to use mailgun for staging where we only need our whitelisted email addresses to receive, as that's working. For prod, I've backed up the mailgun config vars since at least we have that working for whitelisted emails, configured our DNS to support SMTP2GO as well, and will configure that on heroku once the DNS has refreshed in an hour.
For my reference it's https://app-eu.smtp2go.com/sending/verified_senders/#edit/growstuff.org to check if the DNS has worked, then https://www.smtp2go.com/setup/ to go into the config vars on https://dashboard.heroku.com/apps/growstuff-prod/settings that happen to be named mailgun but actually are generic SMTP ones.
It appears the DNS problem was I was mixing up which bits we have with which host (domain name vs DNS). Having actually updated our DNS with the right provider helps. I've now verified and updated the config.
I've tested and I do believe this is now working - can anyone else confirm?