"module 'CoronaProvider.gameNetwork.google' not found" (GPGS)

Hi,

I just read some tutorials here about Google Game Play Services and I have a Developer account.

main.lua doesn’t seem to go further then to this line:

gameNetwork.init( “google”, gpgsInitCallback )

I checked the log (through adb) and here is some error output:

V/Corona (22461): \> Class.forName: CoronaProvider.gameNetwork.google.LuaLoader V/Corona (22461): Loading plugins: CoronaProvider.gameNetwork.google.LuaLoader D/dalvikvm(22481): GC\_CONCURRENT freed 145K, 12% free 18095K/20544K, paused 3ms+1ms, total 19ms V/Corona (22461): Failed to write file: /data/data/chinese.jefecitostudios.com/cache/.system/resources/plugins.dex for library CoronaProvider.gameNetwork.google. I/Corona (22461): Runtime error I/Corona (22461): ERROR: Could not load provider (google) due to the following reason: module 'CoronaProvider.gameNetwork.google' not found:resource (CoronaProvider.gameNetwork.google.lu) does not exist in archive I/Corona (22461): no field package.preload['CoronaProvider.gameNetwork.google'] I/Corona (22461): no file '(null)/CoronaProvider.gameNetwork.google.lua' I/Corona (22461): no file '(null)/CoronaProvider.gameNetwork.google.lua' I/Corona (22461): no file '/data/data/chinese.jefecitostudios.com/lib/libCoronaProvider.gameNetwork.google.so' I/Corona (22461): no file './CoronaProvider.gameNetwork.google.so' I/Corona (22461): no file '(null)/CoronaProvider.gameNetwork.google.so' I/Corona (22461): no file '/data/data/chinese.jefecitostudios.com/lib/libCoronaProvider.so' I/Corona (22461): no file './CoronaProvider.so' I/Corona (22461): no file '(null)/CoronaProvider.so'. I/Corona (22461): stack traceback: I/Corona (22461): [C]: ? I/Corona (22461): [C]: in function 'assert' I/Corona (22461): ?: in function 'requireProvider' I/Corona (22461): ?: in function 'setCurrentProvider' I/Corona (22461): ?: in function 'init' I/Corona (22461): ...\Jefecito\Documents\Corona Projects\Chinese\main.lua:28: in function 'gameNetworkSetup' I/Corona (22461): ...\Jefecito\Documents\Corona Projects\Chinese\main.lua:4

