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

Yes, sorry, Rob.  I tried to post it too quickly, I suppose.  That bit is in my config.lua (not in build.settings).  I’ll edit the post so that it’s not too confusing.

Thanks!

Naomi

Hi Rob,

I put together totally stripped down app (only main.lua, build.settings and config.lua).

I built APK using the brand new keystore that I created earlier today.  But it’s giving me the exact same error.  Please see main.lua, build.settings and config.lua along with the full log below.

The log shows the terminal output from the moment I launch the app and then tap on Sign In button three times.

I have no clue where things are going wrong.

Thanks again for looking at this for me.

Naomi

main.lua:

[lua]

display.setStatusBar( display.HiddenStatusBar ); --Hide status bar from the beginning

local gameNetwork = require( “gameNetwork” )

local json = require( “json” )

local widget = require( “widget” )

local function loadLocalUser( event )

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

    if event.isError then

        print("---------- login request failed ----------") 

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

        native.showAlert( “Login Failed”, “Login Failed”, { “OK” } )

    else

        – [edit] it returns event.isError or nothing

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

        native.showAlert( “Login Successful”, “Login Successful!”, { “OK” } )

    end

end

local function initCallback( event )

    print("---------- inside google initCallback ----------")

    if event.isError then

        print("---------- init failed ----------") 

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

        native.showAlert( “Init Failed”, “Init Failed”, { “OK” } )

    else

        – [edit] it returns event.isError or nothing

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

        – Tries to automatically log in the user without displaying the login screen if the user doesn’t want to login

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

    end

end

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

gameNetwork.init( “google”, initCallback )

local function onSystemEvent( event ) 

    if ( event.type == “applicationStart” ) then

        print("------- START of applicationStart ----------")

    elseif ( event.type == “applicationSuspend” ) then 

    

    elseif ( event.type == “applicationResume” ) then

        print("------- START of applicationResume ----------")

    end

end

Runtime:addEventListener( “system”, onSystemEvent )

local signInNow = function()

    local function loadLocalUser( event )

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

        if event.isError then

            print("---------- login request failed ----------") 

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

            native.showAlert( “Login Failed”, “Login Failed”, { “OK” } )

        else

            – it returns event.isError or nothing

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

            native.showAlert( “Login Successful”, “Login Successful!”, { “OK” } )

        end

    end

    local function initCallback( event )

        print("---------- inside initCallback ----------")

        if event.isError then

            print("---------- init failed ----------") 

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

            native.showAlert( “Init Failed”, “Init Failed”, { “OK” } )

        else

            – it returns event.isError or nothing

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

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

        end

    end

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

    gameNetwork.init( “google”, initCallback )

end

local gcSignIn = widget.newButton{

    defaultFile = “btn1.png”,

    overFile = “btn2.png”,

    width = 190,

    height = 42,

    label = “SING IN”,

    labelColor = { default={1.0}, over={1.0} },

    fontSize = 20,

    onRelease = signInNow

}

gcSignIn.x = display.contentCenterX

gcSignIn.y = display.contentCenterY

[/lua]

build.settings:

[lua]

settings = {

    orientation = {

        default = “landscapeRight”,

        supported =

        {

            “landscapeRight”, “landscapeLeft”, 

        },

    },

    android =

    {        

        googlePlayGamesAppId = “1234567890”, – Google Play Games App Id

        usesPermissions =

        {

            – Google Play only

            “com.android.vending.BILLING”,

            “android.permission.GET_ACCOUNTS”,

            “android.permission.RECEIVE_BOOT_COMPLETED”,

            “android.permission.INTERNET”,

            “android.permission.ACCESS_WIFI_STATE”,

            “android.permission.ACCESS_NETWORK_STATE”,

            “com.android.vending.CHECK_LICENSE”, – need this for extension file

            “android.permission.WRITE_EXTERNAL_STORAGE”, – need this for Vungle ads & for extension file

        },

    },

    plugins =

    {

        – GOOGLE PLAY SERVICES (required for delivering ads)

        [“plugin.google.play.services”] = 

        { 

            publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, 

        },

        

        – GOOGLE PLAY GAME SERVICES

        [“CoronaProvider.gameNetwork.google”] = 

        { 

            publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, 

        },

        – GOOGLE IAP V3 

        [“plugin.google.iap.v3”] = 

        { 

            publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, 

        },

    },

}

[/lua]

config.lua (misspelling edited):

[lua]

application = 

