casparcg-connection
casparcg-connection copied to clipboard
null response from tls command
-
I'm submitting a ... [X] bug report [ ] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project
-
Summary
After upgrdaing CaspaCg Server to 2.2 version (and thus, using media-scanner) the "tls" response is full of null data, as follow:
{"response":{"raw":"200 TLS OK","code":200,"data":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]},"responseProtocol":{"code":200},"_payload":{},"_status":4,"_stringParamsArray":[],"_objectParams":{},"_token":"8ja8kl3"}
My function is like;
const {CasparCG, AMCP} = require("casparcg-connection");
var connection = new CasparCG({
host: '127.0.0.1',
queueMode: 2,
});
connection.tls().then(
function(resCmd){
console.log(resCmd);
})
.catch((err) => {
});
- Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
Updating the issue:
The problem also occurs with "fls" command. "cls" works perfectly. Using the casparcg client, media-scanner lists the templates so I discarded a problem with media-scanner itself.
thanks
Hi,
Anyone could reproduce that ?
thanks
Hi, I can reproduce this with CasparCG 2.2. The TLS command in CasparCG 2.2 only returns the template name rather than name, size, lastChanged and format. Our parser is not (yet) able to handle this regression.
In case anybody needs a quick and dirty fix, as I had, change https://github.com/SuperFlyTV/casparcg-connection/blob/24c8170186acb08de2230c8629d3b1bd6475f576/src/lib/ResponseParsers.ts#L325 to return i
, or maybe something like return { name: i }
I did not investigate if it doesn't break something else etc., but at least now I'm getting an array of templates names rather than nulls as a tls response.
Is this still an issiue ?
I have casparConnect: ^4.7.0; server: 2.2.0 stable scanner: build from 2019-04-25 08:08
This should be fixed as of version 6.0.0