Greenlock Express expects notify method to return promise #37

Open
by Ghost opened 3 years ago · 0 comments
Ghost commented 3 years ago
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

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.