Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hitchhiker cannot send E-Mails #216

Closed
robin-rpr opened this issue Jul 5, 2018 · 1 comment
Closed

Hitchhiker cannot send E-Mails #216

robin-rpr opened this issue Jul 5, 2018 · 1 comment
Labels
Bug Issues we’re aware of, regardless of where users have reported them (Forums, Twitter, etc.) Hotlist-ConOps Private Hotlist Hotlist-DevOps Private Hotlist P1 Priority 1 (Required for the targeted milestone. Reserved for high user impact / quality) Verified The submitted fix has been verified as working by testing or by the original reporter.
Milestone

Comments

@robin-rpr
Copy link
Collaborator

robin-rpr commented Jul 5, 2018

Docker Image: brookshi/hitchhiker:v0.13 (aka. vibrant_hugle)
Docker Image: mysql:5.7 (aka. hitchhiker-mysql)
OS: Cent OS 7 (64 Bit)

What steps will reproduce the problem?
(1) Go to "Projekt" > Select a project > Invite Members
(2) Type in an email address and click OK
(3) Get this Error message.

Note: The same problem applies to the "API Request FAIL" E-mail notifications.

What is the expected result?

Hitchhiker sends an E-mail invitation.

What happens instead?

Get this Error message and the following console log:

[2018-07-05 00:33:06] PM2 log: Launching in no daemon mode
[2018-07-05 00:33:06] PM2 log: Starting execution sequence in -fork mode- for app name:index id:0
[2018-07-05 00:33:06] PM2 log: App name:index id:0 online
[2018-07-05 00:33:16] PM2 log: Stopping app:index id:0
[2018-07-05 00:33:17] PM2 log: App [index] with id [0] and pid [16], exited with code [0] via signal [SIGINT]
[2018-07-05 00:33:17] PM2 log: pid=16 msg=process killed
[2018-07-05 00:33:17] PM2 log: PM2 successfully stopped
[2018-07-05 00:33:18] PM2 log: Launching in no daemon mode
[2018-07-05 00:33:18] PM2 log: Starting execution sequence in -fork mode- for app name:index id:0
[2018-07-05 00:33:18] PM2 log: App name:index id:0 online
�[31m[2018-07-05 00:34:19.559] [ERROR] console - �[39mTypeError: Cannot read property 'err' of undefined
    at results.every.rst (/usr/src/Hitchhiker/api/controllers/project_controller.ts:149:54)
    at Array.every (native)
    at ProjectController.<anonymous> (/usr/src/Hitchhiker/api/controllers/project_controller.ts:149:37)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/src/Hitchhiker/build/controllers/project_controller.js:16:58)
    at process._tickDomainCallback (internal/process/next_tick.js:135:7)
�[31m[2018-07-05 00:34:19.592] [ERROR] console - �[39m
�[31m[2018-07-05 00:34:19.592] [ERROR] console - �[39m  TypeError: Cannot read property 'err' of undefined
      at results.every.rst (/usr/src/Hitchhiker/api/controllers/project_controller.ts:149:54)
      at Array.every (native)
      at ProjectController.<anonymous> (/usr/src/Hitchhiker/api/controllers/project_controller.ts:149:37)
      at Generator.next (<anonymous>)
      at fulfilled (/usr/src/Hitchhiker/build/controllers/project_controller.js:16:58)
      at process._tickDomainCallback (internal/process/next_tick.js:135:7)
�[31m[2018-07-05 00:34:19.592] [ERROR] console - �[39m
�[31m[2018-07-05 00:34:22.664] [ERROR] console - �[39mTypeError: Cannot read property 'err' of undefined
    at results.every.rst (/usr/src/Hitchhiker/api/controllers/project_controller.ts:149:54)
    at Array.every (native)
    at ProjectController.<anonymous> (/usr/src/Hitchhiker/api/controllers/project_controller.ts:149:37)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/src/Hitchhiker/build/controllers/project_controller.js:16:58)
    at process._tickDomainCallback (internal/process/next_tick.js:135:7)

...

What are my Settings?
Manual mapping:

  • 11010 to external 11010
  • 8080 to external 8080

Environment variables:

Note: Replaced Domains with example.com

  • HITCHHIKER_DB_HOST = hitchhiker-mysql
  • HITCHHIKER_APP_HOST = http://example.com:8080/
  • PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • NPM_CONFIG_LOGLEVEL = info
  • NODE_VERSION = 7.10.1
  • YARN_VERSION = 0.24.4
  • HITCHHIKER_MAIL_CUSTOM = smtp
  • HITCHHIKER_MAIL_SMTP_HOST = mail.example.com
  • HITCHHIKER_MAIL_SMTP_PORT = 465
  • HITCHHIKER_MAIL_SMTP_USER = example@example.com
  • HITCHHIKER_SCHEDULE_MAILFORFAIL = 1
  • HITCHHIKER_SAFE_VM = 1
  • HITCHHIKER_APP_INVITE_DIRECTLY = 0
@brookshi
Copy link
Owner

brookshi commented Jul 5, 2018

I can reproduce this issue, thanks for reporting.
I will fix it in next version (v0.14).
A workaround for it:

  1. run sudo docker exec -it hitchhiker bash to enter container.
  2. open file build/controllers/project_controller.js
  3. replace line 144 and 145 from
const success = results.every(rst => !rst.err);
result = { success: success, message: results.map(rst => rst.err).join(';') };

to

const success = results.every(rst => !rst || !rst.err);
result = { success: success, message: results.map(rst => rst ? rst.err : '').join(';') };

@brookshi brookshi added the Bug Issues we’re aware of, regardless of where users have reported them (Forums, Twitter, etc.) label Jul 5, 2018
@brookshi brookshi added this to the 0.14 milestone Jul 5, 2018
@robin-rpr robin-rpr added Available Confirmed and triaged, but not assigned. Hotlist-ConOps Private Hotlist Hotlist-DevOps Private Hotlist P1 Priority 1 (Required for the targeted milestone. Reserved for high user impact / quality) labels Jul 8, 2018
@brookshi brookshi added Fixed The team has submitted code they believe will fix the issue. and removed Available Confirmed and triaged, but not assigned. labels Jul 22, 2018
brookshi added a commit that referenced this issue Jul 22, 2018
@robin-rpr robin-rpr added Verified The submitted fix has been verified as working by testing or by the original reporter. and removed Fixed The team has submitted code they believe will fix the issue. labels Jul 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues we’re aware of, regardless of where users have reported them (Forums, Twitter, etc.) Hotlist-ConOps Private Hotlist Hotlist-DevOps Private Hotlist P1 Priority 1 (Required for the targeted milestone. Reserved for high user impact / quality) Verified The submitted fix has been verified as working by testing or by the original reporter.
Projects
None yet
Development

No branches or pull requests

2 participants