Recalbox API not starting - RecalboxOS 4.0.1
Much like this problem
https://github.com/recalbox/recalbox-os/issues/1009
The PM2 process just hangs. Although this fix appears to be present in my 4.0.1 build.
https://github.com/recalbox/recalbox-buildroot/pull/432
The log for PM2 indicates an error;
2017-04-24 16:35:33: [PM2][WORKER] Started with refreshing interval: 30000
2017-04-24 16:35:33: [[[[ PM2/God daemon launched ]]]]
2017-04-24 16:35:33: BUS system [READY] on port /var/.pm2/pub.sock
2017-04-24 16:35:33: RPC interface [READY] on port /var/.pm2/rpc.sock
2017-04-24 16:35:33: Starting execution sequence in -cluster mode- for app name:api id:0
2017-04-24 16:35:34: App name:api id:0 online
2017-04-24 16:35:34: [PM2] Error caught by domain:
TypeError: obj.hasOwnProperty is not a function
at safeDeepClone (/usr/recalbox-api/node_modules/pm2/lib/tools/safeclonedeep.js:49:13)
at safeDeepClone (/usr/recalbox-api/node_modules/pm2/lib/tools/safeclonedeep.js:53:22)
at safeDeepClone (/usr/recalbox-api/node_modules/pm2/lib/tools/safeclonedeep.js:53:22)
at cloneWrap (/usr/recalbox-api/node_modules/pm2/lib/tools/safeclonedeep.js:65:10)
at Object.clone (/usr/recalbox-api/node_modules/pm2/lib/Utility.js:42:12)
at Object.Common.deepCopy.Common.serialize.Common.clone (/usr/recalbox-api/node_modules/pm2/lib/Common.js:218:18)
at /usr/recalbox-api/node_modules/pm2/lib/God.js:372:25
at Worker.cluOnline (/usr/recalbox-api/node_modules/pm2/lib/God.js:186:17)
at Worker.g (events.js:291:16)
at emitNone (events.js:86:13)
2017-04-24 16:35:34: [PM2] Trying to update PM2...
2017-04-24 16:35:34: App name:api id:0 disconnected
2017-04-24 16:35:34: App [api] with id [0] and pid [1294], exited with code [0] via signal [SIGINT]
2017-04-24 16:35:34: Starting execution sequence in -cluster mode- for app name:api id:0
2017-04-24 16:35:35: App name:api id:0 online
2017-04-24 16:35:35: App name:api id:0 disconnected
2017-04-24 16:35:35: App [api] with id [0] and pid [1314], exited with code [0] via signal [SIGINT]
2017-04-24 16:35:35: Starting execution sequence in -cluster mode- for app name:api id:0
Be sure to have the latest version by doing npm install pm2@latest -g
before doing this procedure.
/usr/recalbox-api/node_modules/pm2/lib/tools/safeclonedeep.js:49
if (obj.hasOwnProperty(attr)) {
^
TypeError: obj.hasOwnProperty is not a function
at safeDeepClone (/usr/recalbox-api/node_modules/pm2/lib/tools/safeclonedeep.js:49:13)
at safeDeepClone (/usr/recalbox-api/node_modules/pm2/lib/tools/safeclonedeep.js:53:22)
at safeDeepClone (/usr/recalbox-api/node_modules/pm2/lib/tools/safeclonedeep.js:53:22)
at cloneWrap (/usr/recalbox-api/node_modules/pm2/lib/tools/safeclonedeep.js:65:10)
at Object.clone (/usr/recalbox-api/node_modules/pm2/lib/Utility.js:42:12)
at Object.Common.deepCopy.Common.serialize.Common.clone (/usr/recalbox-api/node_modules/pm2/lib/Common.js:218:18)
at Object.getFormatedProcesses (/usr/recalbox-api/node_modules/pm2/lib/God/Methods.js:68:21)
at getMonitorData (/usr/recalbox-api/node_modules/pm2/lib/God/ActionMethods.js:42:25)
at Server.onmessage (/usr/recalbox-api/node_modules/pm2-axon-rpc/lib/server.js:105:6)
at emitTwo (events.js:106:13)