My first reward crash server
-
@julian @psychobunny have a feeling this is the original error
23/3 03:15 [6840] - info: NodeBB Ready 23/3 03:17 [6840] - error: TypeError: object is not a function at C:\Users\mattw_000\Documents\GitHub\new\NodeBB\src\database\redis\sets.js:9:4 at try_callback (C:\Users\mattw_000\Documents\GitHub\new\NodeBB\node_modules\redis\index.js:573:9) at RedisClient.return_reply (C:\Users\mattw_000\Documents\GitHub\new\NodeBB\node_modules\redis\index.js:661:13) at ReplyParser.<anonymous> (C:\Users\mattw_000\Documents\GitHub\new\NodeBB\node_modules\redis\index.js:309:14) at ReplyParser.emit (events.js:95:17) at ReplyParser.send_reply (C:\Users\mattw_000\Documents\GitHub\new\NodeBB\node_modules\redis\lib\parser\javascript.js:300:10) at ReplyParser.execute (C:\Users\mattw_000\Documents\GitHub\new\NodeBB\node_modules\redis\lib\parser\javascript.js:189:22) at RedisClient.on_data (C:\Users\mattw_000\Documents\GitHub\new\NodeBB\node_modules\redis\index.js:534:27) at Socket.<anonymous> (C:\Users\mattw_000\Documents\GitHub\new\NodeBB\node_modules\redis\index.js:91:14) at Socket.emit (events.js:95:17)
before it all hits the fan in that above log
-
I have similar problem with rewards:
31/3 16:59 [13455] - error: TypeError: Cannot set property 'rewards' of null at /adv/nodebb-master/src/rewards/admin.js:117:22 at /adv/nodebb-master/node_modules/async/lib/async.js:592:17 at done (/adv/nodebb-master/node_modules/async/lib/async.js:135:19) at /adv/nodebb-master/node_modules/async/lib/async.js:32:16 at /adv/nodebb-master/node_modules/async/lib/async.js:589:21 at handleCallback (/adv/nodebb-master/node_modules/mongodb/lib/utils.js:95:12) at /adv/nodebb-master/node_modules/mongodb/lib/collection.js:849:5 at handleCallback (/adv/nodebb-master/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:234:5) at setCursorNotified (/adv/nodebb-master/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:434:3) at /adv/nodebb-master/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:537:16
-
Sorry about the delay here @Codejet issue should be solved now!
-
@psychobunny tested and works, awesome stuff !!
any chance you could fix the group badge dislaying in posts ! I know you're a busy bunny but this would be freaking awesome too
-
Ran into some errors after I tried to delete, make new rewards, not sure in which order I did it.
2/4 00:41 [5480] - error: TypeError: Cannot read property 'claimable' of null at C:\Users\mattw_000\Documents\GitHub\fixed\NodeBB\src\rewards\index.js:79:35 at Array.filter (native) at C:\Users\mattw_000\Documents\GitHub\fixed\NodeBB\src\rewards\index.js:78:21 at C:\Users\mattw_000\Documents\GitHub\fixed\NodeBB\src\database\redis\sorted.js:132:4 at try_callback (C:\Users\mattw_000\Documents\GitHub\fixed\NodeBB\node_modules\redis\index.js:573:9) at RedisClient.return_reply (C:\Users\mattw_000\Documents\GitHub\fixed\NodeBB\node_modules\redis\index.js:661:13) at ReplyParser.<anonymous> (C:\Users\mattw_000\Documents\GitHub\fixed\NodeBB\node_modules\redis\index.js:309:14) at ReplyParser.emit (events.js:95:17) at ReplyParser.send_reply (C:\Users\mattw_000\Documents\GitHub\fixed\NodeBB\node_modules\redis\lib\parser\javascript.js:300:10) at ReplyParser.execute (C:\Users\mattw_000\Documents\GitHub\fixed\NodeBB\node_modules\redis\lib\parser\javascript.js:211:22)
tried Is: string: went back to Is: >= 10 after deleting all rewards .. still behaving this way.
NOTE: Breaks nodebb every time posting after click 'submit' in the composer... not in ACP -
oh I see, it's actually because of a corrupted reward that you had in the first place. Should be an easy fix one sec.
any chance you could fix the group badge dislaying in posts
doesn't this work? you just have to select your badge from the user settings control panel
@Codejet try latest now?
-
@psychobunny ok , test again.
No crash behaviour anymore Add to group works on Is: string: 'No of Posts' perfectamundo.. adds to the group, check profile and is in the group after post count reached. I have created numerous reward, and also deleted numerous. Sometimes server reload after deleting required to clear view of rewards in ACP. TO make sure no rewards in saved rewards. But success no more crashing NodeBB !
I'm not sure about the <=,>=,<,> operators on 'Send alert message' and this use of 'Amount of times reward is claimable'. (0 for infinite)
Appear to send Alert message infinitely after post count met, regardless of how many time " 0 or 1 " times award is claimable.Every time post after receiving award , sends message regardless of limit. Maybe be worth checking operators on 'Add to group' also. Perhaps it is adding to group every time after milestone reached ? (would make more work for server if trying to add to group every post, why I used string: instead of 'greater than' 10 which would mean 11,12,13 ++ all true and receive message every time )
Pretty sure group badge not displaying in posts in master branch , in lavender for a while now
-
@Codejet said:
Pretty sure group badge not displaying in posts in master branch , in lavender for a while now
Doh , I see it in User Settings now, select which group badge to display
You can't display multiple group badges ? Only one.. hmmmm What about the choice to display badges automatically ?
Thanks @psychobunny , Legend !
-
Cool and I'll look into the limited aspect. TBH I've been busy with the theme and some other things but I'll be working on rewards because I want this community to have some sort of system where people who do help out others get some thanks for doing so. Current system can give group badges so maybe we that's a good place to start
-
i installed the latest code from main branch, and when i clicked the "reward", it gave me:
Internal error.
Oops! Looks like something went wrong!
/api/admin/extend/rewards
undefined is not a functionany advice on what could be wrong?
-
Some core method for groups was updated but rewards wasn't - should be fixed on latest master
-
@psychobunny Thank you very much! I got same issue for a while! will try the latest code...