[Resolved] GPGS: gameNetwork.init does nothing... with an error: Google Play services resources not found

Naomi,

Sample File: https://s3.amazonaws.com/example_code/GPGS.zip

Most of these steps are not required but since you are using messages etc. just figured I would throw them in :slight_smile:

1: In build.settings change GPGS_ID with the ID in Game Services for the app you are using.

2: From your application (in dev console) click on Services & APIS and copy your “YOUR LICENSE KEY FOR THIS APPLICATION” to config.lua->application->license->google->key->key=“YOUR_PROJECT_KEY”

3: Copy your API key from console API to config.lua->notification->google-projectNumber = “YOUR_API_PROJECT_ID”

4: Open main.lau

5: Change line 7 leaderboardId = “YOUR_LEADER_ID” to the ID that is listed in leadersboards in Game Services.

6: Change line 119 UnlockAchievement(“YOUR_ACHIEVEMENT_ID”) to any achievement ID that is listed in your Achievements.

Build using the product id listed in “Linked Apps” -> “com.your.productid”

IMPORTANT: Because Game Services will try and keep you logged in for the app you are using, goto your google device and uninstall the app before proceeding (just to make sure nothing is cached)

Once you have built your app, drop to command line and type 

adb -d install -r “C:\location\file.apk” 

swap out location and file for your values.

Once install complete open app on your device and everything should be working, tested on 4 different GPGS setups as well as creating a new one using the steps I had mentioned before.

OK NOW ON TO WHAT I FOUND.

First and foremost you can ignore the Google Play Resources Not Found message it is a false positive and is being caused by com.google.android.gms.common.GooglePlayServicesUtil.class which is a error in google itself and has nothing to do with corona and will not stop you from proceeding with GPGS so don’t worry about that just make sure it tests and works correctly the rest can be ignored.

Let me know if you have any issues.

@Rob, thank you so much for finding the misspelling – I corrected it and built my test project (and I really hoped it was the cause of it all), but it turns out I still get the exact same terminal output with “The Google Play services resources were not found” error.  (I can’t believe terminal output is the same, though.)

@Christopher, thank you so much for the sample file.  I really appreciate it.  I’ll test it and post back with result.

Naomi

Naomi,

Make sure you read to the bottom of my post on what I found about the “Google Play Resources Not Found” message, it is a false positive with the gpsu class file and has nothing to do with what you are currently trying to do so just ignore that and focus on getting everything hooked up and working (and “always” make sure you uninstall your app before testing) until such time that you have it actually connecting to the network.

“First and foremost you can ignore the Google Play Resources Not Found message it is a false positive and is being caused by com.google.android.gms.common.GooglePlayServicesUtil.class which is a error in google itself and has nothing to do with corona and will not stop you from proceeding with GPGS so don’t worry about that just make sure it tests and works correctly the rest can be ignored.”

Christopher

Christopher, thank you so much.

I followed your instruction (steps 1 through 6)  carefully, and the changes I made to the sample project are:

  1.  In build.settings, I changed GPGS_ID to that of my app and commented out versionCode & versionName (I add them when I build APK).

  2.  In config.lua, I added the key and commented out the notification block (because I haven’t set things up for notification with my project.)

  3.  In main.lua, I changed line 7 where I added my leaderboard ID, then changed line 119 where I added my achievement ID.

  4.  Renamed the folder to the name of my app.

I built the APK using the keystore and package name that match properly.

I uninstalled my app from my test device and then installed the new APK.

And it still gives me the very same error when I launch the app.  See the second to last line (in bold letters) in the LAUNCH LOG below.  Next, I cleared the log and tapped on Login button, and it gave me fatal error.  See the LOGIN LOG.  I haven’t read your code, so I don’t know why I get fatal error while you don’t.  Perhaps there are some other items that need modification so that the sample project would work with my keystore, package name and Googe Play Console setup?

