Giter Club home page Giter Club logo

spx-gc's Issues

Cannot Find template error on casparcg 2.0.7

This exact setup works well on version 1.0.8 but in the latest version (SPX-GC v1.0.14) Caspar CG can't find templates anymore this is the log output from Caspar CG:

 Accepted connection from 127.0.0.1 2
[2021-10-28 01:18:41.647] [18172] [info]    Received message from 127.0.0.1: CG 1-8 STOP 1\r\n
[2021-10-28 01:18:41.667] [16588] [debug]   Executed command: CGCommand
[2021-10-28 01:18:41.676] [16588] [info]    Sent message to 127.0.0.1: 404 CG ERROR\r\n
[2021-10-28 01:18:42.912] [18172] [info]    Received message from 127.0.0.1: CG 1-8 ADD 1 "http://192.168.123.188:5000/templates/smartpx/Template_Pack_1/SPX1_INFO_RIGHT.html" 1 "<templateData><componentData id=\"f0\"><data id=\"text\" value=\"?? #hashtag\"/></componentData><componentData id=\"epochID\"><data id=\"text\" value=\"1634440746763\"/></componentData></templateData>"\r\n
[2021-10-28 01:18:42.979] [16588] [warning] Could not find template HTTP://192.168.123.188:5000/TEMPLATES/SMARTPX/TEMPLATE_PACK_1/SPX1_INFO_RIGHT.HTML
[2021-10-28 01:18:43.004] [16588] [debug]   Executed command: CGCommand
[2021-10-28 01:18:43.035] [16588] [info]    Sent message to 127.0.0.1: 404 CG ERROR\r\n

and this is from SPX_GC



2021-10-28T00:18:41.663Z [SPX GC] error: Error in CasparCG server overlay: [404 CG ERROR
]
2021-10-28T00:18:42.917Z [SPX GC] error: Error in CasparCG server overlay: [404 CG ERROR
]

i have copied the template folder from SPX-GC to Caspar CG templates folder.

this is my config,json:

{
  "general": {
    "username": "",
    "password": "",
    "hostname": "",
    "greeting": "",
    "showusercommapass": "",
    "langfile": "english.json",
    "loglevel": "info",
    "logfolder": "C:/SPX-GC_1_0_14_win64/LOG/",
    "port": "5000",
    "dataroot": "C:/SPX-GC_1_0_14_win64/DATAROOT/",
    "templatefolder": "C:/SPX-GC_1_0_14_win64/ASSETS/templates/smartpx/Template_Pack_1",
    "templatesource": "spxgc-ip-address"
  },
  "casparcg": {
    "servers": [
      {
        "name": "overlay",
        "host": "localhost",
        "port": "5250"
      }
    ]
  },
  "globalExtras": {
    "customscript": "/ExtraFunctions/demoFunctions.js",
    "CustomControls": [
      {
        "ftype": "button",
        "bgclass": "bg_grey",
        "text": "Open KnowledgeBase",
        "fcall": "openWebpage('https://spxgc.tawk.help')",
        "description": "Custom control example"
      },
      {
        "ftype": "button",
        "bgclass": "bg_grey",
        "text": "Stop all",
        "fcall": "stopAll()",
        "description": "Animate all graphics out"
      },
      {
        "ftype": "button",
        "bgclass": "bg_black",
        "text": "PANIC",
        "fcall": "clearAllChannels()",
        "description": "Clear playout channels"
      }
    ]
  },
  "warning": "Modifications done in the GC will overwrite this file.",
  "smartpx": "(c) 2020-2021 Tuomo Kulomaa <[email protected]>",
  "updated": "2021-10-17T03:37:27.846Z"
}

Playout inconsistencies with textarea newlines

If using the textarea field type and json dataformat, newlines are parsed differently depending on if play or update command is used.

