"Internal Server Error" when new user registers - somehow related to mail
Your Rocket.Chat version: 0.21.0
Just deployed to entrepreneursanonymous.net
When a new user registers, it throws an "Internal Server Error" message. The email does get registered and stored, but the user doesn't advance to the next page. If they go back to the login screen, they are actually able to login. Though most people probably wouldn't try logging in after getting rejected at registration.
I checked the logs and found an error related to mail:
I20160323-05:57:36.894(0) Exception while invoking method 'registerUser' SenderError: Mail from command failed - 501 Syntax error at Object.Future.wait (/bundle/bundle/programs/server/node_modules/fibers/future.js:398:15) at smtpSend (packages/email/email.js:86:1) at Object.Email.send (packages/email/email.js:185:1) at AccountsServer.Accounts.sendVerificationEmail (password_server.js:781:9) at [object Object].Meteor.methods.registerUser (server/methods/registerUser.coffee:18:13) at [object Object].methodsMap.(anonymous function) (server/lib/debug.js:23:26) at maybeAuditArgumentChecks (livedata_server.js:1698:12) at livedata_server.js:708:19 at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1) at livedata_server.js:706:40 - - - - - at SMTPClient._actionMAIL (/bundle/bundle/programs/server/npm/email/node_modules/simplesmtp/lib/client.js:879:23) at SMTPClient._onData (/bundle/bundle/programs/server/npm/email/node_modules/simplesmtp/lib/client.js:329:29) at CleartextStream.emit (events.js:95:17) at CleartextStream.<anonymous> (_stream_readable.js:765:14) at CleartextStream.emit (events.js:92:17) at emitReadable_ (_stream_readable.js:427:10) at _stream_readable.js:420:7 at process._tickDomainCallback (node.js:502:13)
I am able to send test emails under the SMTP page of Admin. And I'm also able to send test emails using the Mailer page of Admin. I'm using mailgun. And have setup the mailer in MUPX using:
"MAIL_URL": "smtp://my smtp settings for mailgun"
@rodrigok should we wrap the send email on a TRY to avoid server restart?
Is this something others are encountering? Or is it just me?
I think we've noticed a few others having this issue. As mentioned a fix for it is being considered. Hang tight :smile:
Cool! This seems like a sweet app. Hoping it will be a cool tool for a peer support group for entrepreneurs. Also looking to use it with a bunch of home schooling students too.
:+1: sounds like two awesome use cases! Thanks for sharing your use case. Always love to see what people are doing with it. If you ever want to tell us more feel free to hit us up on our demo server. :smile:
Back on subject: Seems like anything involving an external action like this, might be good to wrap in try catch to prevent it from blowing up.
@flantascience This is happening on my server as well when users sign up. It seems to freeze and the server restarts. They can log in but do not get an email. The email SMTP is set up correctly from what I can tell.
Wonder if this will be better w/ Meteor 1.3 Not sure if it's related issue at all
@flantascience and @mimiflynn, have you guys changed the SMTP email templates under Admin > SMPT > Invitation? If yes, can you paste your HTMLs here please?
Here's what I've got:
Subject: You have been invited to EntrepreneursAnonymous.net
Invitation HTML: <h2>You have been invited to <h1>EntrepreneursAnonymous.net</h1></h2>
Enrollment Email: BLANK
@flantascience seems that your problem is the Enrollment Email empty, can you try with some HTML?
@rodrigok should we test for this?
@engelgabriel First of all, this is a fantastic webapp! Thanks devs!
I have the same issue. I get the "Internal server error" while trying to register new users and also cannot send verification emails. I get "Error sending confirmation email" while trying to "Resend confirmation email". I have tried all possible solutions. Our site is deployed on "Ubuntu 14.04 without docker" and integrated with CAS.
secretURL: 'JmGWZe5qz7RTYauXP' } }
Exception while invoking method 'registerUser' SenderError: Mail from command failed - 555 5.5.2 Syntax error. q189sm8726313oia.7 - gsmtp
at Object.Future.wait (/var/www/Rocket.Chat/programs/server/node_modules/fibers/future.js:398:15)
at smtpSend (packages/email/email.js:86:1)
at Object.Email.send (packages/email/email.js:185:1)
at AccountsServer.Accounts.sendVerificationEmail (password_server.js:781:9)
at [object Object].Meteor.methods.registerUser (server/methods/registerUser.coffee:20:13)
at [object Object].methodsMap.(anonymous function) (server/lib/debug.js:23:26)
at maybeAuditArgumentChecks (livedata_server.js:1698:12)
at livedata_server.js:708:19
at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
at livedata_server.js:706:40
- - - - -
at SMTPClient._actionMAIL (/var/www/Rocket.Chat/programs/server/npm/email/node_modules/simplesmtp/lib/client.js:879:23)
at SMTPClient._onData (/var/www/Rocket.Chat/programs/server/npm/email/node_modules/simplesmtp/lib/client.js:329:29)
at CleartextStream.emit (events.js:95:17)
at CleartextStream. (_stream_readable.js:765:14)
at CleartextStream.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:427:10)
at _stream_readable.js:420:7
at process._tickDomainCallback (node.js:492:13)


Have you done this? https://support.google.com/accounts/answer/6010255?hl=en
Se allo: GMail starts to block less secure apps: how to enable access again http://www.ghacks.net/2014/07/21/gmail-starts-block-less-secure-apps-enable-access/
@rodrigok rodrigok Would this just be adding [email] to designate it goes to someone's email address.... or would I be adding an actual message. It seems like "Enrollment" means a Welcome Message of sorts. But it's located in this 'Invitation' section.
I tried both using [email] and an actual message 'Congraulations' and still got an internal server error.
@engelgabriel I actually allowed "less secure" access to the gmail account and following the conversation in the ticket, I have some message in the enrollment section. I still get the "Internal server error"
What is the relevance of the Gmail in this case? I believe I'm using mailgun...
On Mon, Apr 11, 2016 at 4:49 PM, genesplicer [email protected] wrote:
@engelgabriel https://github.com/engelgabriel I actually allowed "less secure" access to the gmail account and following the conversation in the ticket, I have some message in the enrollment section. I still get the "Internal server error"
[image: capture] https://cloud.githubusercontent.com/assets/18407318/14445841/f9153de8-0015-11e6-8f85-cc37b2df3c6d.PNG
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/RocketChat/Rocket.Chat/issues/2613#issuecomment-208624564
@flantascience Could you share how you fix this issue? I have the same issue as yours.
I never was able to resolve it. I ended up switching to Heroku one-click deploy and things seem to be working there.