Error in HOOK FUNCTION after etherpad-lite update
Hi,
I recently updated my etherpad-lite instance to the version : 1.8.6
After update, I tried to restart my instance and I obtain the following error who block starting :
UNSETTLED FUNCTION BUG IN HOOK FUNCTION (plugin: ep_mypads, function name: /opt/etherpad/etherpad-lite/node_modules/ep_mypads/hooks:expressConfigure, hook: expressConfigure): The hook function neither called the callback nor returned a non-undefined value. This is prohibited because it will result in freezes when a future version of Etherpad updates the hook to support asynchronous behavior.
Following the instruction in this issue #219 , I updated mypads plugins to the latest version : 1.7.17 and obtain the same error.
I tried to find some info on the web without success. However after some search I tried to add he following instruction (with success
callback(null);
```
In file : /opt/etherpad/etherpad-lite/node_modules/ep_mypads/hooks.js here :
Original code :
```
hooks.expressConfigure = function (name, args, callback) {
var storage = require('./storage.js');
var api = require('./api.js');
var mail = require('./mail.js');
api.init(args.app, function () {
storage.init(function (err) {
if (err) { return callback(err); }
mail.init();
callback(null);
});
});
};
```
Code with my modification :
```
hooks.expressConfigure = function (name, args, callback) {
var storage = require('./storage.js');
var api = require('./api.js');
var mail = require('./mail.js');
api.init(args.app, function () {
storage.init(function (err) {
if (err) { return callback(err); }
mail.init();
callback(null);
});
});
callback(null);
};
```
I'm not used with javascript but I think (hope) some function need modification ?
I'm not sure my hack are good, but I hope it will help to solve somes issues.
Cheers,
Mickaël.