I get error "Google Play Services require an update" from init event

Hi everybody, 

   

    I want add one leaderboard to my simple game by using gpgs plugin from Google. So I read 

I do everthing what they write what must be done to gpgs works. After my first try I get error with  license key. I figure out that just need add code to build.settings file

usesPermissions =  {  --"android.permission.INTERNET",  "com.android.vending.CHECK\_LICENSE"  },

Today I get message on console 

PluginSync: plugin com.coronalabs/plugin.gpgs needs to be updated for platform win32-sim to build number: 2906 11:22:37.124  PluginSync: downloading plugin: http://plugins.coronasphere.com/com.coronalabs/plugin.gpgs/2016.2906/win32-sim/plugin.gpgs.zip

I download and unzipped plugin.gpgs.zip file and put it project folder. Next to main.lua file. Again this was suprise for me because nowhere is wrote about this kind situation but I was able to install my app succesful.

Now I getting message from console after debugging 

adb logcat Corona:v \*:s --------- beginning of /dev/log/system --------- beginning of /dev/log/main V/Corona &nbsp;(12333): \> Class.forName: network.LuaLoader V/Corona &nbsp;(12333): \< Class.forName: network.LuaLoader V/Corona &nbsp;(12333): Loading via reflection: network.LuaLoader I/Corona &nbsp;(12333): Platform: ORION\_97 / ARM Neon / 4.2.2 / PowerVR SGX 544MP / OpenGL ES 2.0 build 1.10@2379759 / 2016.2992 / polski | PL | pl\_PL | pl V/Corona &nbsp;(12333): \> Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona &nbsp;(12333): \< Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona &nbsp;(12333): Loading via reflection: CoronaProvider.licensing.google.LuaLoader I/Corona &nbsp;(12333): WARNING: licensing.init() was already called for google. V/Corona &nbsp;(12333): \> Class.forName: plugin.gpgs.LuaLoader V/Corona &nbsp;(12333): \< Class.forName: plugin.gpgs.LuaLoader V/Corona &nbsp;(12333): Loading via reflection: plugin.gpgs.LuaLoader I/Corona &nbsp;(12333): Error: could not read scores from highscore.json . I/Corona &nbsp;(12333): \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* I/Corona &nbsp;(12333): Init error message: Google Play Services require an update

Last message comes from init event. I don’t know what I have to do now to my app start working properly. Any suggestions?

I add more information because I want to share it with community.  Sorry for my english :slight_smile:

build.settings settings = { orientation = &nbsp; { default = "portrait", }, android = &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; supportsScreens = &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; smallScreens &nbsp;= true, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; normalScreens = true, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; largeScreens &nbsp;= true, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xlargeScreens = false, &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; minSdkVersion = "10", &nbsp; &nbsp; &nbsp; &nbsp; googlePlayGamesAppId = "1821585445450778", &nbsp; &nbsp; &nbsp; &nbsp; usesPermissions =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --"android.permission.INTERNET",&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "com.android.vending.CHECK\_LICENSE"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; }, &nbsp; &nbsp; build = &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; neverStripDebugInfo = false &nbsp; &nbsp; }, &nbsp; &nbsp; plugins = &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; ["plugin.gpgs"] = &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; publisherId = "com.coronalabs", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; supportedPlatforms = { &nbsp;iphone=true, android=true } &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; }, }

config.lua local aspectRatio = display.pixelHeight / display.pixelWidth application = { &nbsp; &nbsp;content = { &nbsp; &nbsp; &nbsp; width = aspectRatio \>= 1.5 and 800 or math.floor( 1200 / aspectRatio ), &nbsp; &nbsp; &nbsp; height = aspectRatio \<= 1.5 and 1200 or math.floor( 800 \* aspectRatio ), &nbsp; &nbsp; &nbsp; scale = "letterBox", &nbsp; &nbsp; &nbsp; fps = 30, &nbsp; &nbsp; &nbsp; imageSuffix = { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;["@2x"] = 1.3, &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp;}, &nbsp; &nbsp;license = &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; google = &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; key = "MIIBIjANBgkqhkiGwLQeHlRpFMpgdfnsFwxNaT3oxEsh2dha0Qmup/zAPrwIDAQAB", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; policy = "serverManaged", &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; }, }

