Manager.set not returning promise #20

Open
opened 2020-04-27 18:35:59 +00:00 by Ghost · 1 comment

Causing the lib to fail in Lambda environments. Hilariously, I discovered the same bug back in the original letsencrypt lib a few years ago.

https://git.rootprojects.org/root/greenlock.js/src/branch/master/lib/manager-wrapper.js#L171-L175

Should be:

                return mega.set(args).then(function(result) {
                    if (!gconf._bin_mode) {
                        **return** greenlock.renew({}).catch(function(err) {
                            if (!err.context) {
                                err.contxt = 'renew';
                            }
                            **return** greenlock._notify('error', err);
                        });
                    }
                    return result;
                });
Causing the lib to fail in Lambda environments. Hilariously, I discovered the same bug back in the original letsencrypt lib a few years ago. https://git.rootprojects.org/root/greenlock.js/src/branch/master/lib/manager-wrapper.js#L171-L175 Should be: ``` return mega.set(args).then(function(result) { if (!gconf._bin_mode) { **return** greenlock.renew({}).catch(function(err) { if (!err.context) { err.contxt = 'renew'; } **return** greenlock._notify('error', err); }); } return result; }); ```
Author

Now I'm thinking it may be deliberate after seeing "ignore promise return" https://git.rootprojects.org/root/acme.js/src/branch/master/acme.js#L489 but I think we need one there too. I'm not sure where else a promise isn't being returned but I'm still having issues so at least one more.

Now I'm thinking it may be deliberate after seeing "ignore promise return" https://git.rootprojects.org/root/acme.js/src/branch/master/acme.js#L489 but I think we need one there too. I'm not sure where else a promise isn't being returned but I'm still having issues so at least one more.
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#20
No description provided.