At this point, I’m wondering if the alpha APK already uploaded to Google Play (even though it is not published) can have some effect when testing locally?  Perhaps alpha APK is faulty (because it was just a placeholder for me), and that’s the root of all problem?  I don’t know.  Just a wild guess and probably not the case, but I’m too bewildered…

Naomi

Edit:  WAIT.  IT SAYS “Application ID (GPGS_ID) must be a numeric value” in LOGIN LOG.  Let me check.  And, OMG, I didn’t save the build.settings file before building the APK (how embarrassing).  Let me post back as soon as I test this thing.

And it WORKED!

Christopher, tapping on your Login button brought up the GPGS’s login thing, instead of failing.

I still get “The Google Play services resources were not found” error upon launch, but it doesn’t seem to cause login issue.  It brings up popup window, showing my pix and the app’s icon, saying myapp would like to: know my basic profile info, etc.

Now that I know Google Play side of settings are working, I’ll look at your sample code and work out how mine should be.

Thanks again!

Naomi

----------- LAUNCH LOG -----------

D/dalvikvm(  687): GC_CONCURRENT freed 3615K, 28% free 12034K/16524K, paused 7ms+5ms, total 53ms

D/dalvikvm(  687): GC_FOR_ALLOC freed 687K, 24% free 12719K/16524K, paused 38ms, total 47ms

D/dalvikvm( 7148): GC_CONCURRENT freed 167K, 6% free 8495K/9008K, paused 2ms+3ms, total 25ms

D/Finsky  ( 7148): [1] 5.onFinished: Installation state replication succeeded.

I/ActivityManager(  442): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mycompany.myapp/com.ansca.corona.CoronaActivity} from pid 687

D/dalvikvm(  442): JIT code cache reset in 3 ms (1048552 bytes 2/0)

D/dalvikvm(  442): GC_FOR_ALLOC freed 327K, 18% free 15609K/18820K, paused 63ms, total 65ms

D/dalvikvm(  442): GC_FOR_ALLOC freed 499K, 19% free 15356K/18820K, paused 56ms, total 56ms

I/ActivityManager(  442): Start proc com.mycompany.myapp for activity com.mycompany.myapp/com.ansca.corona.CoronaActivity: pid=7340 uid=10027 gids={50027, 3003, 1028}

D/dalvikvm( 7340): Trying to load lib /data/app-lib/com.mycompany.myapp-1/liblua.so 0x42120408

D/dalvikvm( 7340): Added shared lib /data/app-lib/com.mycompany.myapp-1/liblua.so 0x42120408

D/dalvikvm( 7340): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/liblua.so 0x42120408, skipping init

D/dalvikvm( 7340): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so 0x42120408

D/dalvikvm( 7340): Added shared lib /data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so 0x42120408

D/dalvikvm( 7340): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so 0x42120408

D/dalvikvm( 7340): Shared lib ‘/data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so’ already loaded in same CL 0x42120408

I/dalvikvm( 7340): threadid=1: recursive native library load attempt (/data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so)

D/dalvikvm( 7340): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libopenal.so 0x42120408

I/OpenAL_SLES( 7340): alc_opensles_init

D/dalvikvm( 7340): Added shared lib /data/app-lib/com.mycompany.myapp-1/libopenal.so 0x42120408

D/dalvikvm( 7340): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libmpg123.so 0x42120408

D/dalvikvm( 7340): Added shared lib /data/app-lib/com.mycompany.myapp-1/libmpg123.so 0x42120408

D/dalvikvm( 7340): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/libmpg123.so 0x42120408, skipping init

D/dalvikvm( 7340): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libalmixer.so 0x42120408

D/dalvikvm( 7340): Added shared lib /data/app-lib/com.mycompany.myapp-1/libalmixer.so 0x42120408

D/dalvikvm( 7340): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/libalmixer.so 0x42120408, skipping init

D/dalvikvm( 7340): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libcorona.so 0x42120408

D/dalvikvm( 7340): Added shared lib /data/app-lib/com.mycompany.myapp-1/libcorona.so 0x42120408

