Play-games-plugin-for-unity: Username and ID returned are in Korean/Chinese

Created on 7 May 2017  ·  15Comments  ·  Source: playgameservices/play-games-plugin-for-unity

Hey There

I have recently upgraded to the new version of GPGS and each time I try to get the username or user id of the player then I get a string which looks like this "ㅧ㤷㈴ㄳ㤲㜴㘴㐳㈸〶5" instead of before I would get the actual name and ID.

Any thoughts on what may be causing this problem? I have not had this if I use the older version of the plugin which I tested again just to make sure. No problems authenticating either its just the returning string which is messed up.

Most helpful comment

I am pushing the updated plugin now. version 0.9.38a

All 15 comments

After some more experimentation I only have this issue with V0.9.38 however with V0.9.37 there is no issue.

So it must be something with the latest version.

Same problem here, but the v0.9.37 did not work. Better without user name than without plugin... :/

Same here.. rest all fine.. All text are in Korean/Chinese...

@Gokuofuin - Can you share a log of authenticating?

I can confirm this also happening for me on Sign In with 0.9.38 and Unity 5.5.3f1 with 10.2.1 AARs. Also occurs when displaying fetched achievements. Same results occurred with 10.2.4 AARs.

05-09 14:17:04.485 3582-5259/? W/AppOps: Bad call: specified package com.google.android.play.games under uid 10217 but it is really 10170
05-09 14:17:04.485 3582-3614/? W/AppOps: Bad call: specified package com.google.android.play.games under uid 10217 but it is really 10170
05-09 14:17:04.515 5194-5203/? E/DataBuffer: Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@ac2e029)
05-09 14:17:04.520 5194-5203/? W/SQLiteConnectionPool: A SQLiteConnection object for database '+data+user+0+com_google_android_gms+databases+metrics_db' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
05-09 14:17:04.520 5194-5203/? W/SQLiteConnectionPool: A SQLiteConnection object for database '+data+user+0+com_google_android_gms+databases+help_responses_db_18' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
05-09 14:17:04.520 5194-5203/? W/SQLiteConnectionPool: A SQLiteConnection object for database '+data+user+0+com_google_android_gms+databases+auto_complete_suggestions_db' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
05-09 14:17:05.275 5194-7543/? I/qtaguid: Untagging socket 131
05-09 14:17:05.315 3582-4630/? W/AppOps: Bad call: specified package com.google.android.play.games under uid 10217 but it is really 10170
05-09 14:17:05.315 3582-4253/? W/AppOps: Bad call: specified package com.google.android.play.games under uid 10217 but it is really 10170
05-09 14:17:05.335 3582-4371/? W/AppOps: Bad call: specified package com.google.android.play.games under uid 10217 but it is really 10170
05-09 14:17:05.340 3582-4722/? W/AppOps: Bad call: specified package com.google.android.play.games under uid 10217 but it is really 10170
05-09 14:17:05.360 5194-7545/? I/System.out: (HTTPLog)-Static: Hongbao
05-09 14:17:05.360 5194-7545/? I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
05-09 14:17:05.360 5194-7545/? I/System.out: (HTTPLog)-Static: Hongbao
05-09 14:17:05.360 5194-7545/? I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
05-09 14:17:05.360 5194-7545/? I/qtaguid: Tagging socket 134 with tag 30000e0000000000{805309952,0} uid 10009, pid: 5194, getuid(): 10009
05-09 14:17:05.380 14837-14897/? I/Unity: Authenticated user 楆敲w
(Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
05-09 14:17:05.410 14837-14897/? I/Unity: Found 66 achievements:
ID 权䥫漰猲㝷娰䅅光杉
(Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

05-09 14:17:05.415 5194-7544/? I/System.out: (HTTPLog)-Static: Hongbao
05-09 14:17:05.415 5194-7544/? I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
05-09 14:17:05.420 5194-7544/? I/System.out: (HTTPLog)-Static: Hongbao
05-09 14:17:05.420 5194-7544/? I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
05-09 14:17:05.420 5194-7544/? I/qtaguid: Tagging socket 148 with tag 30000e0000000000{805309952,0} uid 10217, pid: 5194, getuid(): 10009
05-09 14:17:05.675 3582-4199/? D/SensorService: [SO] 0.893 7.250 6.472
05-09 14:17:05.685 5194-7545/? I/qtaguid: Untagging socket 134
05-09 14:17:05.740 5194-7542/? I/System.out: (HTTPLog)-Static: Hongbao
05-09 14:17:05.740 5194-7542/? I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
05-09 14:17:05.740 5194-7542/? I/System.out: (HTTPLog)-Static: Hongbao
05-09 14:17:05.740 5194-7542/? I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
05-09 14:17:05.740 5194-7542/? I/qtaguid: Tagging socket 131 with tag 30000e0000000000{805309952,0} uid 10009, pid: 5194, getuid(): 10009
05-09 14:17:05.770 5194-7544/? I/qtaguid: Untagging socket 148
05-09 14:17:05.770 3582-4253/? W/AppOps: Bad call: specified package com.google.android.play.games under uid 10217 but it is really 10170
05-09 14:17:05.770 3582-4371/? W/AppOps: Bad call: specified package com.google.android.play.games under uid 10217 but it is really 10170
05-09 14:17:05.795 14837-14897/? I/Unity: 楆敲慭w

Having the same issue .Any solutions???

@claywilkinson Unfortunately since I am not using the latest version anymore I cannot share a log. Sorry.

However as other people stated the authentication seemed to be fine, I mean for instance I found that all my stats and achievements were there it was simply not giving me my username, email or ID.

BTW speaking of email, I could not get it to return the email at all on the new version however the old version does it just fine so it could be something to do with authentication. Sorry about the log.

And it seems that the return after using translate is some kind of political message

PlayGamesPlatform.Instance.localUser.userName = 獄潍ㅢ敬 = Prison Wei Wei respect

Not very confident using this plugin now....might it be infected with some sort of malware ?

For the record and "off topic" https://en.wikipedia.org/wiki/Ai_Weiwei

Why the Unity didn't create an Official plugin yet? So frustrated. Now we are maybe using a malware??? Great :/

No, there is no malware - just a bug.

There was a change for IL2CPP that changed the marshaling of strings from using Stringbuilder to using char[].

HOWEVER -- in C# sizeof(char) == 2 and in C (which is the native GPG library) sizeof(char) == 1.

So the marshaling was copying 2 characters of the name into a single Unicode character, which are where the asian characters are located in Unicode.

The fix (which I hope to submit shortly) is to change the char[] parameters to be byte[] on the C# side.

I have confirmed this fixes the issue.

Glad to know that the plugin was not compromised.
Although I find it quite odd that the username returns such string.

Great @claywilkinson ... So how we get the username correctly? Thanks.

I am pushing the updated plugin now. version 0.9.38a

Nice work Clay, thanks!

@claywilkinson Thanks man!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hippogamesunity picture hippogamesunity  ·  5Comments

RafikTSG picture RafikTSG  ·  4Comments

EspectroDK picture EspectroDK  ·  5Comments

toxikman picture toxikman  ·  4Comments

YogendraChauhan picture YogendraChauhan  ·  4Comments