Nodemailer behaviour
Description
See the attached stacktrace, when inviting a new member it seems that it did succeed but also generated an error after that. Not sure what actually lead to this? Looks like it's mailing twice? @gautamprikshit1 I sent you the invite so can you verify if you got the email and perhaps even work on the issue?
Steps to reproduce
- https://appsemble.app/en/organizations/appsemble/members
- Invite member
- See error
Expected behaviour
No error, just one sent mail.
Actual behaviour
Unsure whether the mail has been sent or not. At least the admin gets te see an error.
Stack trace
kubectl logs appsemble-cd9d54f9d-c7gt5
2024-03-08 09:18:14 [info]: GET https://appsemble.app/robots.txt — 40.113.222.29
2024-03-08 09:18:14 [warn]: GET https://appsemble.app/robots.txt 404 Not Found 5ms
2024-03-08 09:18:14 [info]: POST https://appsemble.app/api/organizations/appsemble/invites/resend — 185.184.111.56
2024-03-08 09:18:14 [silly]: Executing (default): SELECT "Organization"."id", "Organization"."name", "Organization"."description", "Organization"."website", "Organization"."email", "Organization"."icon", "Organization"."created", "Organization"."updated", "Organization"."deleted", "OrganizationInvites"."email" AS "OrganizationInvites.email", "OrganizationInvites"."key" AS "OrganizationInvites.key", "OrganizationInvites"."role" AS "OrganizationInvites.role", "OrganizationInvites"."UserId" AS "OrganizationInvites.UserId", "OrganizationInvites"."OrganizationId" AS "OrganizationInvites.OrganizationId", "OrganizationInvites"."created" AS "OrganizationInvites.created", "OrganizationInvites"."updated" AS "OrganizationInvites.updated" FROM "Organization" AS "Organization" LEFT OUTER JOIN "OrganizationInvite" AS "OrganizationInvites" ON "Organization"."id" = "OrganizationInvites"."OrganizationId" WHERE ("Organization"."deleted" IS NULL AND "Organization"."id" = 'appsemble');
2024-03-08 09:18:14 [silly]: Executing (default): SELECT "role" FROM "OrganizationMember" AS "OrganizationMember" WHERE "OrganizationMember"."OrganizationId" = 'appsemble' AND "OrganizationMember"."UserId" = 'ec2e20a2-95a2-49ee-aad4-42859e00863a';
2024-03-08 09:18:14 [silly]: Executing (default): SELECT "id", "name", "primaryEmail", "password", "locale", "timezone", "subscribed", "demoLoginUser", "created", "updated", "deleted" FROM "User" AS "User" WHERE ("User"."deleted" IS NULL AND "User"."id" = '64558296-9a88-4bd6-9fa8-28268910ea8c');
2024-03-08 09:18:14 [info]: Sending email:
2024-03-08 09:18:14 [info]: To: Prikshit Gautam <prikshit@appsemble.com>
2024-03-08 09:18:14 [info]: From: Appsemble <noreply@appsemble.app>
2024-03-08 09:18:14 [info]: Subject: Invited to organization
2024-03-08 09:18:14 [info]:
2024-03-08 09:18:14 [info]: Hello Prikshit Gautam,
2024-03-08 09:18:14 [info]:
2024-03-08 09:18:14 [info]: You have been invited to join the organization **appsemble**.
2024-03-08 09:18:14 [info]:
2024-03-08 09:18:14 [info]: Joining an organization allows you to view private applications as well as create and edit apps
2024-03-08 09:18:14 [info]: belonging to an organization.
2024-03-08 09:18:14 [info]:
2024-03-08 09:18:14 [info]: You can accept or decline this invitation by following [this link](https://appsemble.app/organization-invite?token=f1dd79bc2cd4a49fa9e9caec05f7e6bbdea2cdd7).
2024-03-08 09:18:14 [info]:
2024-03-08 09:18:14 [info]: Kind regards,
2024-03-08 09:18:14 [info]:
2024-03-08 09:18:14 [info]: _The Appsemble Team_
2024-03-08 09:18:14 [info]:
2024-03-08 09:18:14 [verbose]: Email sent successfully.
{"level":30,"time":1709889495009,"pid":1,"hostname":"appsemble-cd9d54f9d-c7gt5","component":"imap-connection","cid":"hpv6zqu1sfiy8skaiw03","src":"connection","msg":"Established secure TCP connection","cid":"hpv6zqu1sfiy8skaiw03","secure":true,"host":"imap.appsemble.app","servername":"imap.appsemble.app","port":993,"address":"85.10.132.157","localAddress":"10.244.0.195","localPort":40566,"authorized":true,"algo":"TLS_AES_256_GCM_SHA384","version":"TLSv1.3"}
2024-03-08 09:18:16 [info]: GET http://10.244.0.195:9999/api/health — ::ffff:10.244.0.183
2024-03-08 09:18:16 [silly]: Executing (default): SELECT 1+1 AS result
2024-03-08 09:18:16 [info]: GET http://10.244.0.195:9999/api/health — ::ffff:10.244.0.183
2024-03-08 09:18:16 [silly]: Executing (default): SELECT 1+1 AS result
2024-03-08 09:18:16 [info]: GET http://10.244.0.195:9999/api/health 200 OK 6ms
2024-03-08 09:18:16 [info]: GET http://10.244.0.195:9999/api/health 200 OK 5ms
2024-03-08 09:18:26 [info]: GET http://10.244.0.195:9999/api/health — ::ffff:10.244.0.183
2024-03-08 09:18:26 [silly]: Executing (default): SELECT 1+1 AS result
2024-03-08 09:18:26 [info]: GET http://10.244.0.195:9999/api/health — ::ffff:10.244.0.183
2024-03-08 09:18:26 [silly]: Executing (default): SELECT 1+1 AS result
2024-03-08 09:18:26 [info]: GET http://10.244.0.195:9999/api/health 200 OK 6ms
2024-03-08 09:18:26 [info]: GET http://10.244.0.195:9999/api/health 200 OK 4ms
2024-03-08 09:18:28 [info]: GET https://134.209.134.173:443/ — 199.45.155.48
2024-03-08 09:18:28 [info]: GET https://134.209.134.173:443/ 200 OK 12ms
{"level":50,"time":1709889511009,"pid":1,"hostname":"appsemble-cd9d54f9d-c7gt5","component":"imap-connection","cid":"hpv6zqu1sfiy8skaiw03","err":{"type":"Error","message":"Failed to receive greeting from server in required time","stack":"Error: Failed to receive greeting from server in required time\n at Timeout._onTimeout (/app/node_modules/imapflow/lib/imap-flow.js:1332:31)\n at listOnTimeout (node:internal/timers:569:17)\n at process.processTimers (node:internal/timers:512:7)","code":"GREEETING_TIMEOUT","details":{"greetingTimeout":16000}},"cid":"hpv6zqu1sfiy8skaiw03","msg":"Failed to receive greeting from server in required time"}
2024-03-08 09:18:31 [warn]: POST https://appsemble.app/api/organizations/appsemble/invites/resend 400 Bad Request 16545ms
2024-03-08 09:18:31 [info]: GET https://isarenmo.appsemble.app/ — 199.45.155.48
2024-03-08 09:18:31 [silly]: Executing (default): SELECT "id", "domain" FROM "AppCollection" AS "AppCollection" WHERE "AppCollection"."domain" = 'isarenmo.appsemble.app' ORDER BY "AppCollection"."updated" DESC LIMIT 1;
2024-03-08 09:18:31 [info]: GET https://isarenmo.appsemble.app/ 302 Found → https://appsemble.app/organizations/isarenmo 8ms
2024-03-08 09:18:36 [info]: GET https://appsemble.app/organizations/isarenmo — 199.45.155.48
2024-03-08 09:18:36 [info]: GET https://appsemble.app/organizations/isarenmo 200 OK 7ms
2024-03-08 09:18:36 [info]: GET http://10.244.0.195:9999/api/health — ::ffff:10.244.0.183
2024-03-08 09:18:36 [silly]: Executing (default): SELECT 1+1 AS result
2024-03-08 09:18:36 [info]: GET http://10.244.0.195:9999/api/health 200 OK 5ms
2024-03-08 09:18:36 [info]: GET http://10.244.0.195:9999/api/health — ::ffff:10.244.0.183
2024-03-08 09:18:36 [silly]: Executing (default): SELECT 1+1 AS result
2024-03-08 09:18:36 [info]: GET http://10.244.0.195:9999/api/health 200 OK 4ms
2024-03-08 09:18:37 [info]: POST https://appsemble.app/api/organizations/appsemble/invites/resend — 185.184.111.56
2024-03-08 09:18:37 [silly]: Executing (default): SELECT "Organization"."id", "Organization"."name", "Organization"."description", "Organization"."website", "Organization"."email", "Organization"."icon", "Organization"."created", "Organization"."updated", "Organization"."deleted", "OrganizationInvites"."email" AS "OrganizationInvites.email", "OrganizationInvites"."key" AS "OrganizationInvites.key", "OrganizationInvites"."role" AS "OrganizationInvites.role", "OrganizationInvites"."UserId" AS "OrganizationInvites.UserId", "OrganizationInvites"."OrganizationId" AS "OrganizationInvites.OrganizationId", "OrganizationInvites"."created" AS "OrganizationInvites.created", "OrganizationInvites"."updated" AS "OrganizationInvites.updated" FROM "Organization" AS "Organization" LEFT OUTER JOIN "OrganizationInvite" AS "OrganizationInvites" ON "Organization"."id" = "OrganizationInvites"."OrganizationId" WHERE ("Organization"."deleted" IS NULL AND "Organization"."id" = 'appsemble');
2024-03-08 09:18:37 [silly]: Executing (default): SELECT "role" FROM "OrganizationMember" AS "OrganizationMember" WHERE "OrganizationMember"."OrganizationId" = 'appsemble' AND "OrganizationMember"."UserId" = 'ec2e20a2-95a2-49ee-aad4-42859e00863a';
2024-03-08 09:18:37 [silly]: Executing (default): SELECT "id", "name", "primaryEmail", "password", "locale", "timezone", "subscribed", "demoLoginUser", "created", "updated", "deleted" FROM "User" AS "User" WHERE ("User"."deleted" IS NULL AND "User"."id" = '64558296-9a88-4bd6-9fa8-28268910ea8c');
2024-03-08 09:18:37 [info]: Sending email:
2024-03-08 09:18:37 [info]: To: Prikshit Gautam <prikshit@appsemble.com>
2024-03-08 09:18:37 [info]: From: Appsemble <noreply@appsemble.app>
2024-03-08 09:18:37 [info]: Subject: Invited to organization
2024-03-08 09:18:37 [info]:
2024-03-08 09:18:37 [info]: Hello Prikshit Gautam,
2024-03-08 09:18:37 [info]:
2024-03-08 09:18:37 [info]: You have been invited to join the organization **appsemble**.
2024-03-08 09:18:37 [info]:
2024-03-08 09:18:37 [info]: Joining an organization allows you to view private applications as well as create and edit apps
2024-03-08 09:18:37 [info]: belonging to an organization.
2024-03-08 09:18:37 [info]:
2024-03-08 09:18:37 [info]: You can accept or decline this invitation by following [this link](https://appsemble.app/organization-invite?token=f1dd79bc2cd4a49fa9e9caec05f7e6bbdea2cdd7).
2024-03-08 09:18:37 [info]:
2024-03-08 09:18:37 [info]: Kind regards,
2024-03-08 09:18:37 [info]:
2024-03-08 09:18:37 [info]: _The Appsemble Team_
2024-03-08 09:18:37 [info]:
2024-03-08 09:18:37 [verbose]: Email sent successfully.
{"level":30,"time":1709889517554,"pid":1,"hostname":"appsemble-cd9d54f9d-c7gt5","component":"imap-connection","cid":"hpv6zqu1sfiy8skaiw03","src":"connection","msg":"Established secure TCP connection","cid":"hpv6zqu1sfiy8skaiw03","secure":true,"host":"imap.appsemble.app","servername":"imap.appsemble.app","port":993,"address":"85.10.132.157","localAddress":"10.244.0.195","localPort":48296,"authorized":true,"algo":"TLS_AES_256_GCM_SHA384","version":"TLSv1.3"}
2024-03-08 09:18:38 [info]: GET https://appsemble.app/favicon.ico — 199.45.155.48
2024-03-08 09:18:38 [info]: GET https://appsemble.app/favicon.ico 200 OK 10ms
2024-03-08 09:18:46 [info]: GET http://10.244.0.195:9999/api/health — ::ffff:10.244.0.183
2024-03-08 09:18:46 [silly]: Executing (default): SELECT 1+1 AS result
2024-03-08 09:18:46 [info]: GET http://10.244.0.195:9999/api/health — ::ffff:10.244.0.183
2024-03-08 09:18:46 [silly]: Executing (default): SELECT 1+1 AS result
2024-03-08 09:18:46 [info]: GET http://10.244.0.195:9999/api/health 200 OK 7ms
2024-03-08 09:18:46 [info]: GET http://10.244.0.195:9999/api/health 200 OK 6ms
{"level":50,"time":1709889533555,"pid":1,"hostname":"appsemble-cd9d54f9d-c7gt5","component":"imap-connection","cid":"hpv6zqu1sfiy8skaiw03","err":{"type":"Error","message":"Failed to receive greeting from server in required time","stack":"Error: Failed to receive greeting from server in required time\n at Timeout._onTimeout (/app/node_modules/imapflow/lib/imap-flow.js:1332:31)\n at listOnTimeout (node:internal/timers:569:17)\n at process.processTimers (node:internal/timers:512:7)","code":"GREEETING_TIMEOUT","details":{"greetingTimeout":16000}},"cid":"hpv6zqu1sfiy8skaiw03","msg":"Failed to receive greeting from server in required time"}
2024-03-08 09:18:53 [warn]: POST https://appsemble.app/api/organizations/appsemble/invites/resend 400 Bad Request 16378ms
2024-03-08 09:18:56 [info]: GET http://10.244.0.195:9999/api/health — ::ffff:10.244.0.183
2024-03-08 09:18:56 [silly]: Executing (default): SELECT 1+1 AS result
2024-03-08 09:18:56 [info]: GET http://10.244.0.195:9999/api/health — ::ffff:10.244.0.183
2024-03-08 09:18:56 [silly]: Executing (default): SELECT 1+1 AS result
2024-03-08 09:18:56 [info]: GET http://10.244.0.195:9999/api/health 200 OK 5ms
2024-03-08 09:18:56 [info]: GET http://10.244.0.195:9999/api/health 200 OK 3ms
kvdb@t16:~$