Template definition:

  window.SPXGCTemplateDefinition = {
      "description": "Textarea test",
      "playserver": "OVERLAY",
      "playchannel": "1",
      "playlayer": "10",
      "webplayout": "10",
      "steps" : "1",
      "out": "manual",
      "uicolor": "2",
      "dataformat": "json",
      "DataFields": [
        {
          "field": "f0",
          "ftype": "textarea",
          "title": "Content",
          "value": "",
        },
      ],
    };

Example input:
image

Value of f0 when using play: Test test test&lt;br&gt;Second line test

Value of f0 when using update: Test test test\nSecond line test

So on play(), the newline is converted to an escaped <br> tag, which seems to be happening here: https://github.com/TuomoKu/SPX-GC/blob/master/routes/routes-application.js#L1359-L1372

But for some reason, the same is not done on update(). This makes it hard to code template logic that detects newlines.

Fresh install on Pi. Cannot start.

Just cloned git repo onto a RPi 4 on Ubuntu
Ran "npm install".
On staring with "node ./server.js" the following error appears:

/usr/local/scripts/SPX/SPX-GC/server.js:972
if ( config.general?.disableSeveralControllersWarning==true ) {
^

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47

nodemon dev script fails to start

With ASSETS/* in the nodemon ignore list, the dev script fails to start because the wildcard is expanded by the shell. Switching to quoted ('ASSETS/*') or dropping the wildcard (ASSETS/) allows the dev script to start.

incorrect file paths after browsing on macOS

When browsing for a template file to add to a project, the application hangs and the following error appears in the nodejs console. It may not appear here, but there is a newline after .html and before the final '.

UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/path/to/templates/org/name/TEMPLATE.html '

Observed while running in nodejs v12.19.0 on macOS 10.15.

Killing process because of error Error: spawn chrome ENOENT

while starting script in linux, getting below

root@example:/home/ben# ./SPX-GC_linux64

GC 1.0.13 is starting. Closing this window/process will stop the server.

2021-06-07T11:27:48.134Z [SPX GC] info: START-UP INFORMATION:

SPX GC ................. Copyright 2020-2021 SmartPX [email protected]
Version ................ 1.0.13
License ................ MIT (see LICENSE.txt)
Homepage ............... https://spxgc.com
Template Store ......... https://spxgc.com/store
Knowledge Base ......... https://spxgc.tawk.help
Config file ............ /home/ben/config.json
Cfg / locale ........... english.json
Cfg / loglevel ......... info (options: error | warn | info | verbose | debug )
Cfg / dataroot ......... /home/ben/DATAROOT/
Cfg / template files ... /home/ben/ASSETS/templates/
Cfg / logfolder ........ /home/ben/LOG/
Cfg / lauchchrome ...... true
Cfg / templatesource ... http://1.1.1.1

See README.pdf and Knowledge Base for more info.

──────────────────────────────────
Open SPX-GC in a browser:
http://1.1.1.1:5000
──────────────────────────────────

Killing process because of error Error: spawn chrome ENOENT

SPX-GC exit! (Errorcode 5: Unspecified exit code)

Incorrect folder paths on MacOS

When GC is installed on Mac the DATAROOT-folder and config.json file is generated incorrectly to current user's home directory and not GC's root folder.

Workaround: when running GC for the first time the files and folders will be generated (and the program ends to an error). Close the process, move config.json and DATAROOT-folder to a correct location, modify config.json manually in text editor to the correct filepaths and restart the application.

Bug: Linux Build is invalid

Hey, just want to mention that in the Current Release Version the Linux build is invalid. The Zip-File is corupted.

I checked it both on a Windows Maschine and on a Linux Maschine.

image

v.1.0.8 does not work with v.1.0.6 templates.

I'm not sure if something has changed between v.1.0.8 and v.1.0.6, but templates that were working with v.1.0.6 are not working in v.1.0.8.

The CasparCG server says that play is not defined and update is not defined when playing the templates, and [webcg-framework] version 2.6.0 does not get printed in the console for my template, but does in v.1.0.6.

I think this may have something to do with the webcg-framework not loading? Interestingly, if I use the CasparCG Client, the template works fine.

OBS triggering

How would I load a project, rundown and trigger one or more templates from OBS/Streamdeck for full automation?

Example Template SPX1 Ticker Sheet Errors

Example Template SPX1 Ticker Sheet works ok in Web Playout preview but no in CasparCG.

Tested on CasparCG 2.3.0 LTS and 2.3.2 LTS Beta

In both versions Caspar throws error:

[2021-03-08 16:43:49.441] [error] html[http://192.168.15.44:5000/templates/smartpx/Template_Pack_1/SPX1_TICKER_SHEET.html] 1920 1080 50.000000 Log: Uncaught (in promise) TypeError: Cannot read property 'forEach' of undefined

Using chroma key as background

(moved from Discussions)

Changing background-color in spx_layout.css (either in body or in .SPXWindow) or uncommenting background-image and redirecting it to ../../../../media/images/bg/chroma.png apparently works – until you need to have more than one object on screen. This results in the other objects appearing behind the background and thus becoming invisible unless the chroma background is transparent – which would arguably defeat the purpose.

Any suggestions to workarounds? Or – any plans on officially supporting chroma backgrounds?

Issue with displaying template on CASPARCG using API/v1

SPX_GC version: 1.1.2
CASPARCG :2.3.x LTS
I have an issue where trying to playout a template (Namestrap three liner )using

http://192.168.20.11:5656/api/v1/directplayout

POST | v1.0.12 | Populate template and execute a play/continue/stop -command to it. Post request body example here as stringified JSON: {"casparServer": "OVERLAY", "casparChannel": "1", "casparLayer": "20", "webplayoutLayer": "20", "relativeTemplatePath": "/vendor/pack/template.html", "DataFields": [{field: "f0", value: "Lorem"},{field: "f1", value: "Ipsum"}]; "command": "play"} 

it works perfectly on web renderer or OBS,

But on casparcg, the template shows smaller (half size in width and in low resolution) and the prepopulated fields are not showing.

I tried it with a simple template that just displays clock and it is fine...

can we have a post version of this API:


method :GET

http://192.168.20.11:5656/api/v1/controlRundownItemByID?file=HelloWorld-project/My%20first%20rundown&item=1616702200909&command=play

with parameters for filling fields?

I had to resort to changing the html fields programmatically and then using this get
request to fire the ticker..

note: this workflow involves using an app to control SPX_GC using API requests.

Rundown with # in the name breaks the entire application

I am running 1.0.9 and I created a rundown eg: "Rundown #2"

Everything after the # is skipped internally:

Error: ENOENT: no such file or directory, unlink 'X:\SPX-GC\SPX-GC 1.0.9\DATAROOT__ProjectName__data\Rundown .json'

Note the "Rundown .json" file instead of "Rundown #2.json" - this spams errors in the node terminal and SPX GC no longer responds to commands.

Editing duplicated items (after sorting) overwrites incorrect items

SYMPTOM
When rundown items are sorted (by manually dragging), duplicated and edited, the edits may overwrite other item(s) on the rundown OR an error message may be shown in the statusbar and the rundown view becomes unresponsive.

WORKAROUND before fix:
Reload the view (Ctrl+R) after sorting items and before editing them.

Wrong item play/stop after drag-drop sorting

In some cases when items are deleted and/or sorted on the rundown the play/cont/stop commands effect the neighbouring item instead.

The root cause of this is the identification mechanism in the rundown view and it will need to be re-written to be based on UUID's, planned for 1.1.

Workaround: reload the view (F5 / Ctrl+R) after delete or sort.

Key/fill out of sync

Hello Mr. TuomoKu!

We are a small local TV station and we are currently testing your sw. But unfortunately we faced a small issue, and that is, key/fill are out of sync. We used Blackmagic Decklink Quad 2 video card. Configured outputs in config file with separate key and fill. Outputs from that card are then fed to the Blackmagic Atem video switcher with framestores, but that did not resolve our issues. We assume that the problem arises from that, because we have no reference signal for all video equipment (everything goes to the BM switcher with frame stores). Do you think this coud be the issue? Between key and fill, there is about 5 frames of delay. Thank you for your time and help!

Regards,

Primož Kikelj

Server Crash

After firing the .exe, I can open the Welcome web page. Going to the Project or Config page kills the process because of an error- operation not permitted... That's about all I can read before it closes.
The new page appears to open but the server has to be restarted.
Here's an error that didn;t close the server window:
2022-02-06T23:54:38.779Z [SPX] error: spx.writeFile - Error while saving: C:\Program Files\SPXGC\config.json: Error: EPERM: operation not permitted, open 'C:\Program Files\SPXGC\config.json'

Suggestion: Add runAnimationUPDATE function to spx_cmdhandler.

The template library spx_cmdhandler.js should have an optional runAnimationUPDATE(data) function fired with webcg.on('data', ...) handler.

That feels like a more natural way to get the variables instead of pulling them out from the HTML like it's done in SPX1_TICKER_EXCEL.html right now.

So instead of doing something like this:

let filename = document.getElementById('f0').innerText;

you could do something like this:

function runAnimationUPDATE(data){
   let filename = data.f0; // Store the value for later usage
}

Suggestion: Change Username in the Default Config

Hey, thanks for the Application. As someone who builded something lightly simular i really appreciate your effort.
But as i first started to use your Application, i was slightly confused about the "welcome" in the Username Box as i started to set it up. Going though your Source Code i realized you're generating it in the default-Config because you're using it to check if authorization is enabled or not.

But i would suguess changing it to admin rather than welcome and add two labels to the corresponding textboxes. If you would be happy with that, i would be glad to make the changes and add a pull-request.

image

writeFile, writeTextFile and renameRundown are unsafe

All of these functions follow this pattern:

try {
    return new Promise(resolve => {
      // ... do stuff
      resolve()
    )
} catch (error) {
  logger.error('spx.writeFile - Error while saving: ' + filepath + ': ' + error);    
  return 
}

The try block will never fail, as the promise doesn't execute immediately

It should be:

return new Promise((resolve, reject) => {
  try {
    // ... do stuff
    resolve();
  } catch (error) {
    logger.error('spx.duplicateFile - Error while duplicating: ' + fileRefe + ': ' + error);    
    reject();
  }
})

Issue with rundown item duplication

SPX 1.1.0
Win10

Expected behavior: When you click the duplicate icon on a rundown item the item and its properties are copied below the original item and can be edited and played out independently from the original.

Current behavior: When you click the duplicate icon on a rundown item a new "empty" rundown item is created below the original. Playing the "empty" item plays the first item in the rundown.

Steps to reproduce: Download SPX 1.1.0 for Windows 10, unpack and run SPX, open HelloWorld project/My first rundown, duplicate any item on the rundown and play the duplicated item.

Template file browser is empty

In some situations, SPX 1.0.15 clears the file/folder list in the Project Settings view. A workaround is to restart SPX.

This will be fixed in the next release.

Companion 3.xx - SPX module

I just decided to update my OBS studio from 27.2.4 with Companion 2.4.2 and installed OBS 30.0.2 and updated Companion to 3.1.2 Unfortynatly the SPX module was not updated and has stopped working.
I wonder if there is a solution to get it to work? I can understand it is hard to follow all the updates coming from Bitfocus.
If there is no update planned I wonder if you know the latest Companion version that works. Or do I have to go back to 2.4.2?

Duplicating rundowns unsafe

When duplicating a rundown the template itemIDs rename the same, causing issues if both the original and copy rundowns are open.

Also, creating a duplicate of a rundown twice will cause only 1 copy to be created which overwrites the first.

I'm creating a PR for this, creating this issue for posterity

How to Update installation

I would like there to be a way of updating my excisting installation. Now I have to create a new installation (in a new folder) and then do a lot of manual work (renaming/moving files etc) to get ASSETS and DATAROOT to have the same content and the same links as they had before the update

GetJsonData is unsafe

When using this function there's no easy way to tell if the return value is a valid JSON or an error, so API routes like /saveauthpolicy for example could destroy a profile if the GetJSONData function failed

From what I can tell there's several of these routes that could replace rundown & profile .json files with an error string

Browser url in config shows incorrect IP on VM instances

On VM based installations the IP address shown in config/browser url is the "internal IP" when it should be the "external IP". Need to refactor this from serverside to client side.

Workaround: copy URL from browser and add /renderer after IP:PORT.

https ssl support

Is there any ssl support implemented or perhaps suggestions to proxy through nginx?
Thank you

SPX Crash on template reload/add

I am currently rewriting my templates for publishing and it occured during "reload" or "add template" SPX exits with Errorcode 5. I am trying to get an idea where this error comes from.

Using loglevel debug I get:

2022-01-18T16:32:57.735Z [SPX] verbose: CheckLogin: No username in config, authorize "default" user...
2022-01-18T16:32:57.736Z [SPX] verbose: Adding new stuff to profile rtr/countdown
2022-01-18T16:32:57.736Z [SPX] debug: GetJsonData: returns data from [D:\Software\Stream\environment\spx-cg\DATAROOT\RTR\profile.json]
2022-01-18T16:32:57.737Z [SPX] verbose: Added template: D:\Software\Stream\environment\spx-cg\ASSETS\templates\rtr\countdown\RTR_COUNTDOWN.html
2022-01-18T16:32:57.781Z [SPX] debug: FYI: spx.talk function is DISABLED. [Writing file]
Killing process because of error TypeError: Cannot read property '_ownerDocument' of undefined
2022-01-18T16:32:57.783Z [SPX] verbose: spx.writeFile - File written OK: D:\Software\Stream\environment\spx-cg\DATAROOT\RTR\profile.json
2022-01-18T16:32:57.794Z [SPX] verbose: CheckLogin: No username in config, authorize "default" user...
2022-01-18T16:32:57.795Z [SPX] debug: GetJsonData: returns data from [D:\Software\Stream\environment\spx-cg\DATAROOT\RTR\profile.json]
2022-01-18T16:32:57.878Z [SPX] debug: Generating webplayout options. This selection: 6.
2022-01-18T16:32:57.878Z [SPX] debug: Generating out options. This selection: manual.
2022-01-18T16:32:58.022Z [SPX] verbose: *** Socket connection (ZRG5VceNAlnZphx7AAAH) Connections: 3
2022-01-18T16:32:58.025Z [SPX] verbose: System utilities / {"command":"CHECKCONNECTIONS","server":""}
2022-01-18T16:32:58.025Z [SPX] debug: CCGServersConfigured: Yes at least one CasparCG server in config.
2022-01-18T16:32:58.025Z [SPX] verbose: checkServerConnections -function excecuting...

Using loglevel info I get:

Killing process because of error TypeError: Cannot read property '_ownerDocument' of undefined
SPX exit! (Errorcode 5: Unspecified exit code)

After restarting SPX the template works as it should, using the WebCG Devtools I don't get any error... how can I find out what I am doing wrong?

None -typed items get stuck to "on-air" status

Rundown elements can have an out mode of type "none", which means the item does not expect a "stop" command, but the template itself handles out-animations. Think of a bumper: it comes on, and goes off on it's own.

Now in some instances the "none" item's play indicator is turned on and never turned off. GC should ignore "none" typed items and not write their onair state to the rundown file.

Mac Install - cannot make file executable

This is likely more a Mac issue than with SPX-GC (sorry):
When following the install instructions for Mac OS (Big Sur) using the pre-built package, the file SPX-GC_macos64 is seen as a document rather than an executable.

The readme instructions suggest fixing this with the command: sudo chmod +x SPX-GC_macos64

However, this fails for me, with the response: chmod: Unable to change file mode on SPX-GC_macos64: Operation not permitted

Is there a missing step to sort this?

Many thanks,
Gareth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.