WebUI freezes 1-2 seconds after login

When I login to the webUI it freezes after about 1-2 seconds. Doesnt load the server list or even the git commit ID. When I rule the mineos_console.js in terminal I get the following error:

path.js:28
throw new TypeError('Path must be a string. Received ’ + inspect(path));
^

TypeError: Path must be a string. Received undefined
at assertPath (path.js:28:11)
at Object.join (path.js:1251:7)
at new mineos.mc (/usr/games/minecraft/mineos.js:132:15)
at Object. (/usr/games/minecraft/mineos_console.js:119:16)
at Module._compile (module.js:612:30)
at Object.Module._extensions…js (module.js:623:10)
at Module.load (module.js:531:32)
at tryModuleLoad (module.js:494:12)
at Function.Module._load (module.js:486:3)
at Function.Module.runMain (module.js:653:10)

Also when I tried to look at the mineos.log file I found that it was 11GB!! My guess is that it was never auto deleted in the 3-4 years I’ve been using mineos. I deleted it so that I could at least read the log file mineos was generating and I found this error message after I logged in to the web-UI:

Error: Cannot find module ‘/usr/games/minecraft/node_modules/userid/build/Debug/userid.node’"," at Function.Module._resolveFilename (module.js:513:15)"," at Function.Module._load (module.js:463:25)"," at Module.require (module.js:556:17)"," at require (internal/module.js:11:18)"," at Object. (/usr/games/minecraft/node_modules/userid/lib/userid.js:5:19)"," at Module._compile (module.js:612:30)"," at Object.Module._extensions…js (module.js:623:10)"," at Module.load (module.js:531:32)"," at tryModuleLoad (module.js:494:12)"," at Function.Module._load (module.js:486:3)"],“level”:“error”,“message”:“uncaughtException: Cannot find module ‘//games/minecraft/node_modules/userid/build/Debug/userid.node’”,“timestamp”:“2017-11-13T02:18:44.251Z”}

What do?

Did you update the webui, but not rebuild the nodejs dependencies?

In the steps, this is the npm install part.

When I try do a fresh install I get the following error when I run sudo npm install:

gyp WARN EACCES user “root” does not have permission to access the dev dir “/usr/games/minecraft/node_modules/posix/.node-gyp/8.8.1”

For some reason that file was being given the wrong owner and group and I have no idea why, but after correcting it I was able to run sudo npm install without issue.

However, even after doing this and removing mineos from systemctl completely and then re-adding and restarting it the webui still only works for 2 seconds before freezing. I still get this error when I run mineos from the console:

path.js:28
throw new TypeError('Path must be a string. Received ’ + inspect(path));
^

TypeError: Path must be a string. Received undefined
at assertPath (path.js:28:11)
at Object.join (path.js:1251:7)
at new mineos.mc (/usr/games/minecraft/mineos.js:132:15)
at Object. (/usr/games/minecraft/mineos_console.js:119:16)
at Module._compile (module.js:612:30)
at Object.Module._extensions…js (module.js:623:10)
at Module.load (module.js:531:32)
at tryModuleLoad (module.js:494:12)
at Function.Module._load (module.js:486:3)
at Function.Module.runMain (module.js:653:10)

However interestingly I can run arguments on the mineos command such as mineos -h with no issue, and of the arguments list the help output page only -s and -h dont throw the error above.

Also this is the full output from the mineos log file:

{
“date”: “Mon Nov 13 2017 23:39:42 GMT-0500 (EST)”,
“process”: {
“pid”: 11172,
“uid”: 0,
“gid”: 0,
“cwd”: “/”,
“execPath”: “/usr/bin/node”,
“version”: “v8.8.1”,
“argv”: [“/usr/bin/node”, “/usr/games/minecraft/webui.js”, “start”],
“memoryUsage”: {
“rss”: 154169344,
“heapTotal”: 106274816,
“heapUsed”: 60920896,
“external”: 27648934
}
},
“os”: {
“loadavg”: [0.66748046875, 0.60791015625, 0.49560546875],
“uptime”: 87587
},
“trace”: [{
“column”: 15,
“file”: “module.js”,
“function”: “Module._resolveFilename”,
“line”: 513,
“method”: “_resolveFilename”,
“native”: false
}, {
“column”: 25,
“file”: “module.js”,
“function”: “Module._load”,
“line”: 463,
“method”: “_load”,
“native”: false
}, {
“column”: 17,
“file”: “module.js”,
“function”: “Module.require”,
“line”: 556,
“method”: “require”,
“native”: false
}, {
“column”: 18,
“file”: “internal/module.js”,
“function”: “require”,
“line”: 11,
“method”: null,
“native”: false
}, {
“column”: 19,
“file”: “/usr/games/minecraft/node_modules/userid/lib/userid.js”,
“function”: null,
“line”: 5,
“method”: null,
“native”: false
}, {
“column”: 30,
“file”: “module.js”,
“function”: “Module._compile”,
“line”: 612,
“method”: “_compile”,
“native”: false
}, {
“column”: 10,
“file”: “module.js”,
“function”: “Module._extensions…js”,
“line”: 623,
“method”: “.js”,
“native”: false
}, {
“column”: 32,
“file”: “module.js”,
“function”: “Module.load”,
“line”: 531,
“method”: “load”,
“native”: false
}, {
“column”: 12,
“file”: “module.js”,
“function”: “tryModuleLoad”,
“line”: 494,
“method”: null,
“native”: false
}, {
“column”: 3,
“file”: “module.js”,
“function”: “Module._load”,
“line”: 486,
“method”: “_load”,
“native”: false
}],
“stack”: [“Error: Cannot find module ‘/usr/games/minecraft/node_modules/userid/build/Debug/userid.node’”, " at Function.Module._resolveFilename (module.js:513:15)“, " at Function.Module._load (module.js:463:25)”, " at Module.require (module.js:556:17)“, " at require (internal/module.js:11:18)”, " at Object. (/usr/games/minecraft/node_modules/userid/lib/userid.js:5:19)“, " at Module._compile (module.js:612:30)”, " at Object.Module._extensions…js (module.js:623:10)“, " at Module.load (module.js:531:32)”, " at tryModuleLoad (module.js:494:12)“, " at Function.Module._load (module.js:486:3)”],
“level”: “error”,
“message”: “uncaughtException: Cannot find module ‘/usr/games/minecraft/node_modules/userid/build/Debug/userid.node’”,
“timestamp”: “2017-11-14T04:39:42.491Z”
}

From what I can tell it looks like the file /usr/games/minecraft/node_modules/userid/lib/userid.js isn’t compiling correctly. It doesn’t appear that the folder /usr/games/minecraft/node_modules/userid/build exists at all.

I think I figured out what I did wrong, after re-reading the webui update instructions I realized you are only suppose to run the reset_ui.sh OR the update_ui.sh scripts, not both like I had done. Also apparently the installation commands HAVE to be run as the actual root user rather than using sudo. After doing a fresh install of mineos with these corrections it was able to build correctly and I no long have the webUI freezing.

However, it can’t seem to find any of my existing servers, even though it properly auto starts some of them and I can connect to said servers with no issue in-game. It can find the profiles no problem, and it can find the archives in the import folder, but no servers show up in the UI at all. Oddly it can see that there is 1 server running, when i fact there are 3 (2 spigot servers under 1 bungee server)

Update: Tried making a test server from the UI, which worked no problem. Looked at the permissions on the test server folder and saw that it was both owned and part of the group for the user mc, so I made the other servers match that setup and now the UI can see the servers.

1 Like