play-games-plugin-for-unity icon indicating copy to clipboard operation
play-games-plugin-for-unity copied to clipboard

AndoirdJNYHelper.GetSignature: using Byte parameters is obsolete, use SByte parameters instead.

Open elritualk opened this issue 3 years ago • 9 comments

Hi, i'm using Play Games Plugin version 0.10.12 on Unity version 2020.3.2f1. I use cloud load / save feature, and I have this warnings everytime I save or load a game from cloud.

AndroidJNYHelper.GetSignature: using Byte parameters is obsolete, use SByte parameters instead.
AndroidJNIHelper: converting Byte array is obsolete, use SByte array instead.

This messages come after I call:

byte[] data = PlayerManager.Instance.profile.ToBytes();
((PlayGamesPlatform)Social.Active).SavedGame.CommitUpdate(game, updatedMetadata, data, SavedGameWritten);

That calls AndroidSavedGameClient.cs from your plugin:

convertedMetadata.JavaContents.Call<bool>("writeBytes", updatedBinaryData)

When GPGS call this function is when the warnings appears.

For most players, including me, the cloud load / save feature works good anyway. But I got some other players that when try to load a saved game from cloud, they got a 0 bytes of data from:

((PlayGamesPlatform)Social.Active).SavedGame.ReadBinaryData(game, SavedGameLoaded);
public void SavedGameLoaded(SavedGameRequestStatus status, byte[] data) { ... }

What can I do? Thanks.

elritualk avatar Jul 02 '21 00:07 elritualk

It is just a warning. I am getting it too, but my Encoding.ASCII.GetBytes() and Encoding.ASCII.GetString() works fine.

neetish-borkar avatar Jul 05 '21 11:07 neetish-borkar

It is just a warning. I am getting it too, but my Encoding.ASCII.GetBytes() and Encoding.ASCII.GetString() works fine.

Yeah, for most of my players it is just a warning. But for a small part of them its a trouble and I think it may be related with this.

elritualk avatar Jul 05 '21 21:07 elritualk

@ozdemir08 Hi Mehmet, account to github search, there have been 3 issues submitted regarding this logspam warning in Unity 2020. It's been almost 8 months. What's the status on getting this fixed?

toxikman avatar Aug 31 '21 04:08 toxikman

same promblem here,and i dont konw how to fix it !!

kyleyiso avatar Jan 20 '22 07:01 kyleyiso

same promblem here,and i dont konw how to fix it !!

There is nothing to fix on your side, they have to change the parameter of the called method. The most you can do is hide the warning.

KyrXtz avatar Apr 05 '22 08:04 KyrXtz

@KyrXtz Hello, Hello, I also have the same problem. I think my guess is that it's because CommitUpdate() and ReadBinaryData() use a byte[] parameter. I don't think there is an API that uses sbyte[] instead of byte[]. Is there any way to modify that parameter? Or can you tell me the proper way to hide that warning?

Goisak100 avatar May 10 '22 21:05 Goisak100

Nearly two years later this issue is still present (occurs currently in latest release 0.11.01. When can we expect this to be resolved?

jzapdot avatar Oct 04 '22 15:10 jzapdot

Nearly two years later this issue is still present (occurs currently in latest release 0.11.01. When can we expect this to be resolved?

I suspect this Unity plug-in is now abandonware. 😞 The documentation copyright still says 2014 and this plug-in was never updated to use packages like the other Google SDKs. Probably best to just make the conversion modifications ourselves. Honestly I'm surprised nobody has submitted a pull request yet.

toxikman avatar Nov 18 '22 20:11 toxikman

I can't find GetSignature or AndoirdJNYHelper in code. Maybe the error originated on server?

JVimes avatar Jun 12 '23 02:06 JVimes