Agent running on Fedora 32 on x86_64, user already logged in a X11 session, when I click on meshcentral (0.5.27) Desktop "Connect" the server crashes immediately with the following message:
-------- 5/11/2020, 8:51:48 AM ---- 0.5.27 --------
/root/meshcentral/node_modules/meshcentral/meshdesktopmultiplex.js:401
if ((obj.viewersOverflowCount < obj.viewers.length) && obj.agent && (obj.agent.paused == true)) { obj.agent.paused = false; obj.agent.ws._socket.resume(); }
^
TypeError: Cannot read property 'length' of undefined
at /root/meshcentral/node_modules/meshcentral/meshdesktopmultiplex.js:401:61
at /root/meshcentral/node_modules/meshcentral/meshdesktopmultiplex.js:702:96
at /root/meshcentral/node_modules/meshcentral/meshdesktopmultiplex.js:720:82
at FSReqWrap.wrapper [as oncomplete] (fs.js:509:5)
Working on this now.
Just published MeshCentral v0.5.29 with server improvements, but this may not fix the root problem. If you can give it a try, let me know what you see. Thanks.
Hi, I tried 0.5.29 and I still get a crash, line numbers are changed a bit:
-------- 5/11/2020, 7:16:34 PM ---- 0.5.29 --------
/root/meshcentral/node_modules/meshcentral/meshdesktopmultiplex.js:405
if ((obj.viewersOverflowCount < obj.viewers.length) && obj.agent && (obj.agent.paused == true)) { obj.agent.paused = false; obj.agent.ws._socket.resume(); }
^
TypeError: Cannot read property 'length' of undefined
at /root/meshcentral/node_modules/meshcentral/meshdesktopmultiplex.js:405:61
at /root/meshcentral/node_modules/meshcentral/meshdesktopmultiplex.js:706:96
at /root/meshcentral/node_modules/meshcentral/meshdesktopmultiplex.js:724:82
at FSReqWrap.wrapper [as oncomplete] (fs.js:509:5)
I added a console.log(obj.viewers) before the if and got "undefined" so that's why it passes the null check a few line above. I checked and obj has no viewersOverflowCount attribute either.
Oh, your right, you where recording. Fixing that.
If you like, you can add the following line:
// Process data coming from the agent or any viewers
obj.processData = function (peer, data) {
if (obj.viewers == null) return;
if (peer == obj.agent) {
obj.recordingFileWriting = true;
recordData(true, data, function () {
if (obj.viewers == null) return; <-----------------------
obj.recordingFileWriting = false;
if ((obj.viewersOverflowCount < obj.viewers.length) && obj.agent && (obj.agent.paused == true)) { obj.agent.paused = false; obj.agent.ws._socket.resume(); }
obj.processAgentData(data);
});
} else {
obj.processViewerData(peer, data);
}
}
This will fix the crash, but the main problem is that the agent is disconnecting and I am not sure why.
Oh, your right, you where recording. Fixing that.
Yes I activated server recordings in config.json (and I didn't find a way to control or stop it from the web UI, is there one?)
I confirm the added check fixes the server crash issue.
Yes, that will be in v0.5.30 when I next publish it. Does everything else work?
Tried a few things and all seem to work :)
Yes I activated server recordings in config.json (and I didn't find a way to control or stop it from the web UI, is there one?)
Not at the moment. Once configured, it is "permanently" active.
Perfect thanks! I will have that fix published later today.