I’m using free version of Corona SDK build 2016.2992.

The app tested on tablet with Android 4.2.2 and Games Play app version 3.9.08 updated today. The Google Play Games Services plugin activated in marketplace.

After updated Google Play Services from 8.7.03 to 10.0.84 I don’t get error message but gpgs still seems not work. 

I’ll bring this to the attention of an engineer. For Simulator builds, you do not need to download and put them in your project. The system does this for you.

Rob

Thanks Rob for your answer. I’m not sure if I need publish my game and put it in “alpha testing” before it becomes available for testing. What do you think?

You don’t need to download that ZIP archive, that message is only for reference on how plugin syncing works.

Initial error said that you have to update Google Play Services on the device, that is right.

After you have called init and received a non-error response, you need to login.

After login you can start using GPGS.

Publishing your game is not required for most testing purposes.

If you are logged in and something doesn’t work, it should give you an error message about that.

In gpgsLoginListener listener (on the end) I get error message

C:\\>adb logcat Corona:v \*:s \* daemon not running. starting it now on port 5037 \* \* daemon started successfully \* --------- beginning of /dev/log/system --------- beginning of /dev/log/main V/Corona &nbsp;(11206): \> Class.forName: network.LuaLoader V/Corona &nbsp;(11206): \< Class.forName: network.LuaLoader V/Corona &nbsp;(11206): Loading via reflection: network.LuaLoader I/Corona &nbsp;(11206): Platform: ORION\_97 / ARM Neon / 4.2.2 / PowerVR SGX 544MP / O penGL ES 2.0 build 1.10@2379759 / 2016.2992 / polski | PL | pl\_PL | pl V/Corona &nbsp;(11206): \> Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona &nbsp;(11206): \< Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona &nbsp;(11206): Loading via reflection: CoronaProvider.licensing.google.LuaLo ader I/Corona &nbsp;(11206): WARNING: licensing.init() was already called for google. V/Corona &nbsp;(11206): \> Class.forName: plugin.gpgs.LuaLoader V/Corona &nbsp;(11206): \< Class.forName: plugin.gpgs.LuaLoader V/Corona &nbsp;(11206): Loading via reflection: plugin.gpgs.LuaLoader I/Corona &nbsp;(11206): Error: could not read scores from &nbsp; &nbsp;highscore.json &nbsp;. I/Corona &nbsp;(11206): \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* I/Corona &nbsp;(11206): Login event: { I/Corona &nbsp;(11206): &nbsp; "errorCode":10002, I/Corona &nbsp;(11206): &nbsp; "errorMessage":"sign in failed", I/Corona &nbsp;(11206): &nbsp; "isError":true, I/Corona &nbsp;(11206): &nbsp; "name":"login", I/Corona &nbsp;(11206): &nbsp; "phase":"logged in" I/Corona &nbsp;(11206): } I/Corona &nbsp;(11206): \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* I/Corona &nbsp;(11206): event.name= login V/Corona &nbsp;(12584): \> Class.forName: network.LuaLoader V/Corona &nbsp;(12584): \< Class.forName: network.LuaLoader V/Corona &nbsp;(12584): Loading via reflection: network.LuaLoader I/Corona &nbsp;(12584): Platform: ORION\_97 / ARM Neon / 4.2.2 / PowerVR SGX 544MP / O penGL ES 2.0 build 1.10@2379759 / 2016.2992 / polski | PL | pl\_PL | pl V/Corona &nbsp;(12584): \> Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona &nbsp;(12584): \< Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona &nbsp;(12584): Loading via reflection: CoronaProvider.licensing.google.LuaLo ader I/Corona &nbsp;(12584): WARNING: licensing.init() was already called for google. V/Corona &nbsp;(12584): \> Class.forName: plugin.gpgs.LuaLoader V/Corona &nbsp;(12584): \< Class.forName: plugin.gpgs.LuaLoader V/Corona &nbsp;(12584): Loading via reflection: plugin.gpgs.LuaLoader I/Corona &nbsp;(12584): Error: could not read scores from &nbsp; &nbsp;highscore.json &nbsp;. I/Corona &nbsp;(12584): \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* I/Corona &nbsp;(12584): Login event: { I/Corona &nbsp;(12584): &nbsp; "errorCode":8, I/Corona &nbsp;(12584): &nbsp; "errorMessage":"internal error", I/Corona &nbsp;(12584): &nbsp; "isError":true, I/Corona &nbsp;(12584): &nbsp; "name":"login", I/Corona &nbsp;(12584): &nbsp; "phase":"logged in" I/Corona &nbsp;(12584): }

