New install: Admin area not loading and showing error
-
Fresh install of nodebb v4.2.0 on Ubuntu 22.04 with node v18.20.7. The forum appears fine, but when I log in as the admin user and go to the admin area, I just get a message:
Internal Error.
Oops! Looks like something went wrong!
Invalid Version: N/Alogs/output.log
shows this whenever I go to that page.2025-03-20T00:17:41.127Z [4567/1952357] - error: GET /admin TypeError: Invalid Version: N/A at new SemVer (/usr/local/share/nodebb/node_modules/semver/classes/semver.js:38:13) at compare (/usr/local/share/nodebb/node_modules/semver/functions/compare.js:3:32) at Object.gt (/usr/local/share/nodebb/node_modules/semver/functions/gt.js:2:29) at dashboardController.get (/usr/local/share/nodebb/src/controllers/admin/dashboard.js:36:45) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /usr/local/share/nodebb/src/routes/helpers.js:80:5
I've tried re-running
nodebb build
and also completely re-installing. Any advice appreciated. -
Fresh install of nodebb v4.2.0 on Ubuntu 22.04 with node v18.20.7. The forum appears fine, but when I log in as the admin user and go to the admin area, I just get a message:
Internal Error.
Oops! Looks like something went wrong!
Invalid Version: N/Alogs/output.log
shows this whenever I go to that page.2025-03-20T00:17:41.127Z [4567/1952357] - error: GET /admin TypeError: Invalid Version: N/A at new SemVer (/usr/local/share/nodebb/node_modules/semver/classes/semver.js:38:13) at compare (/usr/local/share/nodebb/node_modules/semver/functions/compare.js:3:32) at Object.gt (/usr/local/share/nodebb/node_modules/semver/functions/gt.js:2:29) at dashboardController.get (/usr/local/share/nodebb/src/controllers/admin/dashboard.js:36:45) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /usr/local/share/nodebb/src/routes/helpers.js:80:5
I've tried re-running
nodebb build
and also completely re-installing. Any advice appreciated.@Analog-Weapon thanks, looks like a backend error. Can you please open a GitHub issue?
We're not seeing it on our own installs.
-
@Analog-Weapon Can you access other pages in the admin panel like
/admin/settings/general
? Looks like an issue with loading latest version and sember on the admin dashboard. -
I'm so frustrated with myself. I swear I've been messing with this all day and re-installing. I went to re-install and follow the steps to file the bug report, and it worked this time. I can't think of anything I've done differently. Uninstallation is as simple as removing the directory and dropping the database in mongo, right?
-
@Analog-Weapon yes if you drop the database and remove the nodebb folder you can reinstall again with
./nodebb setup
-
I added a check just incase github returns and invalid semver version https://github.com/NodeBB/NodeBB/commit/6fe066ced2707d31cac6e5ae911010aae08fbfbf
-
Really odd. I did that at least 5 times today and every time it was showing this error on the admin screen. I did it again now and suddenly everything works. The only thing I'm wondering is if I didn't properly stop nodebb and it was still running when i tried to re-install before.
Anyway, I can try to recreate and report back if I can see what the heck I was doing to cause this. Sorry for the confusion.
-
@Analog-Weapon no worries, the only way this would happen is if github somehow returned a semver version that is not a valid semver string. We get that value from https://api.github.com/repos/NodeBB/NodeBB/releases/latest. With the change I made even if the version is invalid the page will still load.
-
-
That's interesting. Maybe you can debug here and see what it returns when running normally vs via pm2.