dispatch: MJML error with v20210212

Describe the bug When attempting to send emails using the email plugin I get the following in my error log. As with #976 I was not defining the mjml path inside my environmental vars. The incident does create successfully, but it does not send out emails. This build is using v20210212 as base. How would you recommend resolving? I have not worked with mjml before.

2021-02-23 13:55:02.637 EST- /usr/local/lib/python3.8/site-packages/dispatch/static/dispatch/node_modules/.bin/mjml

2021-02-23 13:55:02.637 EST at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)

2021-02-23 13:55:02.637 EST at Function.Module._load (internal/modules/cjs/loader.js:862:27)

2021-02-23 13:55:02.637 EST at Module.require (internal/modules/cjs/loader.js:1042:19)

2021-02-23 13:55:02.637 EST at require (internal/modules/cjs/helpers.js:77:18)

2021-02-23 13:55:02.637 EST at Object.<anonymous> (/usr/local/lib/python3.8/site-packages/dispatch/static/dispatch/node_modules/.bin/mjml:3:1)

2021-02-23 13:55:02.638 ESTTraceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/dispatch/decorators.py", line 37, in wrapper result = func(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/dispatch/incident/flows.py", line 687, in incident_create_flow send_incident_created_notifications(incident, db_session) File "/usr/local/lib/python3.8/site-packages/dispatch/incident/messaging.py", line 266, in send_incident_created_notifications notification_service.filter_and_send( File "/usr/local/lib/python3.8/site-packages/dispatch/notification/service.py", line 116, in filter_and_send send( File "/usr/local/lib/python3.8/site-packages/dispatch/notification/service.py", line 92, in send plugin.instance.send( File "/usr/local/lib/python3.8/site-packages/dispatch/decorators.py", line 58, in wrapper result = func(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/dispatch/decorators.py", line 74, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/dispatch/plugins/dispatch_google/gmail/plugin.py", line 94, in send message_body = create_message_body(notification_template, notification_type, **kwargs) File "/usr/local/lib/python3.8/site-packages/dispatch/messaging/email/utils.py", line 87, in create_message_body return render_html(template.render(**kwargs)) File "/usr/local/lib/python3.8/site-packages/dispatch/messaging/email/utils.py", line 103, in render_html raise Exception("MJML template processing failed.") Exception: MJML template processing failed.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 34 (34 by maintainers)

Most upvoted comments

Can you try to find the error we should be logging here?

Also, can you check if the Dispatch process has permissions to create temp files?

Can you try adding log.info(**kwargs) before the line I mentioned and then get the contents from the server logs?