question

adbourdages avatar image
adbourdages asked

Bug report: Unity SDK, leaderboard SubmitScore error handling

I get this error message when trying to submit a score: E/Unity ( 3231): Failed to call function [submitScoreFailed] of class [AmazonLeaderboards] E/Unity ( 3231): Calling function [submitScoreFailed] with 1 parameter but the function requires 2. The function names and class names are my own of course. This happens immediately after a call to AGSLeaderboardsClient.SubmitScore(id,score); I set the events the following way, which is how the SDK knows about my function name and class. AGSLeaderboardsClient.SubmitScoreSucceededEvent += submitScoreSucceeded; AGSLeaderboardsClient.SubmitScoreFailedEvent += submitScoreFailed; The event SubmitScoreFailedEvent is of type Action , so clearly it requires 2 parameters. However, somewhere deep down the SDK, there is some reflection applied, function and class names pulled out and a SendMessage() happens. However, they provide a single parameter at that point... Here is the value of the parameter the SDK is trying to send: {"error":"UNRECOVERABLE","leaderboardId":"myid"} I have a work around, but that's still a bug. In case other people have the same problem, here is how you can fix it: add another function with the exact same name as the one provided to the AGSLeaderboardsClient.SubmitScoreFailedEvent event, but accept only 1 parameter. Full example below: private void submitScoreFailed(string arg0){ submitScoreFailed(arg0, "Bad call from the amazon SDK - no error available"); } private void submitScoreFailed(string leaderboardId, string error){ Debug.Log("Submit score failed: " + leaderboardId + ". Error: " + error ); AGSLeaderboardsClient.SubmitScoreSucceededEvent -= submitScoreSucceeded; AGSLeaderboardsClient.SubmitScoreFailedEvent -= submitScoreFailed; } Message was edited by: adbourdages
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
HI Adbourdages, Thank you for writing to us. This issue was regressed in the older version of unity plugin and fixed in latest one. Can you please make sure that you are using latest version of GameCircle Unity SDK?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

adbourdages avatar image
adbourdages answered
Thanks for the quick reply. Here are the version numbers from the Unity project: Amazon GameCircle Unity Plugin Version 2.1.0 Amazon GameCircle SDK Version 2.1.0 Amazon Insights SDK Version 2.0.24 Is this the latest version? According to the download page it is. Best, Alain-Daniel
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bipin@Amazon avatar image
Bipin@Amazon answered
Looping same error message(UNRECOREVABLE error) thread https://forums.developer.amazon.com/forums/thread.jspa?threadID=1626
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

adbourdages avatar image
adbourdages answered
Hello, It doesn't look like the same error. One is happening with Unity (this thread) and the other one in a java project with the android SDK called directly. For Unity, I get UNRESOLVABLE *always* on all test devices. For Java, I only get UNRESOLVABLE on the Kindle 1st gen. So, not the same issue. Would appreciate guidance on this. Best, Alain-Daniel
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.