Sign In Register

How can we help you today?

Start a new topic

com.gamesparks.scripting.data.impl.SparkDataResultImpl cannot be cast to com.gamesparks.scripting.data.SparkDataGetResult

 Hello!


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.

Kind regards.


2 people have this question

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.


I solved.
Check your 'myPlayerID'.

https://docs.gamesparks.com/documentation/data-explorer/data-type-explorer.html

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

We are facing an issue with FATAL error:

com.gamesparks.scripting.data.impl.SparkDataResultImpl cannot be cast to com.gamesparks.scripting.data.SparkDataGetResult

var item = dataService.getItem(Key,playerId); //Error at this line


This error cause our players data wipe out and all of our systems fails.
Need urgent help.

Login to post a comment