During first try I don’t have internet turn on but I saw some kind green box probably indicate some processing from Google Play Games app. Nothing more happened. Next time I turn on internet through wifi but it still seems don’t work. Below my for gpgs init and login.

local function gpgsLoginListener(event) &nbsp; &nbsp; print("\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*") &nbsp; &nbsp; print("Login event:", jsonFormat.prettify(event)) &nbsp; &nbsp; print("\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*") &nbsp; &nbsp; print("event.name= " .. tostring(event.name)) end local function gpgsInitListener(event) &nbsp; &nbsp; if not event.isError then &nbsp; &nbsp; &nbsp; &nbsp;gpgs.login({userInitiated=true, listener=gpgsLoginListener}) &nbsp; &nbsp; else &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print("\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*") &nbsp; &nbsp; &nbsp; &nbsp; print("Init error message: " .. event.errorMessage) &nbsp; &nbsp; end end

@Lerg  By the way your Hex 2048 is awesome:)

So the problem is with logging in. That could be either a misconfiguration issue (app id, license key, used wrong keystore) or could be an issue with Google’s API console.

Please go to https://console.developers.google.com/apis/api/games and see if that service is enabled for your game project.

Thanks for playing the game!

I will try check everything. I notice now that I have added two app with the same client ID with two  certificate fingerprints : debug nad my private keystore instead two app with different client ID. One with debug fungerprint and second with my private keystore. I removed that one with debug fingerprint. 

Screenshot my dev console. Google Play Games Services seems enabled. No errors.

JBFU3SJ.png

After read post with the same problem [GPGS] Error 8: INTERNAL_ERROR on login and enabled followed APIs

  • Google Service Management API
  • Google Apps Marketplace API
  • Google Play Game Services Publishing API
  • Google Drive API

my game seems work:) Thanks for help @Lerg and @Rob Miracle

Same error with myApp. Thanks for the API solution!

I’ll bring this to the attention of an engineer. For Simulator builds, you do not need to download and put them in your project. The system does this for you.

Rob

Thanks Rob for your answer. I’m not sure if I need publish my game and put it in “alpha testing” before it becomes available for testing. What do you think?

You don’t need to download that ZIP archive, that message is only for reference on how plugin syncing works.

Initial error said that you have to update Google Play Services on the device, that is right.

After you have called init and received a non-error response, you need to login.

After login you can start using GPGS.

Publishing your game is not required for most testing purposes.

If you are logged in and something doesn’t work, it should give you an error message about that.

In gpgsLoginListener listener (on the end) I get error message

