casparcg-connection icon indicating copy to clipboard operation
casparcg-connection copied to clipboard

null response from tls command

Open deedos opened this issue 6 years ago • 5 comments

  • 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.)

deedos avatar Aug 17 '18 17:08 deedos

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

deedos avatar Sep 04 '18 18:09 deedos

Hi,

Anyone could reproduce that ?

thanks

deedos avatar Dec 12 '18 18:12 deedos

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.

mint-dewit avatar Dec 12 '18 19:12 mint-dewit

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.

ianshade avatar Apr 03 '19 22:04 ianshade

Is this still an issiue ?

I have casparConnect: ^4.7.0; server: 2.2.0 stable scanner: build from 2019-04-25 08:08

Dandrum avatar Jun 25 '19 19:06 Dandrum

This should be fixed as of version 6.0.0

mint-dewit avatar Nov 11 '22 09:11 mint-dewit