I am using CasparCG Connection to setup an HTML play out server and when I try to get the getCasparCGPaths or getCasparCGConfig I catch an error.
casparCon.getCasparCGVersion(true).then(result => {
console.log(result);
}).catch(error => {
console.error(error);
});
casparCon.getCasparCGPaths(true).then(result => {
console.log(result);
}).catch(error => {
console.error(error);
});
casparCon.getCasparCGConfig(true).then(result => {
console.log(result);
}).catch(error => {
console.error(error);
});
Caspar Connection Logs
Log: New command added, "VersionCommand". 1 command(s) in command queues.
Log: Sending command, "VersionCommand" with priority "HIGH". undefined command(s) in sentCommands, 0 command(s) in command queues.
Log: REQ pq4s2y5 VERSION SERVER
Log: New command added, "InfoPathsCommand". 1 command(s) in command queues.
Log: Sending command, "InfoPathsCommand" with priority "NORMAL". undefined command(s) in sentCommands, 0 command(s) in command queues.
Log: REQ g1lktm7 INFO PATHS
Log: Handling response, "VersionCommand" with token "pq4s2y5"
Log: Handling response, "InfoPathsCommand" with token "g1lktm7"
Version Result: 2000
Log: New command added, "InfoConfigCommand". 1 command(s) in command queues.
Log: Sending command, "InfoConfigCommand" with priority "NORMAL". undefined command(s) in sentCommands, 0 command(s) in command queues.
Log: REQ w95kg1m INFO CONFIG
Log: Handling response, "InfoConfigCommand" with token "w95kg1m"
Errors being caught and logged
An error occured. Error: Command error: Failed command
at commandPromise.catch (C:\Users\chris\Documents\ILEC\Sandbox\caspar\backend\node_modules\casparcg-connection\dist\CasparCG.js:340:23)
at process._tickCallback (internal/process/next_tick.js:68:7)
InfoPathsCommand {
context: undefined,
response: AMCPResponse { raw: 'RES g1lktm7 200 INFO OK', code: 200 },
responseProtocol:
ResponseSignature {
code: 201,
validator: [Function: XMLValidator],
parser: [Function: InfoPathsParser] },
_payload: {},
_status: 5,
_stringParamsArray: [],
_objectParams: {},
_token: 'g1lktm7',
resolve: [Function],
reject: [Function]
}
An error occured. Error: Command error: Failed command
at commandPromise.catch (C:\Users\chris\Documents\ILEC\Sandbox\caspar\backend\node_modules\casparcg-connection\dist\CasparCG.js:340:23)
at process._tickCallback (internal/process/next_tick.js:68:7)
InfoConfigCommand {
context: { serverVersion: 2000 },
response: AMCPResponse { raw: 'RES w95kg1m 200 INFO OK', code: 200 },
responseProtocol:
ResponseSignature {
code: 201,
validator: [Function: XMLValidator],
parser: [Function: ConfigParser] },
_payload: {},
_status: 5,
_stringParamsArray: [],
_objectParams: {},
_token: 'w95kg1m',
resolve: [Function],
reject: [Function]
}
The server outputs this for both commands.
[2019-06-16 18:30:08.200] [info] Received message from 127.0.0.1: REQ w95kg1m INFO CONFIG\r\n
[2019-06-16 18:30:08.200] [debug] Executing command: INFO
[2019-06-16 18:30:08.200] [debug] Executed command (0s): INFO
[2019-06-16 18:30:08.200] [info] Sent message to 127.0.0.1:RES w95kg1m 200 INFO OK\r\n1 1080p2997 PLAYING\r\n\r\n
I see it is executing INFO
not INFO CONGIF
. Is that what is causing the incorrect response?
Thank you very much!