"ForbiddenError: invalid csrf token" On Fresh Install

  • I do!

    Uncaught SyntaxError: Unexpected token &

    Uncaught TypeError: Cannot read property 'maxReconnectionAttempts' of undefined
    socketIOConnect @ nodebb.min.js?1431043735683:18915
    (anonymous function) @ nodebb.min.js?1431043735683:19495
    (anonymous function) @ nodebb.min.js?1431043735683:19509

    Uncaught TypeError: Cannot read property 'loggedIn' of undefined
    (anonymous function) @ nodebb.min.js?1431043735683:19260
    jQuery.Callbacks.fire @ nodebb.min.js?1431043735683:3087
    jQuery.Callbacks.self.fireWith @ nodebb.min.js?1431043735683:3199
    jQuery.extend.ready @ nodebb.min.js?1431043735683:433
    completed @ nodebb.min.js?1431043735683:104

  • GNU/Linux Admin

    Really... and that's on a fresh install? Weird.

    Can you post a link to your forum so we can take a look, and run it in dev mode for now? (./nodebb dev)

    If you don't want to post it, PM it to @baris, @psychobunny, or myself 🙂

  • Plugin & Theme Dev

    You have problem with minification of the scripts.
    I can encounter this problem several times on day. Until I have found way how to fix it, it was a pain 😉

    Temporal solution

    1. Stop Nodebb
    2. Enter nodebb/public directory
    3. Delete src directory, - rm -rf src
    4. Checkout src directory - git checkout .
    5. Start Nodebb
  • Plugin & Theme Dev

    @julian I have found source of the issue.
    Minification script does not ignore hidden files, like .DS_Store.


    Visit public/src folder, open several files, use finder on Mac. Check if you have .DS_Store files in subdirectories of public/src. Now when you restart NodeBB, minified script will be broken with different artefacts.


    Minification script should include only *.js files.

    Temporal Solution 2 for Mac Users

    1. Enter public/src directory.
    2. Delete all .DS_STORE recursively - find . -name '*.DS_Store' -type f -delete
  • NodeBB Admin

    @Nicolas Nice catch this should be fixed on master now.


  • Plugin & Theme Dev

    @baris nice! 👍

  • GNU/Linux

    Good job guys. Hopefully the others that are having this issue will find this thread.

  • I got same error, and I am using centos system. Can you please help me how to solve the issue?

    Thank You!

  • What I did was, I installed the lobby app. Some feature are working but most them are not. Like when I tried to change the app setting in admin configuration, I got this Error.

    orbiddenError: invalid csrf token
    at verifytoken (/home/maycel.casilag/Lobby-App-master/node_modules/express/node_modules/connect/node_modules/csurf/index.js:269:11)
    at Object.csrf [as handle] (/home/maycel.casilag/Lobby-App-master/node_modules/express/node_modules/connect/node_modules/csurf/index.js:97:7)
    at next (/home/maycel.casilag/Lobby-App-master/node_modules/express/node_modules/connect/lib/proto.js:174:15)
    at methodOverride (/home/maycel.casilag/Lobby-App-master/node_modules/express/node_modules/connect/node_modules/method-override/index.js:79:5)
    at /home/maycel.casilag/Lobby-App-master/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js:41:7
    at methodOverride (/home/maycel.casilag/Lobby-App-master/node_modules/express/node_modules/connect/node_modules/method-override/index.js:79:5)
    at Object.handle (/home/maycel.casilag/Lobby-App-master/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js:39:5)
    at next (/home/maycel.casilag/Lobby-App-master/node_modules/express/node_modules/connect/lib/proto.js:174:15)
    at /home/maycel.casilag/Lobby-App-master/node_modules/express/node_modules/connect/node_modules/express-session/index.js:433:7
    at /home/maycel.casilag/Lobby-App-master/sqlite-store.js:65:15

    Please help me because I'm stuck.

    Thank You!
    POST /docusign_test 403 19.811 ms - -

Suggested Topics

| | | |