nodebb-plugin-session-sharing broken in 1.7.2



  • Hi guys,

    I've just updated my forum to 1.7.2 and the nodebb-plugin-session-sharing broke down. If I keep it active, I have the following issues:

    1 - If I open the home page, I get the following error:

    Internal Error.
    Oops! Looks like something went wrong!
    
    /categories
    
    callback is not a function
    

    2 - If I open the admin panel, I also get this error if I'm already logged in the admin panel:

    Internal Error.
    Oops! Looks like something went wrong!
    
    /admin
    
    callback is not a function
    

    If not, it redirects me to the main website where login should be performed (correct, it would then generate the necessary cookie)... but when I'm back I'm not actually logged in the admin panel, it just keeps redirecting me.

    Does anyone have a clue about what's going on? This has effectively made the forum totally unusable.

    Thank you!


  • Admin

    Check your server side logs (logs/output.log) and see if you can get a stack trace of that error.



  • @baris said in nodebb-plugin-session-sharing broken in 1.7.2:

    Check your server side logs (logs/output.log) and see if you can get a stack trace of that error.

    Looks like there is one indeed - here's the log (usernames filtered for privacy):

    12/12 16:36:55 [3474] - info: Initializing NodeBB v1.7.2 https://forum.mywebsite.com
    12/12 16:36:56 [3474] - info: [socket.io] Restricting access to origin: https://forum.mywebsite.com:*
    12/12 16:36:57 [3474] - warn: [plugins/nodebb-plugin-spam-be-gone] Hook `action:flag.create` is deprecated, please use `action:flags.create` instead.
    12/12 16:36:57 [3474] - info: [plugins/spam-be-gone] Settings loaded
    12/12 16:36:57 [3474] - info: [session-sharing] Settings OK
    12/12 16:36:57 [3474] - info: Routes added
    12/12 16:36:57 [3474] - info: NodeBB Ready
    12/12 16:36:57 [3474] - info: Enabling 'trust proxy'
    12/12 16:36:57 [3474] - info: NodeBB is now listening on: 0.0.0.0:4567
    12/12 16:37:10 [3474] - error: /categories
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:68:4)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:37:47 [3474] - error: /user/someuser/followers
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:71:3)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:38:27 [3474] - error: /topic/646/to-hype-or-not-to-hype/19
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:71:3)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:38:43 [3474] - error: /user/someuser/followers
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:71:3)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:38:48 [3474] - error: /user/someuser
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:71:3)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:38:50 [3474] - error: /categories
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:71:3)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:38:51 [3474] - error: /user/someuser
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:71:3)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:38:52 [3474] - error: /user/someuser
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:71:3)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:39:24 [3474] - error: /user/someuser/best
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:71:3)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:39:38 [3474] - error: /categories
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:68:4)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:39:41 [3474] - error: /login
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:68:4)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:39:44 [3474] - error: /user/someuser/following
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:71:3)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    12/12 16:39:50 [3474] - error: /categories
     TypeError: callback is not a function
        at /opt/nodebb/src/meta/blacklist.js:96:4
        at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:104:11)
        at Object.Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:4)
        at Object.Blacklist.test (/opt/nodebb/src/meta/blacklist.js:89:11)
        at Object.plugin.addMiddleware [as method] (/opt/nodebb/node_modules/nodebb-plugin-session-sharing/library.js:337:22)
        at /opt/nodebb/src/middleware/index.js:78:11
        at /opt/nodebb/node_modules/async/dist/async.js:3096:16
        at eachOfArrayLike (/opt/nodebb/node_modules/async/dist/async.js:1055:9)
        at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
        at Object.eachLimit (/opt/nodebb/node_modules/async/dist/async.js:3158:5)
        at middleware.pluginHooks (/opt/nodebb/src/middleware/index.js:77:8)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
        at middleware.pageView (/opt/nodebb/src/middleware/index.js:71:3)
        at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:95:5)
        at next (/opt/nodebb/node_modules/express/lib/router/route.js:137:13)
    

  • Admin



  • @baris @julian how do I get the 4.0.1? In the admin panel, it says I have version 3.2.1 of the plugin and that's the latest. I've also just pulled from git and run ./nodebb upgrade again through SSH but it's not updating the plugin, it stays at 3.2.1.



  • I hate to be the annoying guy here but I'll try tagging the very helpful @PitaJ as well to figure out how to update that plugin to 4.0.1. I tried with stuff like:

    • ./nodebb upgrade nodebb-plugin-session-sharing
    • npm update nodebb-plugin-session-sharing

    Both commands run, but don't update the plugin to 4.0.1. I really hope someone can help 😢


  • Admin

    Try npm i nodebb-plugin-session-sharing@4.0.1 --save


  • Admin

    @Jarko Well that's just weird, because nbbpm suggests v4.0.1 😃

    https://packages.nodebb.org/api/v1/suggest?package=nodebb-plugin-session-sharing&version=1.7.2

    In any case, please give Baris' command a try...



  • @baris tried right after you posted it yesterday and it worked, thank you!

    @julian it was definitely staying at 3.2.1 for me, both in the admin panel and through SSH. Were the commands I've used correct?


Log in to reply
 


Star

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.