Greenlock Express expects notify method to return promise #37

Open
opened 2020-12-14 09:45:50 +00:00 by Ghost · 0 comments
TypeError: Cannot read property 'then' of undefined
    at rpc (/srv/clearflask-connect/node_modules/@root/greenlock-express/master.js:137:17)
    at Worker.handleMessage (/srv/clearflask-connect/node_modules/@root/greenlock-express/master.js:156:13)
    at Worker.emit (events.js:327:22)
    at ChildProcess.<anonymous> (internal/cluster/worker.js:32:12)
    at ChildProcess.emit (events.js:315:20)
    at emit (internal/child_process.js:903:12)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)

The msg that caused this:

{
  _id: 'greenlock:6458316115992584',
  _funcname: 'notify',
  _input: 'servername_unknown'
}

Proposed fix:

Change greenlock.js

greenlock.notify = greenlock._notify = function(ev, params) {

To:

greenlock.notify = greenlock._notify = async function(ev, params) {
``` TypeError: Cannot read property 'then' of undefined     at rpc (/srv/clearflask-connect/node_modules/@root/greenlock-express/master.js:137:17)     at Worker.handleMessage (/srv/clearflask-connect/node_modules/@root/greenlock-express/master.js:156:13)     at Worker.emit (events.js:327:22)     at ChildProcess.<anonymous> (internal/cluster/worker.js:32:12)     at ChildProcess.emit (events.js:315:20)     at emit (internal/child_process.js:903:12)     at processTicksAndRejections (internal/process/task_queues.js:81:21) ``` The `msg` that caused this: ``` {   _id: 'greenlock:6458316115992584',   _funcname: 'notify',   _input: 'servername_unknown' } ``` Proposed fix: Change greenlock.js ``` greenlock.notify = greenlock._notify = function(ev, params) { ``` To: ``` greenlock.notify = greenlock._notify = async function(ev, params) { ```
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: root/greenlock.js#37
No description provided.