{

    launchPad = false,

    license = {

        google = { key = “SuperDuperLoooooongTextString”,},

    },

    

    content = 

    { 

        width = 320,

        height = 480,

        scale = “letterbox”, 

        fps = 60,

        imageSuffix =

        {

            ["@2x"] = 1.5,

            ["@4x"] = 3.0,

        },

    },

}

[/lua]

-------- FULL LOG --------

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

D/dalvikvm(  432): GC_FOR_ALLOC freed 334K, 39% free 16646K/26880K, paused 68ms, total 69ms

D/dalvikvm(  432): GC_FOR_ALLOC freed 506K, 40% free 16387K/26880K, paused 60ms, total 61ms

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

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

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

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

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

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

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

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

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

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

I/OpenAL_SLES(17647): alc_opensles_init

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

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

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

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

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

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

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

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

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

D/dalvikvm(17647): GC_CONCURRENT freed 187K, 4% free 7757K/8008K, paused 4ms+3ms, total 42ms

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

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

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

D/OpenGLRenderer(17647): Enabling debug mode 0

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

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

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

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

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

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

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

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

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

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

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

D/dalvikvm(17647): GC_FOR_ALLOC freed 375K, 6% free 7704K/8144K, paused 23ms, total 23ms

I/dalvikvm-heap(17647): Grow heap (frag case) to 11.489MB for 4096016-byte allocation

D/dalvikvm(17647): GC_FOR_ALLOC freed <1K, 4% free 11704K/12148K, paused 20ms, total 20ms

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

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

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

D/dalvikvm(17647): GC_CONCURRENT freed 14K, 4% free 11710K/12148K, paused 4ms+2ms, total 29ms

I/Corona  (17647): ------- START of applicationStart ----------

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

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x004b

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

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0056

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

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0061

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

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0073

W/dalvikvm(17647): VFY: unable to resolve static field 5001 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0085

W/dalvikvm(17647): VFY: unable to resolve static field 4999 (common_google_play_services_invalid_account_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x00af

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

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x00ce

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

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x000f

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

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0016

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

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x001d

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

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0007

W/dalvikvm(17647): VFY: unable to resolve static field 4996 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0018

W/dalvikvm(17647): VFY: unable to resolve static field 4995 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0038

W/dalvikvm(17647): VFY: unable to resolve static field 4992 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x003f

W/dalvikvm(17647): VFY: unable to resolve static field 5007 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0046

W/dalvikvm(17647): VFY: unable to resolve static field 5004 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0066

W/dalvikvm(17647): VFY: unable to resolve static field 5000 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x006d

W/dalvikvm(17647): VFY: unable to resolve static field 4998 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0074

W/dalvikvm(17647): VFY: unable to resolve static field 5003 (common_google_play_services_unsupported_date_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x007b

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

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

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

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

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

D/BaseGameActivity(17647): onCreate: creating GamesClient

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

D/BaseGameActivity(17647): onConnectionFailed: result 4

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

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

I/Corona  (17647): ---------- login request failed ----------

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

W/InputMethodManagerService(  432): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@423d6f98 attribute=null, token = android.os.BinderProxy@4242fa80

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

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

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

Hi Naomi. 

I will try to build your app tonight using my GPGS app settings (license key, keystore, id, etc.) and see what I can get.  You still have “google” misspelled “googe” in your config.lua.  This very well could be your issue.  Also, it’s very important that you build with the keystore you told GPGS you were going to use when you provided them the SHA1 value.  That SHA1 is a mathematical calculation (think of like a check sum) that verifies the keystore in the app is valid and your app hasn’t been hacked or someone is trying to hack your GPGS setup.  You must build with the keystore that goes with that SHA1 value.  Google won’t automatically update it for  you, even though they seem to figure it out initially.

So fix your config.lua and try with the original keystore used to generate the SHA1 string and let me know if that helps.  If not I’ll try to build it tonight when I have more time.

Rob

Rob,

Actually you don’t need to do that with the keystore anymore it will read the keystore SHA from the product that you have listed via com.yourproduct.id (AFTER you upload your apk that is).

Google resolved this issue about a month ago, you only need to do that if you have NOT uploaded your apk to the console.

Still good practice to do what you suggest but for people that are not familiar with the inner workings of ssl and google I would suggest they upload their apk before even attempting the wizard process.

I just got back and going to build a little sample app for Naomi after I have some coffee and my eyes are not so blurry :slight_smile:

At first glance, I think you might have actually hit the nail on the head with the issue “googe” vs. “google”.

Christopher

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