RocketChat / RocketChat/Rocket.Chat
Exeption: Cannot read property '_syncSendMail' when no mail server is defined
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
After upgrading to rocket chat 4.7.0 we are getting these errors in our application that is integrated using the rocket chat API so this is a regression.
This issue seems to be related to this:
https://github.com/meteor/meteor/issues/11709
Steps to reproduce:
- Make sure there is on mail server defined in the configuration.
- Update the email address of a user.
Expected behavior:
No attempt to send an email should be made and no error message should be displayed.
Actual behavior:
The following error is reported:
Exception in defer callback: TypeError: Cannot read property '_syncSendMail' of null
at smtpSend (packages/email/email.js:154:13)
at Object.Email.send (packages/email/email.js:233:5)
at app/mailer/server/api.ts:176:27
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)
at packages/meteor.js:555:25
at runWithEnvironment (packages/meteor.js:1320:24)
Server Setup Information:
- Version of Rocket.Chat Server: 4.7.0
- Operating System: Docker
- Deployment Method: rocketchat/rocket.chat:4.7.0
- Number of Running Instances: 1
- DB Replicaset Oplog: NA
- NodeJS Version: NA
- MongoDB Version: 5
Client Setup Information
- Desktop App or Browser Version: Browser Chrome 101
- Operating System: Linux
Relevant logs:
Exception in defer callback: TypeError: Cannot read property '_syncSendMail' of null
at smtpSend (packages/email/email.js:154:13)
at Object.Email.send (packages/email/email.js:233:5)
at app/mailer/server/api.ts:176:27
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)
at packages/meteor.js:555:25
at runWithEnvironment (packages/meteor.js:1320:24)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in app/mailer/server/api.ts at the Email.send call around line 176, then inspect packages/email/email.js where smtpSend fails. Reproduce with no mail server configured and a user email update; done means the update makes no email attempt and reports no error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100