C:\\>adb logcat Corona:v \*:s \* daemon not running. starting it now on port 5037 \* \* daemon started successfully \* --------- beginning of /dev/log/system --------- beginning of /dev/log/main V/Corona &nbsp;(11206): \> Class.forName: network.LuaLoader V/Corona &nbsp;(11206): \< Class.forName: network.LuaLoader V/Corona &nbsp;(11206): Loading via reflection: network.LuaLoader I/Corona &nbsp;(11206): Platform: ORION\_97 / ARM Neon / 4.2.2 / PowerVR SGX 544MP / O penGL ES 2.0 build 1.10@2379759 / 2016.2992 / polski | PL | pl\_PL | pl V/Corona &nbsp;(11206): \> Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona &nbsp;(11206): \< Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona &nbsp;(11206): Loading via reflection: CoronaProvider.licensing.google.LuaLo ader I/Corona &nbsp;(11206): WARNING: licensing.init() was already called for google. V/Corona &nbsp;(11206): \> Class.forName: plugin.gpgs.LuaLoader V/Corona &nbsp;(11206): \< Class.forName: plugin.gpgs.LuaLoader V/Corona &nbsp;(11206): Loading via reflection: plugin.gpgs.LuaLoader I/Corona &nbsp;(11206): Error: could not read scores from &nbsp; &nbsp;highscore.json &nbsp;. I/Corona &nbsp;(11206): \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* I/Corona &nbsp;(11206): Login event: { I/Corona &nbsp;(11206): &nbsp; "errorCode":10002, I/Corona &nbsp;(11206): &nbsp; "errorMessage":"sign in failed", I/Corona &nbsp;(11206): &nbsp; "isError":true, I/Corona &nbsp;(11206): &nbsp; "name":"login", I/Corona &nbsp;(11206): &nbsp; "phase":"logged in" I/Corona &nbsp;(11206): } I/Corona &nbsp;(11206): \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* I/Corona &nbsp;(11206): event.name= login V/Corona &nbsp;(12584): \> Class.forName: network.LuaLoader V/Corona &nbsp;(12584): \< Class.forName: network.LuaLoader V/Corona &nbsp;(12584): Loading via reflection: network.LuaLoader I/Corona &nbsp;(12584): Platform: ORION\_97 / ARM Neon / 4.2.2 / PowerVR SGX 544MP / O penGL ES 2.0 build 1.10@2379759 / 2016.2992 / polski | PL | pl\_PL | pl V/Corona &nbsp;(12584): \> Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona &nbsp;(12584): \< Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona &nbsp;(12584): Loading via reflection: CoronaProvider.licensing.google.LuaLo ader I/Corona &nbsp;(12584): WARNING: licensing.init() was already called for google. V/Corona &nbsp;(12584): \> Class.forName: plugin.gpgs.LuaLoader V/Corona &nbsp;(12584): \< Class.forName: plugin.gpgs.LuaLoader V/Corona &nbsp;(12584): Loading via reflection: plugin.gpgs.LuaLoader I/Corona &nbsp;(12584): Error: could not read scores from &nbsp; &nbsp;highscore.json &nbsp;. I/Corona &nbsp;(12584): \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* I/Corona &nbsp;(12584): Login event: { I/Corona &nbsp;(12584): &nbsp; "errorCode":8, I/Corona &nbsp;(12584): &nbsp; "errorMessage":"internal error", I/Corona &nbsp;(12584): &nbsp; "isError":true, I/Corona &nbsp;(12584): &nbsp; "name":"login", I/Corona &nbsp;(12584): &nbsp; "phase":"logged in" I/Corona &nbsp;(12584): }

During first try I don’t have internet turn on but I saw some kind green box probably indicate some processing from Google Play Games app. Nothing more happened. Next time I turn on internet through wifi but it still seems don’t work. Below my for gpgs init and login.

local function gpgsLoginListener(event) &nbsp; &nbsp; print("\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*") &nbsp; &nbsp; print("Login event:", jsonFormat.prettify(event)) &nbsp; &nbsp; print("\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*") &nbsp; &nbsp; print("event.name= " .. tostring(event.name)) end local function gpgsInitListener(event) &nbsp; &nbsp; if not event.isError then &nbsp; &nbsp; &nbsp; &nbsp;gpgs.login({userInitiated=true, listener=gpgsLoginListener}) &nbsp; &nbsp; else &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print("\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*") &nbsp; &nbsp; &nbsp; &nbsp; print("Init error message: " .. event.errorMessage) &nbsp; &nbsp; end end

@Lerg  By the way your Hex 2048 is awesome:)

So the problem is with logging in. That could be either a misconfiguration issue (app id, license key, used wrong keystore) or could be an issue with Google’s API console.

Please go to https://console.developers.google.com/apis/api/games and see if that service is enabled for your game project.

Thanks for playing the game!

I will try check everything. I notice now that I have added two app with the same client ID with two  certificate fingerprints : debug nad my private keystore instead two app with different client ID. One with debug fungerprint and second with my private keystore. I removed that one with debug fingerprint. 

Screenshot my dev console. Google Play Games Services seems enabled. No errors.

JBFU3SJ.png

After read post with the same problem [GPGS] Error 8: INTERNAL_ERROR on login and enabled followed APIs

  • Google Service Management API
  • Google Apps Marketplace API
  • Google Play Game Services Publishing API
  • Google Drive API

my game seems work:) Thanks for help @Lerg and @Rob Miracle

Same error with myApp. Thanks for the API solution!