invalid-score Error occurred during upgrade from 1.13.2 to 1.14.2

Technical Support
  • Hello,

    I am upgrading my nodebb from 1.13.1 to 1.14.2 on a windows PC with the following tools installed:

    • Node: v10.15.3
    • NPM: 6.9.0
    • Mongo: 4.2

    The following is the procedure I am following to upgrade:

    >git fetch
    >git checkout v1.14.x
    >git merge origin/v1.14.x
    
    rem delete my custom plugin links before upgrade
    >rmdir /S /Q   ./node_modules/charter
    >rmdir /S /Q   ./node_modules/customFields
    ...
    
    >nodebb upgrade
    
    rem link back the custom plugins
    >linker.bat
    
    >nodebb build
    >nodebb dev
    

    Unfortunately nodebb upgrade fails after hitting the following error during the upgrade:

    >nodebb upgrade
    
    Updating NodeBB...
    
    1. Updating package.json file with defaults...  OK
    
    2. Bringing base dependencies up to date...  started
    npm WARN [email protected] requires a peer of nodebb-plugin-emoji@^2.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
    
    audited 1341 packages in 8.521s
    found 34 vulnerabilities (32 low, 2 high)
      run `npm audit fix` to fix them, or `npm audit` for details
    
    3. Checking installed plugins for updates...  OK
    
    4. Updating NodeBB data store schema...
    Parsing upgrade scripts...
    2020-07-31T21:26:46.543Z [4567/25544] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `semantix`. Skipping.
    2020-07-31T21:26:46.551Z [4567/25544] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `charter`. Skipping.
    2020-07-31T21:26:46.552Z [4567/25544] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `customFields`. Skipping.
    2020-07-31T21:26:46.554Z [4567/25544] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `people`. Skipping.
    2020-07-31T21:26:46.557Z [4567/25544] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `ratings`. Skipping.
    2020-07-31T21:26:46.558Z [4567/25544] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-desktop-notifications`. Skipping.
    2020-07-31T21:26:46.559Z [4567/25544] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `stores`. Skipping.
    2020-07-31T21:26:46.561Z [4567/25544] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `topics`. Skipping.
    2020-07-31T21:26:46.562Z [4567/25544] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `cash`. Skipping.
    2020-07-31T21:26:46.563Z [4567/25544] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `composter`. Skipping.
    2020-07-31T21:26:46.564Z [4567/25544] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-widget-search-bar`. Skipping.
    OK | 1 script(s) found, 88 skipped 
    
    [              ] (2700/134100) 2% Error occurredent...
    Error occurred during upgrade: Error: [[error:invalid-score, null]]
        at sortedSetAddBulk (d:\nb114\src\database\mongo\sorted\add.js:38:11)
        at module.sortedSetAdd (d:\nb114\src\database\mongo\sorted\add.js:12:17)
        at Object.wrapperCallback [as sortedSetAdd] (d:\nb114\src\promisify.js:50:18)
        at batch.processSortedSet.progress (d:\nb114\src\upgrades\1.14.1\readd_deleted_recent_topics.js:25:13)
        at process._tickCallback (internal/process/next_tick.js:68:7)
    2020-07-31T21:26:48.818Z [4567/25544] - error: uncaughtException: [[error:invalid-score, null]]
    Error: [[error:invalid-score, null]]
        at sortedSetAddBulk (d:\nb114\src\database\mongo\sorted\add.js:38:11)
        at module.sortedSetAdd (d:\nb114\src\database\mongo\sorted\add.js:12:17)
        at Object.wrapperCallback [as sortedSetAdd] (d:\nb114\src\promisify.js:50:18)
        at batch.processSortedSet.progress
    (d:\nb114\src\upgrades\1.14.1\readd_deleted_recent_topics.js:25:13)
        at process._tickCallback (internal/process/next_tick.js:68:7) {"error":{},"stack":"Error: [[error:invalid-score, null]]\n    at sortedSetAddBulk (d:\\nb114\\src\\database\\mongo\\sorted\\add.js:38:11)\n    at module.sortedSetAdd (d:\\nb114\\src\\database\\mongo\\sorted\\add.js:12:17)\n    at Object.wrapperCallback [as sortedSetAdd] (d:\\nb114\\src\\promisify.js:50:18)\n    at batch.processSortedSet.progress (d:\\nb114\\src\\upgrades\\1.14.1\\readd_deleted_recent_topics.js:25:13)\n    at process._tickCallback (internal/process/next_tick.js:68:7)","exception":true,"date":"Fri Jul 31 2020 17:26:48 GMT-0400 (Eastern Daylight Time)","process":{"pid":25544,"uid":null,"gid":null,"cwd":"d:\\nb114","execPath":"C:\\Program Files\\nodejs\\node.exe","version":"v10.15.3","argv":["C:\\Program Files\\nodejs\\node.exe","d:\\nb114\\nodebb","upgrade"],"memoryUsage":{"rss":140382208,"heapTotal":117174272,"heapUsed":88787944,"external":19743471}},"os":{"loadavg":[0,0,0],"uptime":2309923},"trace":[{"column":11,"file":"d:\\nb114\\src\\database\\mongo\\sorted\\add.js","function":"sortedSetAddBulk","line":38,"method":null,"native":false},{"column":17,"file":"d:\\nb114\\src\\database\\mongo\\sorted\\add.js","function":"module.sortedSetAdd","line":12,"method":"sortedSetAdd","native":false},{"column":18,"file":"d:\\nb114\\src\\promisify.js","function":"Object.wrapperCallback [as sortedSetAdd]","line":50,"method":"wrapperCallback [as sortedSetAdd]","native":false},{"column":13,"file":"d:\\nb114\\src\\upgrades\\1.14.1\\readd_deleted_recent_topics.js","function":"batch.processSortedSet.progress","line":25,"method":"progress","native":false},{"column":7,"file":"internal/process/next_tick.js","function":"process._tickCallback","line":68,"method":"_tickCallback","native":false}]}
    

    Let me add that I have successfully upgraded my Ubuntu production server to the latest nodebb running 1.14.2. I still get the same invalid-score message during the startup but is not fatal.

    Please let me know if any other information is needed and as always thank you all for your great work and support. .

  • @baris , it worked. Much appreciated and thanks for helping out. How about the other server that 1.14.2 is installed but the message appears at start up? Should I reinstall?

    Thanks again.

  • Is there a stack trace for the startup error?

  • @baris Out of 8 child processes that I start, only the first one shows this error:

    2020-08-01T12:55:32.629Z [4567/12206] - verbose: [plugins] Loaded plugin: ratings
        [              ] (2700/153439) 1% Error occurred
    2020-08-01T12:55:32.676Z [4567/12206] - verbose: [plugins] Loaded plugin: nodebb-plugin-spam-be-gone
    2020-08-01T12:55:32.676Z [4562/12179] - error: Error: [[error:invalid-score, null]]
        at sortedSetAddBulk (/home/nodebb/dt1140/src/database/mongo/sorted/add.js:38:11)
        at module.sortedSetAdd (/home/nodebb/dt1140/src/database/mongo/sorted/add.js:12:17)
        at Object.wrapperCallback [as sortedSetAdd] (/home/nodebb/dt1140/src/promisify.js:50:18)
        at batch.processSortedSet.progress (/home/nodebb/dt1140/src/upgrades/1.14.1/readd_deleted_recent_topics.js:25:13)
        at process._tickCallback (internal/process/next_tick.js:68:7)
    2020-08-01T12:55:32.678Z [4567/12206] - verbose: [plugins] Loaded plugin: ezbase
    2020-08-01T12:55:32.688Z [4567/12206] - verbose: [plugins] Loaded plugin: cash
    2020-08-01T12:55:32.691Z [4567/12206] - verbose: [plugins] Loaded plugin: ezcomposer
    [cluster] Child Process (12179) has exited (code: 0, signal: null)
    
    

    That server was upgraded from 1.14.1 to 1.14.2 and it comes up and it appears that operates normal.

    Thanks again for your time.

  • Did you apply the above fix to this server as well? It's sipposed to fix that error.

  • @baris I applied and It also worked on the production server. Thanks again.


