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

Privacy Policy   Terms of Service