Hi everyone
After spending one all day around this, I’ve figured out to make this work
So, my server is a dedicated server with Linux Debian 9 (due to Plesk not supporting 10) and this is a server in my house behind an ISP NAS.
I also installed Node 13 and not the 14 because I was getting some errors from some modules not supporting the 14 yet.
Scheduler 5.3.6
The server works great, all the domains are up and running.
So I decided to try and install LIVE UPDATES on my test environment.
FIRST MISTAKE
- You don’t need to have Scheduler or any other product running with node. Am I wrong on that one? When I read the documents thats my first impression, so I did install and run Scheduler on node. I had no ideia about nodejs before that, so now I have some (which is good). I also haven’t noticed any time improvements by switching to node.
SECOND MISTAKE
- Like I told you before, I had no idea about nodejs, so my second mistake was to try and combine both node processes (the scheduler and the live_updates) in one. That doesn’t come any good. So I discovered that I had to create two different processes in two different ports. Also I had to add TCP port forwarding on my router for both ports (3000 and 8008) in my case.
ERRORS
Creating a node process for Scheduler was relatively easy, however for the live_updates was the HELL. The version of the files available on dhtmlx documents section are a little over dated. Some functions are already deprecated since node 10 (example the fayed-node.js with " new Buffer()", the module “sys” under server.js, etc etc.)
After ignoring a few from this errors, things started to happen, however not totally as expected.
On scheduler I was able to move tasks around, extending, shorting, etc, however creating a new task trows an error:
dhtmlxscheduler.js:5506 Uncaught TypeError: Cannot read property ‘valueOf’ of undefined
at Object.g.addEvent (dhtmlxscheduler.js:5506)
at Object.scheduler.add (dhtmlxscheduler_live_update.js:203)
and the line 203 of that file says
return this.addEvent(data.start_date, data.end_date, data.text, data.id, data);
If I make console.log() of data before that happens, I’m just getting an ID, while all the others (start_date and end_date) are undefined.
Does this have anything to do with the new Buffer() that I’ve mentioned before?
One part of that file has
Faye.WebSocket.Draft75Parser = Faye.Class({
1437: FRAME_START : new Buffer([0x00]),
1438: FRAME_END : new Buffer([0xFF]),
on line 1436.
Well there isn’t much information about this tool around here, so I believe this is not used so much, but still I would like to have answer from someone explaining me if there is any salvation to me, other than downgrading my node into version 9.