Google Play Game Services strange error during init

Ok, so after going through all the logs I found these weird and error logs from my crashed app. This is the log from the app that works and built using Corona Pro :
 

02-04 06:34:10.658 I/Corona (15930): start google network yoh 02-04 06:34:10.658 V/Corona (15930): \> Class.forName: CoronaProvider.gameNetwork.google.LuaLoader 02-04 06:34:10.666 V/Corona (15930): \< Class.forName: CoronaProvider.gameNetwork.google.LuaLoader 02-04 06:34:10.666 V/Corona (15930): Loading via reflection: CoronaProvider.gameNetwork.google.LuaLoader 02-04 06:34:10.940 E/LockPatternKeyguardView(1713): showAlmostAtAccountLoginDialog()

And this is the log from the crashed app :
First, I noticed this log

02-04 00:07:08.752 V/Corona (9826): \> Class.forName: CoronaProvider.licensing.google.LuaLoader 02-04 00:07:08.752 V/Corona (9826): WARNING: Could not load 'LuaLoader'

and then this is the part when it tried to init google and login :

02-04 00:07:20.994 I/Corona (9826): start google network yoh 02-04 00:07:20.994 V/Corona (9826): \> Class.forName: CoronaProvider.gameNetwork.google.LuaLoader 02-04 00:07:21.080 I/dalvikvm(9826): Could not find method com.google.android.gms.games.GamesClient.loadAchievements, referenced from method CoronaProvider.gameNetwork.google.LuaLoader.request 02-04 00:07:21.080 W/dalvikvm(9826): VFY: unable to resolve virtual method 8791: Lcom/google/android/gms/games/GamesClient;.loadAchievements (Lcom/google/android/gms/games/achievement/OnAchievementsLoadedListener;)V 02-04 00:07:21.080 D/dalvikvm(9826): VFY: replacing opcode 0x6e at 0x03da 02-04 00:07:21.096 D/dalvikvm(9826): VFY: dead code 0x03dd-03de in LCoronaProvider/gameNetwork/google/LuaLoader;.request (Lcom/naef/jnlua/LuaState;)I 02-04 00:07:21.096 V/Corona (9826): \< Class.forName: CoronaProvider.gameNetwork.google.LuaLoader 02-04 00:07:21.104 V/Corona (9826): Loading via reflection: CoronaProvider.gameNetwork.google.LuaLoader 02-04 00:07:21.455 D/dalvikvm(9670): GC\_FOR\_MALLOC freed 8222 objects / 494544 bytes in 264ms 02-04 00:07:21.932 W/dalvikvm(9826): VFY: unable to resolve static field 3035 (common\_google\_play\_services\_unknown\_issue) in Lcom/google/android/gms/R$string; 02-04 00:07:21.932 D/dalvikvm(9826): VFY: replacing opcode 0x60 at 0x003f .......going like this for few lines and then ..... 02-04 00:07:22.080 D/dalvikvm(9826): VFY: dead code 0x000e-0010 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.isGooglePlayServicesAvailable (Landroid/content/Context;)I 02-04 00:07:22.088 E/GooglePlayServicesUtil(9826): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

I’m not sure what to make of this… It seems I miss few libs but I can’t tell which libs to use since I thought I already use the latest and everything…

Could not find method com.google.android.gms.games.GamesClient.loadAchievements, referenced from method CoronaProvider.gameNetwork.google.LuaLoader.request

In my opinion this indicates, that you didn’t include the correct jar file in your project, it looks like a mismatch between corona plugin and GPGS jar.

P.s.

I have found something most irritating in the buildfile for android projects - as part of the build, libs directory are removed.

Make sure, that during build, you use the jar you expect to use.

yeah… i thought so too… but the jars are from what’s inside the enterprise plugin package put inside the project’s libs folder… so it confuses the hell out of me, what else do i need to do?

I really don’t know what to ask anymore… the corona staffs haven’t responded yet :frowning:
 

yanuar, bare with me, I’ll try to create a sample project, maybe from the sample sources, and see what I end up with.

However it will take a moment, I’m in the middle of something.

contact me via email/pm, it will be easier to chat, and we’ll just update the thread with our findings.

cool, I sent you a message since I dont know your email

yanuar,

sorry it took so long.

So I was finally able to create a sample project.

I have used my appid from my old game and its package.

Here are things I did:

I’ve copied google licensing jar from CoronaEnterprise/Plugins/google-licensing/android/bin directory [I wrote it from memory, so YMMV regarding the path ;)]

I’ve copied game network google jars from CoronaEnterprisePlugins package:

CoronaProvider.gameNetwork.google.jar

google-play-services.jar

I have included following entry in my android manifest under application node:

 <meta-data android:name=“com.google.android.gms.games.APP_ID” android:value="\ 123456789"/>

And this is my code from main.lua:

-- hide the status bar display.setStatusBar(display.HiddenStatusBar) local gameNetwork = require "gameNetwork" local showButton = display.newRect(100, 300, 100, 100) showButton:addEventListener("tap", function() &nbsp; &nbsp; gameNetwork.request("login") end) local cache2Button = display.newRect(300, 100, 100, 100) cache2Button:addEventListener("tap", function() &nbsp; &nbsp; gameNetwork.show("leaderboards") end) local show2Button = display.newRect(300, 300, 100, 100) show2Button:addEventListener("tap", function() &nbsp; &nbsp; gameNetwork.show("achievements") end) -- Init game network to use Google Play game services gameNetwork.init("google", function(event) logTable(event) end) &nbsp;

Sorry about code ugliness, I just used this project for testing my own plugins.

Anyway… logTable function pretty prints table to the console, just to check if everything is returned ok.

I first tap on the button with gameNetwork.login function call, I was able to select my account, then I tapped on achievements button and I was able to see my predefined achievements.

I think the problem you have is with the android manifest entry.

You have to remember, that normally, you would define your app id in your resources, and simply link the string in android manifest.

Since now you are specifying it manually straight in xml, you have to make sure it’s a string and not an integer.

In order to do that I used a backslash and space before the ID.

Try that, hopefully this will help.

Let me know how it went.

Krystian

Since now you are specifying it manually straight in xml, you have to make sure it’s a string and not an integer.

In order to do that I used a backslash and space before the ID.

 

Hot diggity! This one did it… thank you so much! I owe you  much beer…

Hmm… if this is the trick then how come the androidmanifest.xml from the Corona Pro build doesn’t use it?

Oh well, doesn’t matter lol

 

Thanks krystian6

yanuar, beer is an accepted currency :slight_smile:

I think CoronaPro does this casting behind the scenes and initiates the game network manually passing the game id, I might be wrong though.

Anyway, I’m happy it all worked out for you :slight_smile:

Hello,

I am having difficulty in getting the SHA1 fingerprint of the certificate. I am following instructions on (https://developers.google.com/games/services/console/enabling) but I am still not being able to get the “c” part (in the link) done i.e, to get the release certificate fingerprint and to get the debug certificate fingerprint. 

Thanks