This is my build.settings:

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "landscapeRight", supported = { "landscapeRight", } }, iphone = { plist = { UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend --[[-- iOS app URL schemes: CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXXXXXXX", -- example scheme for facebook "coronasdkapp", -- example second scheme } } } --]] } }, android = { googlePlayGamesAppId = "945719169679" --long App ID number (use yours!) }, plugins = { --key is the name passed to the Lua "require()" ["CoronaProvider.gameNetwork.google"] = { --required! publisherId = "com.coronalabs", }, }, --[[-- Android permissions androidPermissions = { "android.permission.INTERNET", },]]-- }

Right now main.lua doesn’t try to do anything else then to connect to GGPS:

local normalchinese = require 'normalchinese' local gameNetwork = require( "gameNetwork" ) local widget = require( "widget" ) local function loadLocalPlayerCallback( event ) display.newText("loadLocalPlayerCallback", 0, 100, native.systemFont, 16) playerName = event.data.alias display.newText(playerName, 0, 120, native.systemFont, 16) --saveSettings() --save player data locally using your own "saveSettings()" function end local function gameNetworkLoginCallback( event ) display.newText("gameNetworkLoginCallback", 0, 80, native.systemFont, 16) gameNetwork.request( "loadLocalPlayer", { listener=loadLocalPlayerCallback } ) return true end local function gpgsInitCallback( event ) display.newText("gpgsInitCallback", 0, 60, native.systemFont, 16) gameNetwork.request( "login", { userInitiated=true, listener=gameNetworkLoginCallback } ) end local function gameNetworkSetup() display.newText("gameNetworkSetup", 0, 40, native.systemFont, 16) if ( system.getInfo("platformName") == "Android" ) then display.newText("google", 150, 40, native.systemFont, 16) gameNetwork.init( "google", gpgsInitCallback ) else display.newText("gamecenter", 150, 40, native.systemFont, 16) gameNetwork.init( "gamecenter", gameNetworkLoginCallback ) end end ------HANDLE SYSTEM EVENTS------ local function systemEvents( event ) display.newText("systemEvents", 0, 20, native.systemFont, 16) print("systemEvent " .. event.type) if ( event.type == "applicationSuspend" ) then print( "suspending..........................." ) elseif ( event.type == "applicationResume" ) then print( "resuming............................." ) elseif ( event.type == "applicationExit" ) then print( "exiting.............................." ) elseif ( event.type == "applicationStart" ) then gameNetworkSetup() --login to the network here end return true end Runtime:addEventListener( "system", systemEvents ) local function showLeaderboards( event ) display.newText(system.getInfo("platformName"), 0, 0, native.systemFont, 16) if ( system.getInfo("platformName") == "Android" ) then gameNetwork.show( "leaderboards" ) else gameNetwork.show( "leaderboards", { leaderboard = {timeScope="AllTime"} } ) end return true end function onButtonEvent() showLeaderboards() end local myButton = widget.newButton { left = 200, top = 80, label = "Show Leaderboard", labelAlign = "center", font = "Arial", fontSize = 18, labelColor = { default = {0,0,0}, over = {255,255,255} }, onEvent = onButtonEvent } myButton.baseLabel = "Default" function main() -- showLeaderboards() --mainNormalChinese() end main()

Under my Google Developer account I can see under “Linked Apps” that the package name is the same as under Corona:

chinese.jefecitostudios.com

I have verified the AppID aswell.

What can be wrong with this?

I feel there might be something with the setup of my app under Google as the code is more or less copy-and-paste from the tutorial (http://www.coronalabs.com/blog/2013/06/25/tutorial-introducing-google-play-game-services/)

Thanks in advanced for your help!

Best regards,

Tomas

I also noticed that when I created app on Google Developer I used the key from:

C:\Users\Jefecito\.android\debug.keystore

And Corona was using:

C:\Program Files (x86)\Corona Labs\Corona SDK\Resources\debug.keystore

I changed is to now it uses the .android keystore but it still doesn’t work.

Best regards,

Tomas

I have been able to upload the APK to Google Developer account, creating a alpha users and being able to download it from “Google Play” so it doesn’t seem to be any wrong with that.

Should publisherID (in build.settings) be my own packade name (chinese.jefecitostudios.com) or Coronas (com.coronalabs)?

I have tried both and none of them work.

logcat:

I/Corona (13917): systemEvent applicationStart V/Corona (13917): \> Class.forName: CoronaProvider.gameNetwork.google.LuaLoader V/Corona (13917): Loading plugins: CoronaProvider.gameNetwork.google.LuaLoader V/Corona (13917): Failed to write file: /data/data/chinese.jefecitostudios.com/cache/.system/resources/plugins.dex for library CoronaProvider.gameNetwork.google. I/Corona (13917): Runtime error I/Corona (13917): ERROR: Could not load provider (google) due to the following reason: module 'CoronaProvider.gameNetwork.google' not found:resource (CoronaProvider.gameNetwork.google.lu) does not exist in archive I/Corona (13917): no field package.preload['CoronaProvider.gameNetwork.google'] I/Corona (13917): no file '(null)/CoronaProvider.gameNetwork.google.lua' I/Corona (13917): no file '(null)/CoronaProvider.gameNetwork.google.lua' I/Corona (13917): no file '/data/data/chinese.jefecitostudios.com/lib/libCoronaProvider.gameNetwork.google.so' I/Corona (13917): no file './CoronaProvider.gameNetwork.google.so' I/Corona (13917): no file '(null)/CoronaProvider.gameNetwork.google.so' I/Corona (13917): no file '/data/data/chinese.jefecitostudios.com/lib/libCoronaProvider.so' I/Corona (13917): no file './CoronaProvider.so' I/Corona (13917): no file '(null)/CoronaProvider.so'. I/Corona (13917): stack traceback: I/Corona (13917): [C]: ? I/Corona (13917): [C]: in function 'assert' I/Corona (13917): ?: in function 'requireProvider' I/Corona (13917): ?: in function 'setCurrentProvider' I/Corona (13917): ?: in function 'init' I/Corona (13917): ?: in function '?' I/Corona (13917): ?: in function \<?:36\> I/Corona (13917): ?: in function \<?:218\>

For sure someone must be able to help me with this?

Thanks in advance!

Best regards,

Tomas

Do I need to set permission so the app can write a file or does Corona set that during the build?

Regarding this error:

V/Corona ( 6489): Failed to write file: /data/data/chinese.jefecitostudios.com/cache/.system/resources/plugins.dex for library CoronaProvider.gameNetwork.google. I/Corona ( 6489): Runtime error

I verified through “File Manager” and the folder “data/data/” has drw permissions so that shouldn’t be the problem.

It looks to me like it might be a  path problem on your windows box.  See the error line:

no file ‘(null)/CoronaProvider.gameNetwork.google.so’

I’ll need an engineer to verify this, but does your home directory on windows have a path name that has Unicode characters in it?  (The path to your “My Documents” folder or whatever it is on your version of Windows.  We have recently identified a problem with some circumstances where having unicode characters in the path creates issues.  This is fixed in recent daily builds, but won’t be available to starter accounts until the next public build in a few weeks.   If your username has unicode characters, you might want to try creating a user that doesn’t have them and see if you still have this problem.

Hi Rob,

thanks for your answer.

My username on my computer is “Jefecito” and this is the path to the Corona Files: 

C:\Users\Jefecito\Documents\Corona Projects\Chinese

I can’t see any special characters.

I don’t know if it matters or not knowing that I’m using Windows 7?

The Corona path is:

C:\Program Files (x86)\Corona Labs\Corona SDK

And under the folder “Resources” I can see gameNetwork.dll

Also I know that I have had some problem with creating and removing file from my C drive when I don’t press “Run as Administrator” for example. Might that cause this problem somehow?

Thanks again for your help,

Best regards,

Tomas

Hi Rob (or anyone),

do you have anymore suggestions on what I can check to get this to work?

Another thing that popped up is that I have an old inactive installation under C:/Windows.old. I had some problems before so I just installed the current version over the other to be able to access my files from my old installation and then I just left it. Don’t know if that can cause the problem you’re mentioning?

Thanks in advance!

Best regards,

Tomas

That sounds like something worth checking, try a fresh install to the expected path.m

I’ll ping an engineer about it, but I know they are incredibly slammed right now and have almost no time to be interrupted for the next few days.

Hi Rob,

Now it works. What I did was:

* Formatted the whole C drive including the Windows 7 that I used and the old Windows.old folder

* Installed a fresh installation of Windows 7 in English (The one before was in Spanish so there have might been some “é” or something like that hidden in the system somewhere)

* Re-installed Corona

* Rebuilt my app and installed the APK on the same Galaxy S4 and now it works

Thanks for the help Rob!

Best regards,

Tomas

I also noticed that when I created app on Google Developer I used the key from:

C:\Users\Jefecito\.android\debug.keystore

And Corona was using:

C:\Program Files (x86)\Corona Labs\Corona SDK\Resources\debug.keystore

I changed is to now it uses the .android keystore but it still doesn’t work.

Best regards,

Tomas

I have been able to upload the APK to Google Developer account, creating a alpha users and being able to download it from “Google Play” so it doesn’t seem to be any wrong with that.

Should publisherID (in build.settings) be my own packade name (chinese.jefecitostudios.com) or Coronas (com.coronalabs)?

I have tried both and none of them work.

logcat:

I/Corona (13917): systemEvent applicationStart V/Corona (13917): \> Class.forName: CoronaProvider.gameNetwork.google.LuaLoader V/Corona (13917): Loading plugins: CoronaProvider.gameNetwork.google.LuaLoader V/Corona (13917): Failed to write file: /data/data/chinese.jefecitostudios.com/cache/.system/resources/plugins.dex for library CoronaProvider.gameNetwork.google. I/Corona (13917): Runtime error I/Corona (13917): ERROR: Could not load provider (google) due to the following reason: module 'CoronaProvider.gameNetwork.google' not found:resource (CoronaProvider.gameNetwork.google.lu) does not exist in archive I/Corona (13917): no field package.preload['CoronaProvider.gameNetwork.google'] I/Corona (13917): no file '(null)/CoronaProvider.gameNetwork.google.lua' I/Corona (13917): no file '(null)/CoronaProvider.gameNetwork.google.lua' I/Corona (13917): no file '/data/data/chinese.jefecitostudios.com/lib/libCoronaProvider.gameNetwork.google.so' I/Corona (13917): no file './CoronaProvider.gameNetwork.google.so' I/Corona (13917): no file '(null)/CoronaProvider.gameNetwork.google.so' I/Corona (13917): no file '/data/data/chinese.jefecitostudios.com/lib/libCoronaProvider.so' I/Corona (13917): no file './CoronaProvider.so' I/Corona (13917): no file '(null)/CoronaProvider.so'. I/Corona (13917): stack traceback: I/Corona (13917): [C]: ? I/Corona (13917): [C]: in function 'assert' I/Corona (13917): ?: in function 'requireProvider' I/Corona (13917): ?: in function 'setCurrentProvider' I/Corona (13917): ?: in function 'init' I/Corona (13917): ?: in function '?' I/Corona (13917): ?: in function \<?:36\> I/Corona (13917): ?: in function \<?:218\>

For sure someone must be able to help me with this?

Thanks in advance!

Best regards,

Tomas

Do I need to set permission so the app can write a file or does Corona set that during the build?

Regarding this error:

V/Corona ( 6489): Failed to write file: /data/data/chinese.jefecitostudios.com/cache/.system/resources/plugins.dex for library CoronaProvider.gameNetwork.google. I/Corona ( 6489): Runtime error

I verified through “File Manager” and the folder “data/data/” has drw permissions so that shouldn’t be the problem.

It looks to me like it might be a  path problem on your windows box.  See the error line:

no file ‘(null)/CoronaProvider.gameNetwork.google.so’

I’ll need an engineer to verify this, but does your home directory on windows have a path name that has Unicode characters in it?  (The path to your “My Documents” folder or whatever it is on your version of Windows.  We have recently identified a problem with some circumstances where having unicode characters in the path creates issues.  This is fixed in recent daily builds, but won’t be available to starter accounts until the next public build in a few weeks.   If your username has unicode characters, you might want to try creating a user that doesn’t have them and see if you still have this problem.

Hi Rob,

thanks for your answer.

My username on my computer is “Jefecito” and this is the path to the Corona Files: 

C:\Users\Jefecito\Documents\Corona Projects\Chinese

I can’t see any special characters.

I don’t know if it matters or not knowing that I’m using Windows 7?

The Corona path is:

C:\Program Files (x86)\Corona Labs\Corona SDK

And under the folder “Resources” I can see gameNetwork.dll

Also I know that I have had some problem with creating and removing file from my C drive when I don’t press “Run as Administrator” for example. Might that cause this problem somehow?

Thanks again for your help,

Best regards,

Tomas

Hi Rob (or anyone),

do you have anymore suggestions on what I can check to get this to work?

Another thing that popped up is that I have an old inactive installation under C:/Windows.old. I had some problems before so I just installed the current version over the other to be able to access my files from my old installation and then I just left it. Don’t know if that can cause the problem you’re mentioning?

Thanks in advance!

Best regards,

Tomas

That sounds like something worth checking, try a fresh install to the expected path.m

I’ll ping an engineer about it, but I know they are incredibly slammed right now and have almost no time to be interrupted for the next few days.

Hi Rob,

Now it works. What I did was:

* Formatted the whole C drive including the Windows 7 that I used and the old Windows.old folder

* Installed a fresh installation of Windows 7 in English (The one before was in Spanish so there have might been some “é” or something like that hidden in the system somewhere)

* Re-installed Corona

* Rebuilt my app and installed the APK on the same Galaxy S4 and now it works

Thanks for the help Rob!

Best regards,

Tomas