create-caspar-graphics icon indicating copy to clipboard operation
create-caspar-graphics copied to clipboard

Got errors in the log when trying example?

Open 7u5a opened this issue 1 year ago • 11 comments
trafficstars

I get these errors in my log, when trying your example template

[2024-01-26 16:22:16.090] [info] Received message from 127.0.0.1: CG 1-20 ADD 0 "EXAMPLE" 1 "<templateData><componentData id="name"><data id="text" value="Tue Sandbæk"/></componentData></templateData>"\r\n [2024-01-26 16:22:16.090] [info] Sent message to 127.0.0.1:202 CG OK\r\n [2024-01-26 16:22:16.095] [info] html[file://C:\casparcg-server-v2.3.3-lts-stable\template/EXAMPLE.html] Destroyed. [2024-01-26 16:22:16.245] [info] html[file://C:\casparcg-server-v2.3.3-lts-stable\template/EXAMPLE.html] 1920 1080 50.000000 Log: Qg.update({ [2024-01-26 16:22:16.245] [info] "name": { [2024-01-26 16:22:16.245] [info] "text": "Tue Sandbæk" [2024-01-26 16:22:16.245] [info] } [2024-01-26 16:22:16.245] [info] }) [2024-01-26 16:22:16.245] [info] html[file://C:\casparcg-server-v2.3.3-lts-stable\template/EXAMPLE.html] 1920 1080 50.000000 Log: Qg.play() [2024-01-26 16:22:16.252] [error] html[file://C:\casparcg-server-v2.3.3-lts-stable\template/EXAMPLE.html] 1920 1080 50.000000 Log: Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Btext%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings. [2024-01-26 16:22:16.252] [error] html[file://C:\casparcg-server-v2.3.3-lts-stable\template/EXAMPLE.html] 1920 1080 50.000000 Log: Uncaught Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Btext%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

What do i miss?

7u5a avatar Jan 26 '24 15:01 7u5a

You're sending name as an object, but you probably want it to be a string? Or use name.text in your template?

tobiasandersen avatar Jan 27 '24 09:01 tobiasandersen

I was testing this example.zip example.zip Did'nt change anything, just build it from your create-caspar-graphics

7u5a avatar Jan 27 '24 22:01 7u5a

By the way. When I try to run this template with Caspar CG Client, I get these errors. But when I do it with SuperConductor, there is no problem. Why is that?

7u5a avatar Jan 27 '24 23:01 7u5a

The problem is how the data is sent. The template is expecting name to be a string, but you're sending an object that contains a property text (which is a string).

tobiasandersen avatar Jan 28 '24 14:01 tobiasandersen

I did'nt know, but I've found the error. image Had to check this box...

7u5a avatar Jan 28 '24 20:01 7u5a

It could be that the XML parsing is wrong here, I've never used it myself. When you used that data (as seen on your last picture), but didn't click "Send as JSON", you got the problem you originally posted?

tobiasandersen avatar Jan 29 '24 08:01 tobiasandersen

yes @tobiasandersen it seems it is when sending data not as json. If I need to be able to send data without json, is it then the template og is it the casparcg server?

7u5a avatar Feb 07 '24 00:02 7u5a

I think it should work better in [email protected]

tobiasandersen avatar Feb 07 '24 08:02 tobiasandersen

And what’s that, and where to find it?

7u5a avatar Feb 07 '24 23:02 7u5a

I'm referring to this package: https://www.npmjs.com/package/@nxtedition/graphics-kit. I released an update yesterday where this should be fixed.

tobiasandersen avatar Feb 08 '24 08:02 tobiasandersen

I'll try

7u5a avatar Feb 08 '24 08:02 7u5a