We are having issues getting the real-time datasets to work on our players. We have a fresh deployment of the CMS (Docker-4.2.1), running the latest Android version on our DSCS9 players (7.1.2w) with zero customization.
We’ve followed along with your Hello World guide here (Data Connector - Hello World | Xibo Digital Signage) and are able to verify that everything is working as it should when previewing things in the Layout Editor with another tab open. However, once we actually schedule the Data Connector and the Layout to the player, no data is received.
We turned on debug logs and have not seen any errors whatsoever. There are no blocks from what we can tell on any firewalls, either. We’re not really sure where to go from here.
Is there something missing from the documentation that would be needed in order to get this to work?
How can we figure out what component is failing?
To us, it would appear as though the data connector is not seeing itself as active, thus never begins to even populate any data.
We found a bug with this, which were hoping to release soon. The issue is with the dataKey being a string. If you’re happy to try a beta release of v4 R407 then you can get it here.
Hi @dan – The Beta release appears to have fixed the problem on our Android players. Thanks a bunch!
We’ve marked your reply as the solution, but wanted to make sure that you had eyes on this as well:
You may already be aware of this, but we were also testing this on a Windows player and noticed that as soon as the Data Connector was scheduled to it, it invalidated the layout with the following error:
Quick update: I can confirm that this doesn’t always crash the layout and cause the error above. It must have a similar issue to the Android client, as the latest Windows client doesn’t work with the Hello World example either with the current release.
That being said, the error above seems to happen, I believe, when there is an issue with the null set.
A snippet of our extrapolation on your Hello World example looks a bit like this:
async function getData(url) {
var jsonData = "";
let requestOptions = {
method: 'GET',
redirect: 'follow'
}
var jsonData = await fetch(url,requestOptions)
.then(response => response.json());
return jsonData;
}
window.onInit = function() {
setInterval(function() {
//This URL returns a JSON object, such as {"name":"Charles","location":"Airport"}
const url_now = "https://<url>/";
...
//Other URLS
...
getData(url_now).then(
function(value) {
console.log(value.name);
xiboDC.setData('now',value.name, {
done: function() {
xiboDC.notifyHost('now');
}
});
}
);
//other functions like the one above that call other URLs and notify other embedded elements in the same layout
}, 5000);
};
This is currently working now for the Android player, but after having the Hello World example scheduled to the Windows player for a few minutes, it goes back to the Xibo splash screen and shows the same Unable to load schedule from disk: Object reference not set to an instance of an object. error. I assumed that for our example, it had to do with returning something that is not a string, such as when the string is empty or other ones where an array was returned instead of a string accidentally.