Sign In Register

How can we help you today?

Start a new topic
Answered

NoSQL from Cloud Code: All collections empty

Good morning,


I have an event that is called via LogEventRequest that returns some data stored in NoSQL. A few days ago this worked as intended. It is just a test, but the code is:


var collection = Spark.runtimeCollection('script.boards');

//Todo: Get Board id from match

var boardDocument = collection.findOne({});


Spark.setScriptData("board", boardDocument);

The problem is that now this is always returning an empty object. The collections is, actually, not empty and through the NoSQL explorer I can see that. Moreover, I've changed the collection to which this is accessing and setting it to search players "Spark.runtimeCollection('player')" and it's also empty. I tried to log the collection.count() and the result is 0.

I also tried to do this search in a different message just in case, and it's also empty.

We tried this through DeviceAuthentication and normal authentication in both C++ SDK and TestHarness.


Any ideas?


Thanks and best.


Best Answer

Hi Ignacio,


Glad to hear this is working for you now. Our status page reported no outages at that time as you can see here. Can you confirm everything is ok at your end now ? 


Thanks,

Liam


Fixed, it seems that the way to get the collection is:

Spark.runtimeCollection('boards');

 

I would have sworn that it worked some days ago.

Answer

Hi Ignacio,


Glad to hear this is working for you now. Our status page reported no outages at that time as you can see here. Can you confirm everything is ok at your end now ? 


Thanks,

Liam

Yeah, everything fixed.


Thanks and best,

Ignacio

Login to post a comment