"CG 1-19 ADD 1 "CRAWL_NORMAL" 1 ''\r\n" - "Missing parameter. Check syntax" error

Hi. I’m using CasparCG Server 2.3.2 4de6d18f Dev x64 in conjuction with TVPlay. I was previously using the TVP fork of CasparCG, but due to problems with “Flash call failed” I had to switch to the main branch. I’m trying to run the command “CG 1-19 ADD 1 “CRAWL_NORMAL” 1 ‘’\r\n” which should load a .ft template in the templates folder, and the “Missing parameter. Check syntax” error occurs. I don’t know what causes the problem. Does anybody have a solution?
Here are the logs:

[2023-04-18 19:01:30.994] [info]    ############################################################################
[2023-04-18 19:01:30.994] [info]    CasparCG Server is distributed by the Swedish Broadcasting Corporation (SVT)
[2023-04-18 19:01:30.994] [info]    under the GNU General Public License GPLv3 or higher.
[2023-04-18 19:01:30.994] [info]    Please see LICENSE.TXT for details.
[2023-04-18 19:01:30.994] [info]    http://www.casparcg.com/
[2023-04-18 19:01:30.994] [info]    ############################################################################
[2023-04-18 19:01:30.994] [info]    Starting CasparCG Video and Graphics Playout Server 2.3.2 4de6d18f Dev
[2023-04-18 19:01:31.131] [info]    Initializing OpenGL Device.
[2023-04-18 19:01:31.136] [info]    Initialized OpenGL 4.5.0 NVIDIA 516.94 NVIDIA Corporation
[2023-04-18 19:01:31.137] [info]    Initialized image module.
[2023-04-18 19:01:31.138] [info]    Initialized ffmpeg module.
[2023-04-18 19:01:31.138] [info]    Initialized oal module.
[2023-04-18 19:01:31.138] [info]    Initialized decklink module.
[2023-04-18 19:01:31.138] [info]    Initialized screen module.
[2023-04-18 19:01:31.138] [info]    Initialized newtek module.
[2023-04-18 19:01:31.175] [info]    Initialized html module.
[2023-04-18 19:01:31.175] [info]    Flash support is disabled
[2023-04-18 19:01:31.175] [info]    Initialized flash module.
[2023-04-18 19:01:31.177] [info]    Initialized bluefish module.
[2023-04-18 19:01:31.177] [info]    "C:/Users\Admin\Downloads\Compressed\TVPlay_1.7.8397\1.7.8397\CasparCG\casparcg.config":
[2023-04-18 19:01:31.177] [info]    -----------------------------------------
[2023-04-18 19:01:31.177] [info]    <?xml version="1.0" encoding="utf-8"?>
[2023-04-18 19:01:31.177] [info]    <configuration>
[2023-04-18 19:01:31.177] [info]       <log-level>info</log-level>
[2023-04-18 19:01:31.177] [info]       <paths>
[2023-04-18 19:01:31.177] [info]          <media-path>C:\transmisja</media-path>
[2023-04-18 19:01:31.177] [info]          <log-path>log\</log-path>
[2023-04-18 19:01:31.177] [info]          <data-path>data\</data-path>
[2023-04-18 19:01:31.177] [info]          <template-path>templates\</template-path>
[2023-04-18 19:01:31.177] [info]          <thumbnails-path>thumbnails\</thumbnails-path>
[2023-04-18 19:01:31.177] [info]       </paths>
[2023-04-18 19:01:31.177] [info]       <thumbnails>
[2023-04-18 19:01:31.177] [info]          <generate-thumbnails>false</generate-thumbnails>
[2023-04-18 19:01:31.177] [info]          <width>1980</width>
[2023-04-18 19:01:31.177] [info]          <height>1080</height>
[2023-04-18 19:01:31.177] [info]          <video-grid>2</video-grid>
[2023-04-18 19:01:31.177] [info]          <scan-interval-millis>5000</scan-interval-millis>
[2023-04-18 19:01:31.177] [info]          <generate-delay-millis>2000</generate-delay-millis>
[2023-04-18 19:01:31.177] [info]          <video-mode>1080p5000</video-mode>
[2023-04-18 19:01:31.177] [info]       </thumbnails>
[2023-04-18 19:01:31.177] [info]       <channels>
[2023-04-18 19:01:31.177] [info]          <channel>
[2023-04-18 19:01:31.177] [info]             <video-mode>1080p5000</video-mode>
[2023-04-18 19:01:31.177] [info]             <channel-layout>stereo</channel-layout>
[2023-04-18 19:01:31.177] [info]             <consumers>
[2023-04-18 19:01:31.177] [info]                <screen/>
[2023-04-18 19:01:31.177] [info]                <ndi/>
[2023-04-18 19:01:31.177] [info]             </consumers>
[2023-04-18 19:01:31.177] [info]          </channel>
[2023-04-18 19:01:31.177] [info]       </channels>
[2023-04-18 19:01:31.177] [info]       <controllers>
[2023-04-18 19:01:31.177] [info]          <tcp>
[2023-04-18 19:01:31.177] [info]             <port>5250</port>
[2023-04-18 19:01:31.177] [info]             <protocol>AMCP</protocol>
[2023-04-18 19:01:31.177] [info]          </tcp>
[2023-04-18 19:01:31.177] [info]       </controllers>
[2023-04-18 19:01:31.177] [info]       <osc>
[2023-04-18 19:01:31.177] [info]          <default-port>6250</default-port>
[2023-04-18 19:01:31.177] [info]       </osc>
[2023-04-18 19:01:31.177] [info]    </configuration>
[2023-04-18 19:01:31.177] [info]    -----------------------------------------
[2023-04-18 19:01:31.186] [info]    Initialized OpenGL Accelerated GPU Image Mixer for channel 1
[2023-04-18 19:01:31.186] [info]    video_channel[1|1080p5000] Successfully Initialized.
[2023-04-18 19:01:31.187] [info]    Screen consumer [1|1080p5000] Initialized.
[2023-04-18 19:01:31.191] [info]    Loaded "C:\Program Files\NDI\NDI 5 Runtime\v5\Processing.NDI.Lib.x64.dll"
[2023-04-18 19:01:31.330] [info]    ndi_consumer[1|CasparCG] Initialized.
[2023-04-18 19:01:31.330] [info]    Initialized channels.
[2023-04-18 19:01:31.331] [info]    Initialized controllers.
[2023-04-18 19:01:31.331] [info]    Initialized osc.
[2023-04-18 19:01:34.267] [info]    async_event_server[:5250] Accepted connection from 127.0.0.1 (1 connections).
[2023-04-18 19:01:34.268] [info]    Received message from 127.0.0.1: TLS\r\n
[2023-04-18 19:01:34.268] [info]    Received message from 127.0.0.1: LOADBG 1-16 "Koło fortuny S3 odc 002 11 09 2017" SEEK 24031 LENGTH 85014 MIX 3 LINEAR RIGHT 0\r\n
[2023-04-18 19:01:34.268] [info]    Received message from 127.0.0.1: PLAY 1-16\r\n
[2023-04-18 19:01:34.268] [info]    Received message from 127.0.0.1: MIXER 1-16 VOLUME 1 0 LINEAR\r\n
[2023-04-18 19:01:34.268] [info]    Received message from 127.0.0.1: LOADBG 1-17 "Bez nazwy" MIX 3 LINEAR RIGHT 0\r\n
[2023-04-18 19:01:34.268] [info]    Received message from 127.0.0.1: PLAY 1-17\r\n
[2023-04-18 19:01:34.268] [info]    Received message from 127.0.0.1: MIXER 1-16 VOLUME 1 0 LINEAR\r\n
[2023-04-18 19:01:34.268] [info]    Received message from 127.0.0.1: VERSION\r\n
[2023-04-18 19:01:34.272] [info]    Sent message to 127.0.0.1:202 LOADBG OK\r\n
[2023-04-18 19:01:34.272] [info]    Sent message to 127.0.0.1:202 PLAY OK\r\n
[2023-04-18 19:01:34.272] [info]    Sent message to 127.0.0.1:202 MIXER OK\r\n
[2023-04-18 19:01:34.295] [info]    image_producer[C:\transmisja/Bez nazwy.png] Initialized
[2023-04-18 19:01:34.297] [info]    Sent message to 127.0.0.1:202 LOADBG OK\r\n
[2023-04-18 19:01:34.297] [info]    Sent message to 127.0.0.1:202 PLAY OK\r\n
[2023-04-18 19:01:34.297] [info]    Sent message to 127.0.0.1:202 MIXER OK\r\n
[2023-04-18 19:01:36.291] [error]   Failed to connect to media-scanner. Is it running? 
[2023-04-18 19:01:36.291] [error]   Reason: Connection refused
[2023-04-18 19:01:36.291] [info]    Sent message to 127.0.0.1:501 TLS FAILED\r\n
[2023-04-18 19:01:36.291] [info]    Sent message to 127.0.0.1:201 VERSION OK\r\n2.3.2 4de6d18f Dev\r\n
[2023-04-18 19:01:36.291] [info]    Received message from 127.0.0.1: INFO\r\n
[2023-04-18 19:01:36.291] [info]    Sent message to 127.0.0.1:200 INFO OK\r\n1 1080p5000 PLAYING\r\n\r\n
[2023-04-18 19:01:36.292] [info]    Received message from 127.0.0.1: MIXER 1 CLEAR\r\n
[2023-04-18 19:01:36.292] [info]    Received message from 127.0.0.1: CG 1 CLEAR\r\n
[2023-04-18 19:01:36.292] [info]    Sent message to 127.0.0.1:202 MIXER OK\r\n
[2023-04-18 19:01:36.292] [info]    Received message from 127.0.0.1: MIXER 1 MASTERVOLUME 1.000\r\n
[2023-04-18 19:01:36.292] [info]    Sent message to 127.0.0.1:202 CG OK\r\n
[2023-04-18 19:01:36.292] [info]    Sent message to 127.0.0.1:202 MIXER OK\r\n
[2023-04-18 19:02:36.865] [info]    Received message from 127.0.0.1: PLAY 1-19 EMPTY MIX 25\r\n
[2023-04-18 19:02:36.866] [info]    color[EMPTY] Initialized
[2023-04-18 19:02:36.868] [info]    Sent message to 127.0.0.1:202 PLAY OK\r\n
[2023-04-18 19:02:37.832] [info]    Received message from 127.0.0.1: CG 1-19 ADD 1 "CRAWL_NORMAL" 1 ""\r\n
[2023-04-18 19:02:37.833] [error]   Missing parameter. Check syntax. Turn on log level debug for stacktrace.
[2023-04-18 19:02:37.833] [info]    Sent message to 127.0.0.1:402 CG ADD FAILED\r\n
[2023-04-18 19:02:58.808] [info]    Received message from 127.0.0.1: PLAY 1-19 EMPTY MIX 25\r\n
[2023-04-18 19:02:58.808] [info]    color[EMPTY] Initialized
[2023-04-18 19:02:58.810] [info]    Sent message to 127.0.0.1:202 PLAY OK\r\n
[2023-04-18 19:02:59.728] [info]    Received message from 127.0.0.1: CG 1-19 ADD 1 "CRAWL_NORMAL" 1 ""\r\n
[2023-04-18 19:02:59.728] [error]   Missing parameter. Check syntax. Turn on log level debug for stacktrace.
[2023-04-18 19:02:59.728] [info]    Sent message to 127.0.0.1:402 CG ADD FAILED\r\n

You don’t send any data to the template, but that should not trigger an error…

The problem is that you send empty string at the end. I just tested, that with the “” it returns this error, while without it it is working fine.

Thank you! Unfortunately it’s not directly me issuing those commands, but they come from TVPlay. The CgElementsControllers.xml which the program uses has the command “CG CG3 ADD 1 CRAWL_NORMAL 1”. Why does it add an additional empty string and how I can prevent that? I can attach the xml and dll file for the plugin if it’s neccessary.