Plugin is crashing NodeBB
jdutriaux opened this issue · 13 comments
Hello, I have installed your plugin on my nodeBB board but it crashes the NodeBB process with this error :
error: SyntaxError: Unexpected end of JSON input
at Object.parse (native)
at /data/www/nodebb/node_modules/nodebb-plugin-discord-notification/library.js:72:27
at /data/www/nodebb/node_modules/async/dist/async.js:3861:9
at /data/www/nodebb/node_modules/async/dist/async.js:421:16
at iterateeCallback (/data/www/nodebb/node_modules/async/dist/async.js:928:24)
at /data/www/nodebb/node_modules/async/dist/async.js:906:16
at /data/www/nodebb/node_modules/async/dist/async.js:3858:13
at /data/www/nodebb/src/database/redis/hash.js:50:4
at Multi.callback (/data/www/nodebb/src/database/redis/hash.js:79:4)
at multi_callback (/data/www/nodebb/node_modules/redis/lib/multi.js:89:14)
at Command.callback (/data/www/nodebb/node_modules/redis/lib/multi.js:116:9)
at normal_reply (/data/www/nodebb/node_modules/redis/index.js:726:21)
at RedisClient.return_reply (/data/www/nodebb/node_modules/redis/index.js:824:9)
at JavascriptRedisParser.returnReply (/data/www/nodebb/node_modules/redis/index.js:192:18)
at JavascriptRedisParser.execute (/data/www/nodebb/node_modules/redis-parser/lib/parser.js:574:12)
at Socket.<anonymous> (/data/www/nodebb/node_modules/redis/index.js:274:27)
I'm on v1.7.0 of NodeBB.
Thanks for your help 😄.
Oh my, there is something really wrong with notifications on GitHub…
Does it still crash your forum?
it's still happening - it crashes if you don't have the webhook url filled in.
Still happening 😬
I have this issue and am disappointed to see that this issue has been open for three years. ☹
it's still happening - it crashes if you don't have the webhook url filled in.
How am I supposed to set the webhook URL if I can't get to the plugin's config page?
hmm in my case here is the error when I try to load the config
(node:2126541) UnhandledPromiseRejectionWarning: Error: Failed to lookup view "admin/plugins/discord-notification" in views directory "/srv/NodeBB/build/public/templates"
at Function.render (/srv/NodeBB/node_modules/express/lib/application.js:580:17)
at ServerResponse.render (/srv/NodeBB/node_modules/express/lib/response.js:1012:7)
at /srv/NodeBB/src/middleware/render.js:89:11
at new Promise (<anonymous>)
at renderContent (/srv/NodeBB/src/middleware/render.js:88:10)
at ServerResponse.renderOverride [as render] (/srv/NodeBB/src/middleware/render.js:64:14)
I have this issue and am disappointed to see that this issue has been open for three years. ☹
@ledlamp, ah, and I'm quite disappointed that during these three years no one has mentioned even a tiny detail about their environments: you know, NodeBB version, nodejs version, etc.
I just can't fix the issue I can't reproduce — even if I happen to have some time to spare for that project.
I have this issue and am disappointed to see that this issue has been open for three years. ☹
@ledlamp, ah, and I'm quite disappointed that during these three years no one has mentioned even a tiny detail about their environments: you know, NodeBB version, nodejs version, etc.
I just can't fix the issue I can't reproduce — even if I happen to have some time to spare for that project.
Why didn't you ask them then? The original post said v1.7.0. I'm using v1.15.2 on node 14.15.0 on centos 8.
@amargon I'll spin up a new recent installation, install it and dump everything I can find here, maybe it helps. Am unfortunately not deep into Node myself so all I can provide is logs and the info you said you needed.
Cheers
Why didn't you ask them then?
Why should I? We're not in class, I'm not anyone's teacher of GitHub basics, and I've got plenty of other work to do.
Besides, it's quite obvious that no one can just guess how someone else's forum is set up.
I'll spin up a new recent installation, install it and dump everything I can find here
@nefarius, ah, I was going to do the same next weekend, but
it works as designed...
😄
Sorry for the noise... I changed a lot since I last tried to "fix" this plugin, but it seems now with the new shiny Docker image I use all these weird issues are a thing of the past 👍
@nefarius well, the plugin itself is not that complex to make NodeBB crash because of it (the worst case I've seen was а webhook not firing because of missing user avatar), but those little details of compatibility between specific NodeBB version, nodejs version, other plugins, etc, can be a real headache.