Suggested Topics


  • 0 Votes
    1 Posts
    45 Views

    Hi, I switched from docker install to normal install and I wonder if i can automate updates because I will 100% forget to apply them in the long term

    I tried to create a script to run once a month to do this:

    delete everything except config.json, packages.json and uploads

    get latest source for the 3.x branch from github

    run ./nodebb upgrade as node user, then start it

    but then I noticed that ./nodebb upgrade can ask "do you want to upgrade this plugin Y/N?", and so it can't be run attended in a script

    I checked in the help and I did not see a command to make it unattended, so I resorted to just run it as ./nodebb upgrade -mib && ./nodebb start, which looks like it does not ask questions

    What do you think?

  • 0 Votes
    7 Posts
    1k Views

    @alfazaz said in Custom Pages Plugin after Upgrade:

    1.10.1

    Works fine with version 1.10.1 🙂

  • 0 Votes
    2 Posts
    968 Views

    @h7 tried on a different Debian 7 (Wheezy) server, to make sure this is a common issue:

    Node.js v4.2.2 Redis server v=3.2.11 NodeBB v1.0.3

    NodeBB installs again, without errors but the log comes back with the exact same [2458] - error: undefined

    npm rm nodebb-plugin-emoji-one npm install [email protected]

    fixed that error, now:

    info: Time: Sun Oct 08 2017 04:59:32 GMT+0300 (MSK) info: Initializing NodeBB v1.0.3 [outdated] nodebb-plugin-emoji-one installed v1.1.4, package.json requires 1.1.0 warn: One or more of NodeBB's dependent packages are out-of-date. Please run the following command to update them: warn: ./nodebb upgrade [cluster] Child Process (6503) has exited (code: 0, signal: null)

    OK, removing the plugin npm rm nodebb-plugin-emoji-one and ./nodebb start worked, NodeBB v1.0.3 running, still can't log-in:

    warn: [meta/dependencies] Bundled plugin nodebb-plugin-emoji-one not found, skipping dependency check. [minifier] file not found, node_modules/socket.io-client/socket.io.js [minifier] file not found, node_modules/socket.io-client/socket.io.js info: NodeBB Ready info: Enabling 'trust proxy' info: NodeBB is now listening on: 0.0.0.0:4567 error: /login invalid csrf token error: /login invalid csrf token

    using older versions of socket.io:

    npm remove socket.io npm remove socket.io-client npm install [email protected] npm install [email protected]

    did the trick, NodeBB v1.0.3 running and ready for myBB to NodeBB transition

  • 0 Votes
    3 Posts
    1k Views

    @btw6391 are you using Nginx in front? Search this forum for the error and check those posts for a tweak to Nginx.

  • nodebb log has some error

    Technical Support
    3
    0 Votes
    3 Posts
    1k Views

    It looks like you forgot to set the callback url or one of the access keys, and it is just guessing the url to go to.