Sign In Register

How can we help you today?

Start a new topic

Custom LogEvents are UKNOWN in live configuration

We're just about to submit a release candidate of our game, but after I've created a GameSparks configuration for the launch and published it using the GameSparks developer portal, I get a response saying '{"eventKey":"UNKNOWN"}' everytime I send a LogEventRequest.

I'm running the game in Unity and when I have the 'Preview Build' option ticked in the GameSparksSettings, everything works fine, but as soon as I untick that one, I get the above mentioned error. What am I missing here?

Any input and help is appreciated, as we're in quite a hurry to get this done and we've got no clue what's wrong.



2 people have this question

Hi Heino

I can see you have copied over a snapshot and published it on the portal.

Can you make sure the API key and secret in your Unity project are the same as your live game with the live snapshot on the portal. 



Hey Katie,
I'm working with Heino on that one.
I'm positive that the Api Key and the Api Secret are exactly the same as in the portal. When we press the 'Test Configuration' button in Unity, we properly connect to the servers. The Device Authentication also works flawlessly - it's just our own LogEventRequests that are failing, which never happens in the Previews.


Hi all

Could you try setting up a new user in the test harness of the live game and calling a logEventrequest from the Test Harness.

Let me know the response that you get.



Everything works very well on the TestHarness and in Unity, as long as the 'Preview' checkbox is checked.
Response I get in TestHarness (after a successful DeviceAuthentication):

 "@class": ".LogEventResponse",
 "scriptData": {
  "userId": "57b482c692c95a70de9bbdda"

For comparison, this is what we get if we uncheck the 'Preview' box:

GS: SEND:{"@class":".LogEventRequest","eventKey":"ourEventKey","additionalData1":"datadata","additionalData2":"datadata","requestId":"636070520187866339_1"}
GS: RECV:{"@class":".LogEventResponse","error":{"eventKey":"UNKNOWN"},"requestId":"636070520187866339_1"}


Hi all

It looks like the unity build is pointing towards the dev game where the latest snapshot was not published but copied to a new game and published there

Since it has copied to a new game you would need to change the api key  and secret in Unity or publish the latest snapshot on dev.



I'm not sure if I'm understanding it correctly, but I'll try to describe it in details what we have done and what we'd like to do. Basically, we've been running a development configuration for a while, which we've used for development and testing of the game. We want to keep this configuration separate from our live configuration, so we can continue to do development on the development configuration without messing with the live configuration.

What we tried to do yesterday was to create a snapshot of the most recent development configuration and then copy it to the live configuration. Once it was copied to the live configuration, we published the snapshot on the live configuration and changed the API key and API secret in our Unity project to point at the live configuration.

When testing the game in the editor everything works fine when we have the 'Preview Build' flag ticked in the GameSparks Settings, both when using our development configuration and our live configuration. However, when we untick the 'Preview Build' flag, we get the error described above. It obviously wont work with the development configuration, but I checked again this morning and the API key and API secret is set to the values of our live configuration in the GameSparks settings in Unity, but we still get the error.

As Michal also explained, the regular, built-in GameSparks events goes through nicely. For instance we're sending the AuthenticatedConnectRequest, DeviceAuthenticationRequest and AccountDetailsRequest, which all receives the proper response from GameSparks, when running with the live configuration in non-preview mode. However, whenever we send a LogEventRequest with any of the events we've defined in our configuration, we simply receive the response that the event key is unknown. As Michal also explained, these custom events also goes through nicely on the test harness, so the events and their cloud code clearly exist, they just appear to be unknown when running non-preview in Unity.


Hi All

After you uptick preview build, Can you click the "Get My Custom SDK" underneath.
Let know if the error continues



Clicking the "Get My Custom SDK" didn't make a difference. Still got the exact same error.
Strangely though, I tried to just make a new snapshot copy and publish that and then it works! I did the exact same thing I did before, only that we now have two (similar) snapshots in our live configuration. One that works and one that doesn't.


Follow-up question: Is it save to delete the live configuration we've already made and then create a new one? Just to make sure that all tests we've done during the past few days in attempting to get it working is actually cleared. I mean, actually deleting the GameSparks game and creating a new one with another API key and API secret.


Having the same issue here, everything is working but ListGameResponse() returns empty. Have screenshot for a live build and api keys and secrets, facebook app ids etc in proper order. Not only does ListGameResponse() return empty in the Unity editor build, it also returns empty in the test harness when switched to live. Any help appreciated.

We are experiencing the exact same issue. Copied snapshot from another game, everything works ok in "Preview" mode, but fails on "Live" mode with eventKey : "UNKNOWN".

Help would be much appreciated over here.



A common mistake that people make is that they publish a snapshot to live and then create a new event. They then expect this event to work on live but as it was created after the snapshot was published they get the above error. So the first thing to do here is to create and publish a new snapshot and then try to send the event again.



We've found a workaround:
Click on "Revert to snapshot" on the copied snapshot and then publish the backup snapshot that was created. This will make the events callable.

Login to post a comment