D/dalvikvm( 7340): GC_CONCURRENT freed 165K, 3% free 7766K/7996K, paused 6ms+11ms, total 69ms

D/libEGL  ( 7340): loaded /system/lib/egl/libEGL_tegra.so

D/libEGL  ( 7340): loaded /system/lib/egl/libGLESv1_CM_tegra.so

D/libEGL  ( 7340): loaded /system/lib/egl/libGLESv2_tegra.so

D/OpenGLRenderer( 7340): Enabling debug mode 0

D/dalvikvm( 7340): Note: class Landroid/opengl/GLWrapperBase; has 250 unimplemented (abstract) methods

V/GLSurfaceView( 7340): glGetString(7937) returns NVIDIA Tegra 3;

V/Corona  ( 7340): > Class.forName: network.LuaLoader

V/Corona  ( 7340): < Class.forName: network.LuaLoader

V/Corona  ( 7340): Loading via reflection: network.LuaLoader

I/Corona  ( 7340): Platform: Nexus 7 / ARM Neon / 4.3 / NVIDIA Tegra 3 / OpenGL ES 2.0 14.01003 / 2014.2381

V/Corona  ( 7340): > Class.forName: CoronaProvider.licensing.google.LuaLoader

V/Corona  ( 7340): < Class.forName: CoronaProvider.licensing.google.LuaLoader

I/ActivityManager(  442): Displayed com.mycompany.myapp/com.ansca.corona.CoronaActivity: +658ms

V/Corona  ( 7340): Loading via reflection: CoronaProvider.licensing.google.LuaLoader

D/dalvikvm( 7340): GC_CONCURRENT freed 422K, 6% free 7775K/8260K, paused 10ms+9ms, total 54ms

V/Corona  ( 7340): > Class.forName: CoronaProvider.gameNetwork.google.LuaLoader

V/Corona  ( 7340): < Class.forName: CoronaProvider.gameNetwork.google.LuaLoader

V/Corona  ( 7340): Loading via reflection: CoronaProvider.gameNetwork.google.LuaLoader

W/dalvikvm( 7340): VFY: unable to resolve static field 4851 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;

D/dalvikvm( 7340): VFY: replacing opcode 0x60 at 0x0041

W/dalvikvm( 7340): VFY: unable to resolve static field 4847 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;

D/dalvikvm( 7340): VFY: replacing opcode 0x60 at 0x004c

W/dalvikvm( 7340): VFY: unable to resolve static field 4857 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;

D/dalvikvm( 7340): VFY: replacing opcode 0x60 at 0x0057

W/dalvikvm( 7340): VFY: unable to resolve static field 4854 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;

D/dalvikvm( 7340): VFY: replacing opcode 0x60 at 0x0069

W/dalvikvm( 7340): VFY: unable to resolve static field 4848 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;

D/dalvikvm( 7340): VFY: replacing opcode 0x60 at 0x0009

W/dalvikvm( 7340): VFY: unable to resolve static field 4845 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;

D/dalvikvm( 7340): VFY: replacing opcode 0x60 at 0x0010

W/dalvikvm( 7340): VFY: unable to resolve static field 4855 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;

D/dalvikvm( 7340): VFY: replacing opcode 0x60 at 0x0017

W/dalvikvm( 7340): VFY: unable to resolve static field 4852 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;

D/dalvikvm( 7340): VFY: replacing opcode 0x60 at 0x0004

W/dalvikvm( 7340): VFY: unable to resolve static field 4852 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;

D/dalvikvm( 7340): VFY: replacing opcode 0x60 at 0x000c

I/dalvikvm( 7340): DexOpt: unable to optimize static field ref 0x12f2 at 0x18 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b

I/dalvikvm( 7340): DexOpt: unable to optimize static field ref 0x12f1 at 0x38 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b

I/dalvikvm( 7340): DexOpt: unable to optimize static field ref 0x12ee at 0x3f in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b

