petio-team/petio-docs

ECONNRESET and mail fails for Petio but works in Ombi and Overseerrs

TRaSH- opened this issue · 2 comments

I'm using a non gmail emails service.
when doing a test i get a error

today at 21:00  2021-03-25 21:00:35 info: MAILER: Creating email config
today at 21:00  2021-03-25 21:00:35 info: MAILER: Config created
today at 21:00  (node:226) UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON
today at 21:00      --> starting at object with constructor 'Object'
today at 21:00      --- property 'issuerCertificate' closes the circle
today at 21:00      at JSON.stringify (<anonymous>)
today at 21:00      at stringify (/app/api/node_modules/express/lib/response.js:1123:12)
today at 21:00      at ServerResponse.json (/app/api/node_modules/express/lib/response.js:260:14)
today at 21:00      at /app/api/routes/mail.js:69:7
today at 21:00      at runMicrotasks (<anonymous>)
today at 21:00      at processTicksAndRejections (internal/process/task_queues.js:93:5)
today at 21:00  (node:226) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 16)
today at 21:00  2021-03-25 21:00:38 info: MAILER: Sending email from: mail@mydomain.nl to some-email@gmail.com with the subject Petio Test Email
today at 21:00  2021-03-25 21:00:43 error: undefined
today at 21:00  2021-03-25 21:00:43 warn: MAILER: Message failed to send

and also getting the following

error: [HPM] Error occurred while trying to proxy request /mail/test from petio.mydomain.xyz to http://localhost:7778 (ECONNRESET) (https://nodejs.org/api/errors.html#errors_common_system_errors)

The same email settings work in Ombi and Overseerrs

For Overseerrs we needed to do the following

you will want to allow communication directly to the services to bypass the SSL issue you would have. Or you can add NODE_TLS_REJECT_UNAUTHORIZED=0 to your ENVs when deploying the docker container
That will allow everything with an SSL error to just "work"

Where is your mail service hosted? Is it a VPS? A regional one?

What does your configuration look like?

Also you opened this issue on the petio-docs repo lol. Open it in the correct repo Trash!!!