I've been getting this error in the logs recently, and I'm not really sure what is causing it.
The code is something like that:
var db = Spark.getGameDataService();
var dbItem = db.getItem("saveGames", myPlayerID); // this line throws the exception: com.gamesparks.scripting.data.impl.SparkDataResultImpl cannot be cast to com.gamesparks.scripting.data.SparkDataGetResult
The code it's executed in a bulk job for every user, scheduled from System/Every Minute cloud code. Is there any problem with that?
Thanks in advance.
It seems to be internal error of GameSparks.
I also have been getting same error on Live stage, even not excuted in a Job or Scheduler.
Check your 'myPlayerID'.
ID – Enter an ID for the document:
You must enter at least one alphanumeric character for the ID.
You cannot use the underscore or pipe (│) characters for the ID.
The IDs seems to be fine (thanks anyway). It would be nice if the documentation enumerates the common exceptions thrown by the methods...
I also have the same problem. It seems to happen randomly. Did you find out why this happens?
No clue yet. Hope this only happens in the preview version