I/dalvikvm( 7340): DexOpt: unable to optimize static field ref 0x12f8 at 0x46 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b

I/dalvikvm( 7340): DexOpt: unable to optimize static field ref 0x12f5 at 0x66 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b

E/GooglePlayServicesUtil( 7340): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

D/dalvikvm( 7340): GC_CONCURRENT freed 342K, 6% free 7818K/8260K, paused 5ms+1ms, total 32ms

----------- END -----------

----------- LOGIN LOG -----------

D/BaseGameActivity( 7340): onCreate: creating GamesClient

E/GooglePlayServicesUtil( 7340): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

D/BaseGameActivity( 7340): isGooglePlayServicesAvailable returned 0

D/BaseGameActivity( 7340): beginUserInitiatedSignIn: starting new sign-in flow.

D/BaseGameActivity( 7340): Connecting GamesClient.

E/GooglePlayServicesUtil( 7340): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

D/BaseGameActivity( 7340): onConnectionFailed: result 4

D/BaseGameActivity( 7340): onConnectionFailed: since user initiated sign-in, trying to resolve problem.

D/BaseGameActivity( 7340): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{421aa040: android.os.BinderProxy@421a8858}}

D/BaseGameActivity( 7340): result has resolution. Starting it.

I/ActivityManager(  442): START u0 {flg=0x4000000 cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1

D/dalvikvm(  442): GC_FOR_ALLOC freed 933K, 19% free 15387K/18820K, paused 58ms, total 61ms

I/ActivityManager(  442): Start proc com.google.android.gms.ui for activity com.google.android.gms/.games.ui.signin.SignInActivity: pid=7436 uid=10017 gids={50017, 3003, 1007, 1028, 1015, 1006, 3002, 3001, 2001, 3006}

I/MultiDex( 7436): install

I/MultiDex( 7436): MultiDexExtractor.load(/data/app/com.google.android.gms-2.apk, false)

I/MultiDex( 7436): loading existing secondary dex files

I/MultiDex( 7436): load found 1 secondary dex files

I/MultiDex( 7436): install done

I/ProviderInstaller( 7436): Insert disabled by gate ‘gms:security:enable_conscrypt_in_gms_application’

D/GCM     (  747): GcmService start Intent { act=com.google.android.gms.INITIALIZE flg=0x10 pkg=com.google.android.gms cmp=com.google.android.gms/.gcm.GcmService } com.google.android.gms.INITIALIZE

I/dalvikvm( 7436): Could not find method android.app.AppOpsManager.checkPackage, referenced from method cbf.a

W/dalvikvm( 7436): VFY: unable to resolve virtual method 1279: Landroid/app/AppOpsManager;.checkPackage (ILjava/lang/String;)V

D/dalvikvm( 7436): VFY: replacing opcode 0x6e at 0x0010

D/libEGL  ( 7436): loaded /system/lib/egl/libEGL_tegra.so

D/libEGL  ( 7436): loaded /system/lib/egl/libGLESv1_CM_tegra.so

D/libEGL  ( 7436): loaded /system/lib/egl/libGLESv2_tegra.so

D/OpenGLRenderer( 7436): Enabling debug mode 0

D/dalvikvm( 7436): GC_CONCURRENT freed 266K, 5% free 7717K/8048K, paused 3ms+8ms, total 25ms

W/InputMethodManager( 7436): Ignoring onBind: cur seq=76, given seq=75

I/ActivityManager(  442): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +476ms

E/ViewRootImpl( 7436): Attempting to destroy the window while drawing!

E/ViewRootImpl( 7436):   window=android.view.ViewRootImpl@42182ee8, title=

I/ActivityManager(  442): START u0 {act=com.google.android.gms.common.account.CHOOSE_ACCOUNT flg=0x20000000 pkg=com.google.android.gms cmp=com.google.android.gms/.common.account.AccountPickerActivity (has extras)} from pid 7436

D/dalvikvm(  442): GC_FOR_ALLOC freed 586K, 19% free 15390K/18820K, paused 69ms, total 70ms

D/dalvikvm(  442): GC_FOR_ALLOC freed 507K, 19% free 15373K/18820K, paused 62ms, total 62ms

D/dalvikvm( 7436): GC_CONCURRENT freed 208K, 4% free 7987K/8288K, paused 2ms+3ms, total 21ms

I/ActivityManager(  442): Displayed com.google.android.gms/.common.account.AccountPickerActivity: +207ms

----------- END -----------

Yeah ignore the google error it means nothing and imagine google will fix it in next ask update :slight_smile:

Hopefully I made the sample close to what your are doing so should be easy to find and resolve but was still sleeping when I write it lol

Yes, thank you, Christopher.

My Login button was calling gameNetwork.init( “google”, initCallback ), and then only when there was no error (i.e., only when event.isError wasn’t true), it was going to call gameNetwork.request(“login”, { userInitiated = true, listener = loadLocalUser }).

However, with yours, even when the login fails at launch, you go ahead and request login.

That was the difference.

I changed my test project (which I posted earlier in page 1) so that tapping on Sign In won’t call gameNetwork.init but instead call gameNetwork.request for login.  And it worked just like yours.

Edit:  I thought about it – and I guess I was mistaken to think init failed.  Login failed at launch because it was not userInitiated.  But I simply thought init failed because of the “Google Play services resources not found” error.  Ugh. 

Naomi

Yeah, with the exception of Apple which you need to call gamNetwork.init on application start (as they shut it down) you need to call .init for google when you app launches. 

The gameNetwork.request for login returns “nil” if successful and false if there is an actual error which was confusing for me as I expect it to return true if everything worked lol…

This isn’t so much an error with corona as it is an error with the “plugin” that you are using for google network.

I am glad you got everything sorted out, I was actually going to write conditional statements for apple/google as there is a difference on how you call things but wasn’t sure if you were using game center.

Thank you, Christopher.  Your explanation makes sense.  

Really good to know what to expect from gameNetwork.request – definitely will help me coding this thing right.

Thanks again!!

Naomi

No problem :) 

