citizenos / ep_image_upload

Add images to etherpad and upload them to Amazon S3
Other
9 stars 16 forks source link

[Bug Report] plugin triggers etherpad shutdown when opening any pad #2

Closed fanjin-z closed 5 years ago

fanjin-z commented 5 years ago

After I install this plugin today, etherpad shutdowns everytime I try to open a pad, existed one or new one. But I can still access other url (e.g ip_addr:port/admin). The problem gone after the plugin uninstall.

Error log belows

[2019-02-21 03:09:42.831] [INFO] access - [CREATE] Pad "padid": Client G1IokDGNjrTTubbmAAAD with IP "ip_address" created the pad
[2019-02-21 03:09:42.832] [ERROR] console - TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Object.exports.clientVars [as hook_fn] (/home/etherpad/etherpad-lite/node_modules/ep_image_upload/static/js/serverHooks.js:34:23)
    at normalizedhook (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:15:27)
    at hookCallWrapper (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:21:14)
    at /home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:88:7
    at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:249:17
    at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:125:13
    at Array.forEach (<anonymous>)
    at _each (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:46:24)
    at async.each (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:124:9)
    at _asyncMap (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:248:13)
    at Object.map (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:219:23)
    at Object.exports.aCallAll (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:85:9)
    at /home/etherpad/etherpad-lite/src/node/handler/PadMessageHandler.js:1346:15
    at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:610:21
    at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:249:17
    at iterate (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:149:13)
    at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:160:25
    at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:251:21
    at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:615:34
    at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:254:17
    at done (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:135:19)
[2019-02-21 03:09:42.833] [INFO] console - graceful shutdown...
[2019-02-21 03:09:42.875] [INFO] ueberDB - Flushed 5 values
[2019-02-21 03:09:42.975] [INFO] console - db sucessfully closed.
ilmartyrk commented 5 years ago

Hi, from the error log I can read that you probably haven't, updated your settings.json file with plugin config. Is that the case?

fanjin-z commented 5 years ago

My mistake. Didn't realize need to modify settings.json. Thank you for helping out.

ilmartyrk commented 5 years ago

Thank you for your issue. It made me think that probably it would be good to enable this plugin by default without changes in settings.json. We have a plan to add base64 support too in the near future, so will be taking this into account when updating this plugin.