julianlam / nodebb-plugin-session-sharing

Allows login sessions from your app to persist in NodeBB
MIT License
88 stars 65 forks source link

"./nodebb upgrade" Cannot read property 'message' #71

Closed tarkh closed 5 years ago

tarkh commented 5 years ago

Hi! nodebb 1.11.1 nodebb-plugin-session-sharing 4.4.0 mongo 4.0.4

After plugin install and nodebb rebuild ./nodebb upgrade fires: Parsing upgrade scripts... OK | 1 script(s) found, 68 skipped → [2017/10/19] Convert remote-to-local user ID from hash to sorted set... 2018-12-26T14:17:20.576Z [3333/100254] - error: uncaughtException: Cannot read property 'message' of null TypeError: Cannot read property 'message' of null at /srv/www/nodebb/node_modules/nodebb-plugin-session-sharing/upgrades/session_sharing_hash_to_zset.js:60:19 at /srv/www/nodebb/node_modules/async/dist/async.js:473:16 at next (/srv/www/nodebb/node_modules/async/dist/async.js:5329:29) at /srv/www/nodebb/node_modules/async/dist/async.js:969:16 at /srv/www/nodebb/node_modules/async/dist/async.js:473:16 at replenish (/srv/www/nodebb/node_modules/async/dist/async.js:1006:25) at /srv/www/nodebb/node_modules/async/dist/async.js:1016:9 at eachLimit$1 (/srv/www/nodebb/node_modules/async/dist/async.js:3196:24) at Object.<anonymous> (/srv/www/nodebb/node_modules/async/dist/async.js:1046:16)

As a temporary fix in nodebb-plugin-session-sharing/upgrades/session_sharing_hash_to_zset.js:60 change } else if (err.message === '...') { to } else if (err != null && err.message === '...') {

julianlam commented 5 years ago

v.4.4.1, thanks!