Singular.live html rendering - unexpected end of JSON input

I am new to singular.live, but it looks like an incredibly powerful tool, in combination with casparcg. It’s relatively easy to build a template (without any css/html knowledge) and feed it with dynamic data.

I am trying to render a singular.live HTML composition that uses Google Sheets as a data source. In my browser (chrome, safari. on Mac/Win) the template works flawlessly.

But when I load the html page in casparcg 2.3.0 or 2.3.1 on windows 10, I am getting “Uncaught Exception: Unexpected end of JSON input” in the CasparCG console. The page is incomplete and actual data from the google sheet is not shown.

When I look (in chrome developer tools) at the JSON that Google returns, everything looks fine and the JSON validates.

Has anyone else had trouble with casparcg and json for an html page? Maybe even specifically with Google Sheets content? Any idea for a workaround?

1 Like

If it’s loading something from Google Sheets that isn’t public you most definitely aren’t logged in via Caspar but are in the browser.

Interesting thought, thanks for the suggestion!

But I connect to google via the api with a special API key. I have tested the page on other computers/browsers where I am definitely not logged into Google.

Maybe the CEF in CasparCG is outdated or somehow not compatible with the google API? Or with the required authentication?
Someone from Singular tested the page on OBS without issues.

console.log out the fetch/XHR reply for the sheets api call. “Unexpected end of JSON input” usually indicates you are not getting JSON (more likely something like text like “Not authorized”).

@gerbrand I am having the same problem and I would like to know if you were able to solve the situation.
Thanks in advance

You can get singular.live and CasparCG to work together beautifully with the following workaround.

Download the free singular.live recast for NDI application (windows) from Singular.live Recast for NDI
You can install and run this on the CasparCG server computer. Enter the singular.live output url in Recast and click start.

Verify the NDI url with the free NDI Tools Studio Monitor software.

Then give the following CasparCG ACMP command:

PLAY 1-10 “ndi://server/stream”

Example:
PLAY 1-10 “ndi://CASPARCG01/cef-ndi”

This works beautifully. With fill and key if the outputs are configured correctly in caspar.