Since this thread became a two-page thing before the issue was sorted, I added the solution in the first post that started this thread (so that, in case someone stumbles across this thing, it’s easier to get to the bottom of it right away.)

Cheers,

Naomi

Hey Naomi.  I’m actually working on adding GPGS to a game of mine right now and I’m getting logged in, though I’m hitting an issue that I don’t have my achievements and leaderboards in yet.

Did you generate your SHA1 key correctly?

Rob

Just as an FYI I just successfully logged in and got the loadLocalPlayer request and got the data back.

Rob

Hi Rob, thank you for your replies.  

I’ve generated SHA1 key correctly, and I have client ID for my app’s project under the “credentials” section here:   https://console.developers.google.com/project

I set up 5 achievements and 4 leaderboards this morning.

I also went ahead and published the game services for this game.  I then published the alpha version of the game.

When this didn’t help, I generated a new APK and uploaded it to alpha, and published it too.

What else can I be missing?  And why don’t I get event.isError when I call gameNetwork.init the second time?

I’m at my wits end… Can it be that I just need to wait a day before it starts working?  Did you set up game services today and it simply worked for you?

Naomi

BTW, under the credentials section of developer console ( https://console.developers.google.com/project ), it shows that DEEP LINKING is disabled.

Is it supposed to be enabled?

Naomi

Edit:  Nah, DEEP LINKING is disabled in all of my other apps that have GPGS (including leaderboards, achievement & multiplayer game mode.)  So this isn’t it.

I just don’t know how to fix this problem… because I really don’t know what is causing the problem.

I’m also wondering if I need to download the alpha version of the game from Google Play as a test user before I can test GPGS?  I uploaded the APK (along with its expansion file), but I have not downloaded it from the Play Store.  Instead, I side loaded the game.

Can it be causing the problem?

Naomi

Naomi,

I just implemented GPGS yesterday and ran into the same problem but was pretty simple to fix (at least in my case).

You don’t even need to publish an alpha build of your app or publish your GPGS data to get it working, just have your app ready to publish and by that I mean add some dummy store data, and upload your apk from that point when you run through the wizard and put in the product id of your app it should pick up the rest of the info for you and link the two.

First things first is to go to the developer console (API) (https://code.google.com/apis/console) and make sure you have Google Play Game Services and Google Play Game Management turned on which seems fairly obvious lol

I just created a test for GPGS and wrote down the steps I took and everything worked with zero issues.

1:  Create a new application in Google Developer (just store listing not APK) – (just add dummy info for desc and hit save)

2: Click on services and APIs and grab the license key and put it in the config.lua file (application->license section)

3: Compile my APK and upload it (don’t publish just save)

4: Click on Game Services and Add New Game

5: Use “I don’t use any google apis in my game yet” and fill in the name and category.

6: Follow the wizard and clicking next etc.

7: Make sure you put in the product id (com.yourapp.game) of your build when asked.

8: IGNORE the SHA stuff it will auto-add it for you (at least that has been my experience) and continue.

9: Take the number it gives you (which should say something like this is the only number you need)

10: Add that number to your build.settings file for googlePlayGamesAppId in the android section.

11: Add 5 achievements and 1 leaderboard.

12: In testing (Game Services->Game Item->Testing) add the gmail account of the “logged in” account of your android device (doesn’t need to be in alpha or beta).

12: add the codes to the lua note: I add to google first so i can use the same ID on apple.

local leaderID = "CgkI7Lva9bAbEAIQBg" local achievementID = { {key = "A1", id = "CgkI7Lva9bAbEAIQAQ"}, {key = "A2", id = "CgkI7Lva9bAbEAIQAg"}, {key = "A3", id = "CgkI7Lva9bAbEAIQAw"}, {key = "A4", id = "CgkI7Lva9bAbEAIQBA"}, {key = "A5", id = "CgkI7Lva9bAbEAIQBQ"}, }

13: Add this (USE::userInitiated = true) NOT FALSE -> using false made everything fail on my side (just a side note))

 gameNetwork = require "gameNetwork" gameNetwork.init("google") gameNetwork.request("login",{userInitiated = true}) 

14: Test with

--Show Leaderboards timer.peformWithDelay(1000, function() gameNetwork.show("leaderboards") end, 1) --Show Achievements timer.peformWithDelay(1000, function() gameNetwork.show("achievements") end, 1) --Unlock Achievement timer.peformWithDelay(1000, function() gameNetwork.request("unlockAchievement", {achievement = {identifier = achievementID["A1"].id}}) end, 1)

If you use USB debugging on your android like me.

14: plug in your device to your computer
15: Rebuild and push to your device with adb -d install -r “C:\path\mygame.apk”

16: run adb logcat

17: run your game and see what is going on :slight_smile:

18: everything works fine :slight_smile:

Not sure if that helps but those are the steps I just did on a brand new project in corona.

Christopher, thank you for the detailed steps you took to successfully implement leaderboard and achievements.

I think I covered all of the steps you described, except for the Step 8 related to SHA1.  I’m wondering why pre-filled SHA1 worked for you.  I’ve had SHA1 issue with one of my already released game, and the problem was due to simply accepting the pre-filled SHA1 at that time.  

I had exchanged emails with Google person when this SHA1 caused me headache – I wonder if they fixed it so that their system can automatically retrieve correct SHA1 now?  But then it feels odd, because the password is required for the keystore before the SHA1 can be retrieved, and unless you supply it, how can Google Play Developer Console know what might be the correct SHA1 for the uniqe keystore we use for each of our app/game?

Anyhow, I made sure to confirm/retrieve SHA1 using terminal with the following command:

keytool -exportcert -alias myappalias -keystore myapp.keystore -list -v

where myapp would be replaced with the name of my app.

Regardless, I really appreciate you providing the full, detailed steps.  I’m sure a lot of devs on this Forum would appreciate it.

And I totally appreciate you letting me know that it really isn’t necessary to publish the app or publish the game services before the testing can be done.

So now, I can eliminate published / not-published from potential list of reasons why it isn’t working for me.

Here’s what I do in my main.lua:

[lua]

– require gameNetwork

local gameNetwork = require( “gameNetwork” )

– later on

local function loadLocalUser( event )

     print("---------- inside google loadLocalUser ----------")

     if event.isError then

          print("event.isError = " … tostring(event.isError))

    elseif (event.data) then

        print("---------- login successful ----------") 

    end

end

local function initCallback( event )

     if event.isError then

          print("event.isError = " … tostring(event.isError))

    elseif event.data then

        print("---------- starting Google login ----------")

        gameNetwork.request(“login”, { userInitiated = false, listener = loadLocalUser })

    end

end

print("------- calling gameNetwork.init ---------")

gameNetwork.init( “google”, initCallback )

[/lua]

And here’s the terminal output relevant to the above:

I/Corona  ( 4249): ---------- calling gameNetwork.init ----------

V/Corona  ( 4249): > Class.forName: CoronaProvider.gameNetwork.google.LuaLoader

V/Corona  ( 4249): < Class.forName: CoronaProvider.gameNetwork.google.LuaLoader

V/Corona  ( 4249): Loading via reflection: CoronaProvider.gameNetwork.google.LuaLoader

I/Corona  ( 4249): ---------- inside google initCallback ----------

I/Corona  ( 4249): ---------- starting Google login ----------

D/BaseGameActivity( 4249): onCreate: creating GamesClient

E/GooglePlayServicesUtil( 4249): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

D/BaseGameActivity( 4249): onConnectionFailed: result 4

D/BaseGameActivity( 4249): onConnectionFailed: since user didn’t initiate sign-in, failing now.

I/Corona  ( 4249): ---------- inside google loadLocalUser ----------

I/Corona  ( 4249): event.isError = true

------------------------------ End of Terminal Output ------------------------------

Once my game comes to my home screen, I go to GPGS sign-in scene where I have:

[lua]

– require gameNetwork

local gameNetwork = require( “gameNetwork” )

– later on

local function loadLocalUser( event )

     print("---------- inside google loadLocalUser ----------")

     if event.isError then

          print("event.isError = " … tostring(event.isError))

     elseif then

          print("---------- login successful ----------")

     end

end

local function initCallback( event )

     if event.isError then

          print("event.isError = " … tostring(event.isError))

     elseif event.data then

          print("---------- starting Google login ----------")

          gameNetwork.request(“login”, { userInitiated = true, listener = loadLocalUser })

     end

end

print("------- calling gameNetwork.init ---------")

gameNetwork.init( “google”, initCallback )

[/lua]

And here’s the terminal output from this scene when I tap on “Sign In” button:

I/Corona  ( 4249): ---------- calling gameNetwork.init ----------

I get nothing else.

I can return back to my home screen, then go to game play screen, and play the game.  I can pretty much do everything else the my game app allows for (except for in-app billing which I haven’t tested yet – I figure I should get the GPGS working first.)  So it’s as if gameNetwork.init is never called the second time.

How am I suppose to debug this thing…?

Naomi

Naomi,

Ahhhhh, the famous “The Google Play services resources were not found” error I battled with this for about two days before figuring out what the deal was and haven’t had it since lol… 

I won’t be back at my dev machine until tomorrow but will pull up the code and the notes that I found to resolve it, it had nothing to do with SHA etc. and will post once I get the code maybe that will resolve your issue.

Regarding SHA I am not sure if they fixed it or not as it wasn’t until two weeks ago that I decided to try the game network but it seems to read it from my current keystore so haven’t bothered to look into it further just hit the next button and get the id back from google lol…

Christopher

Christopher,

That is so reassuring.  I look forward to hearing how you resolved this thing.  I’m at my wits end.

Naomi