Is GameCenter broken?

oh, I see the plugins property is in wrong place, will try fix this and check again.

After moving plugins table out of iphone table, the error is fixed. But I got another alert say “game center unavailable”.

thanks Brent. 

Hi Christian,

Are you using iOS8? Have you set Game Center to “sandbox” mode for testing?

Brent

Hi guys!

I’m getting this error in my Xcode console while running my game in iOS 8…

runtime error: ERROR: Could not load provider (gameCenter) due to the following reason: module ‘CoronaProvider.gameNetwork.gameCenter’ not found:resource (CoronaProvider.gameNetwork.gameCenter.lu) does not exist in archive

I’m including the plugin in my build.settings & my build of corona is 2014.2511 and I assume the plugin must included when I send to compile online. I’m a Pro suscriber (now for free) … could somebody help me?

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "portrait", supported = { "portrait", } }, --iOS iphone = { plist = { UIPrerenderedIcon = true, UIStatusBarHidden = true, UIAppFonts = { "Interstate-BlackCondensed.ttf", "Interstate-Regular.ttf", "HFF Low Sun.ttf", "HauntAOE.ttf" }, CFBundleLocalizations = { "English", "Spanish", "Catalan", "Italian" }, -- iOS app URL schemes: UIApplicationExitsOnSuspend = false, FacebookAppID = "1451463131760806", CFBundleIdentifier = "com.thousandgears.animalzombies2", CFBundleURLTypes = { { CFBundleURLSchemes = { "fb1451463131760806", -- example scheme for facebook "coronasdkapp", -- example second scheme } } }, CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-76.png", "Icon-76@2x.png" }, }, components = {} }, plugins = { ["CoronaProvider.gameNetwork.apple"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"] = true } }, ["plugin.openudid"] = { publisherId = "com.coronalabs" }, ["facebook"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone = true, ["iphone-sim"] = true }, }, }, }

Hi @codiwans,

This setup looks basically OK so I’m not sure what’s happening. As a quick test, can you take out the inclusion of the non-gameNetwork plugins (“openudid” and “facebook”) and see if you get the same error?

Also, what is that “components = {}” line in your “iphone” table? Why are you including it, and if there’s a reason, why is it empty?

Brent

Hi Brent!

Sure, I’ve did the test removing the “openuid” and “Facebook”)

The error in the output now is:

Runtime Error: Runtime error: module ‘facebook’ not found:resource (facebook.lu) does not exist in archive

no field package.preload[‘facebook’]

Regarding the “components” not sure why was in the build.settings … (this code is not totally mine)… just removed for the test.

Any ideas?

Thanks a lot for your help!!!

Roger.

Hi Roger,

OK, well go ahead and put the Facebook and OpenUDID plugins back in, but you can remove the “supportedPlatforms” table from Facebook because that’s a plugin for both iOS and Android now (see link below).

http://docs.coronalabs.com/plugin/facebook/index.html

Can I see how those plugins are being require()-d in your code? Typically that would be in main.lua, but if you didn’t write this code, it may not be there.

Thanks,

Brent

Hi Brent,

Sure, thanks for the update of Facebook table, I’ve cleaned the “supportedPlatforms”…

As you told, it’s not in the main.lua

In this file, there’s two points where finishes at some point doing require for “GameNetwork” …

—> this:

require “controller.animalzombies.AZController”

AZ:initialize()

—> and this:

“endSplash()”

main.lua

–require(“mobdebug”).start()

local isAndroid = system.getInfo(“platformName”) == “Android”

local background = nil

if isAndroid then

    background = display.newImage(“androidSplash.jpg”)

    background:scale(display.contentHeight/background.height, display.contentHeight/background.height) 

    background.x, background.y = display.contentCenterX, display.contentCenterY

end

require “controller.animalzombies.AZController”

AZ:initialize()

–AZ.S.purgeOnSceneChange = true

AZ.S.removeOnSceneChange = true

local function onSystem(event)

    if event.type == “applicationSuspend” or event.type == “applicationExit” then

        Runtime:dispatchEvent({ name = GAMEPLAY_PAUSE_EVNAME, isPause = true, pauseType = “pause” })

        system.setIdleTimer(true)

        ----FlurryController.forceSend()

    elseif event.type == “applicationResume” then

        system.setIdleTimer(false)

    end

end

Runtime:addEventListener(“system”, onSystem)

local function onAndroidBackTouch(event)

if event.keyName == “back” and event.phase == “up” then

if AZ.S.isInScene then

local scene = AZ.S.getCurrentSceneOrOverlay()

scene:dispatchEvent({ name = ANDROID_BACK_BUTTON_TOUCH_EVNAME })

end

return true

end

end

Runtime:addEventListener(“key”, onAndroidBackTouch)

local function endSplash()

    AZ.S.gotoScene(“thousandgears.thousandgears”, { time = SCENE_TRANSITION_TIME, effect = SCENE_TRANSITION_EFFECT })

    

    if isAndroid then

        display.remove(background)

    end

end

if isAndroid then

    timer.performWithDelay(1000, endSplash)

else

    endSplash()

end

then reviewing…

thousandgears.lua

when calls the initialize function of GameServicesController:

require “GameServicesController”

GameServicesController:initialize()

function scene:createScene(event) require "GameServicesController" GameServicesController:initialize() local bg = display.newImage("thousandgears/assets/splash\_tg.jpg") bg:scale(display.contentHeight/bg.height, display.contentHeight/bg.height) bg.x, bg.y = display.contentCenterX, display.contentCenterY scene.view:insert(bg) local loader = display.newImage("assets/loader.png") loader.x, loader.y = display.contentCenterX, display.contentHeight \*0.85 loader:scale(SCALE\_DEFAULT, SCALE\_DEFAULT) scene.view:insert(loader) local function rotate() loader.rotation = 0 loaderTrans = transition.to(loader, { time = 1000, rotation = 360, onComplete = rotate }) end rotate() end

the execution goes here…

The require call is in a file called:

GameServicesController.lua

function GameServicesController:initialize() if not active then return end local gameNetwork = require "gameNetwork" GameServicesController.loggedIntoGC = false --saveAchievementsLocal() loadAchievementsLocal() --print("\*\*\*GAME SERVICE\*\*\*: initialize "..tostring(GameServicesController.loggedIntoGC)) if (system.getInfo("platformName") == "Android") then GameServicesController.gameServiceName = "google" GameServicesController:login(true) else GameServicesController.gameServiceName = "gamecenter" GameServicesController:login(false) end end

… and there are another file:

achievementsManager.lua doing a the same require in the initial variables…

local achievementsMngr = {} achievementsMngr.dict = {} achievementsMngr.unlocked = {} achievementsMngr.perLevelWeapons = {} achievementsMngr.perLevelZombies = {} achievementsMngr.gameNetwork = require "gameNetwork" achievementsMngr.loggedIntoGC = false achievementsMngr.gameServiceName = nil achievementsMngr.savedAchievements = {}

and this is the other point where calls the require for “achievementManager” from main.lua

AZController.lua

local function prepare() AZ.S = require "superStoryboard" AZ.utils = require "utils" AZ.ui = require "ui" AZ.gui = require "gui" AZ.audio = require "controller.audio.audioController" AZ.animsLibrary = require "test\_animsLibrary" AZ.soundLibrary = require "soundsLibrary" AZ.zombiesLibrary = require "zombiesLibrary" AZ.atlas = require "atlas" AZ.jsonIO = require "jsonIO" AZ.fb = require "controller.fb" AZ.achievementsManager = require "achievements.achievementsManager" AZ.notificationController = require "test\_notificationController" AZ.notificationController:init({}); AZ.recoveryController = require "test\_recoveryController" AZ.recoveryController:init({}); require "constants" require "test\_constants" require "resolutions" -- AZ.translations = require "translations" AZ.loader = require "loader" system.setIdleTimer(false) display.setStatusBar(display.HiddenStatusBar) AZ.utils.activateDeactivateMultitouch(false) AZ.utils.platform = system.getInfo("platformName") AZ.soundLibrary.loadSounds() if AZ.isTest then require "debugLog" end AZ.Gamedonia = require "controller.gamedonia.GamedoniaController" AZ.Gamedonia:init() end

… What do you think?

Hi @codiwans,

What is that “GamedoniaController” require() and what does it do? Does the game reach that point before you get the warning message?

Brent

Hi Brent!

You’re really patient, thanks again for you support.

Ok, “GamedoniaController” is a class which performs the connections with our game as a service platform, in there we’ve all the databases, users & stats for balancing the game.

So, the game is reaching this point, in fact in my console, I’m getting some good logs from GamedoniaController even after the crash about GameCenter Network… just have a look:

-> It looks like the thread it’s performing to actions at once, in one hand is synchronizing the user configuration file with gamedonia and in other hand, it’s trying to get a connection with Game Center in order to stablish connection after discovering which user is… then crashes with the magic:  

Could not load provider (gameCenter) due to the following reason: module ‘CoronaProvider.gameNetwork.gameCenter’ not found:resource (CoronaProvider.gameNetwork.gameCenter.lu) does not exist in archive

-> here you have my console log

Hope you see something else more than me :slight_smile:

Mar 30 20:42:52 Ratatui kernel[0] \<Notice\>: xpcproxy[255] Container: /private/var/mobile/Containers/Data/Application/E6940988-1375-47D9-8E52-048F5C889AA9 (sandbox) Mar 30 20:42:52 Ratatui locationd[60] \<Notice\>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0 Mar 30 20:42:52 Ratatui AZ[255] \<Error\>: assertion failed: 12B435: libxpc.dylib + 51955 [6D3E948A-39BD-3548-AA90-38575933BDEF]: 0x7d Mar 30 20:42:52 Ratatui Unknown[255] \<Error\>: Mar 30 20:42:53 Ratatui AZ[255] \<Warning\>: Platform: iPad / iPad2,2 / 8.1.1 / PowerVR SGX 543 / OpenGL ES 2.0 IMGSGX543-113.3 / 2014.2511 Mar 30 20:42:55 Ratatui AZ[255] \<Warning\>: Warning: /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/soundsLibrary.lua:193: audio.loadSound() failed to create sound 'assets/audio/slotWin.mp3' Mar 30 20:42:55 Ratatui AZ[255] \<Warning\>: Gamedonia.init Mar 30 20:42:55 Ratatui AZ[255] \<Warning\>: Gamedonia.userdefault - no file opened Mar 30 20:42:56 Ratatui locationd[60] \<Notice\>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0 Mar 30 20:42:56 Ratatui backboardd[53] \<Warning\>: CoreAnimation: updates deferred for too long Mar 30 20:42:56 Ratatui wifid[65] \<Notice\>: WiFi:[449433776.611620]: Client itunesstored set type to background application Mar 30 20:42:56 Ratatui wifid[65] \<Notice\>: WiFi:[449433776.612262]: \_\_WiFiManagerSetEnableState: state TRUE, manager-\>enable.setting TRUE, manager-\>unlockedSinceBoot TRUE Mar 30 20:42:56 Ratatui wifid[65] \<Notice\>: WiFi:[449433776.621740]: BG Application: Not Present, BG Daemon: Present. Daemons: apsd itunesstored networkd Mar 30 20:42:56 Ratatui wifid[65] \<Notice\>: WiFi:[449433776.627358]: Already connected to WLAN\_79E9. Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: login success. user already exists Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: we don't have local info, requesting gamedonia's Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: ---------------------------------------------------------------------------------------------------------------------------------- Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.responseHeaders.Access-Control-Allow-Origin = "\*" Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.responseHeaders.Content-Length = "0" Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.responseHeaders.Connection = "keep-alive" Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.responseType = "text" Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.phase = "ended" Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.bytesEstimated = 0 Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.response = "" Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.name = "networkRequest" Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.bytesTransferred = 0 Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.status = 200 Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.url = "http://api.gamedonia.com/v1/device/register" Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.isError = false Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: devicesRegisterEvent.requestId = userdata: 0x1452afb4 Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: ---------------------------------------------------------------------------------------------------------------------------------- Mar 30 20:42:56 Ratatui AZ[255] \<Warning\>: GamedoniaDevicesRegister.listener - event: 200 Mar 30 20:42:57 Ratatui AZ[255] \<Warning\>: current file received: UserConfig\_DATA, success? true Mar 30 20:42:57 Ratatui AZ[255] \<Warning\>: previous purchases restored Mar 30 20:42:57 Ratatui AZ[255] \<Warning\>: Gamedonia.store.requestProducts Mar 30 20:42:57 Ratatui AZ[255] \<Warning\>: user logged saveData Mar 30 20:42:57 Ratatui AZ[255] \<Warning\>: current file received: Bank\_DATA, success? true Mar 30 20:42:57 Ratatui AZ[255] \<Warning\>: \* config synchronized with gamedonia: true \* Mar 30 20:42:58 Ratatui AZ[255] \<Warning\>: current file received: Shop\_DATA, success? true Mar 30 20:42:58 Ratatui AZ[255] \<Warning\>: current file received: Slot\_DATA, success? true Mar 30 20:42:59 Ratatui AZ[255] \<Warning\>: current file received: Localization\_DATA, success? true Mar 30 20:43:00 Ratatui AZ[255] \<Warning\>: current file received: Stage1\_DATA, success? true Mar 30 20:43:01 Ratatui AZ[255] \<Warning\>: current file received: Stage2\_DATA, success? true Mar 30 20:43:01 Ratatui AZ[255] \<Warning\>: current file received: Stage3\_DATA, success? true Mar 30 20:43:02 Ratatui AZ[255] \<Warning\>: current file received: Stage4\_DATA, success? true Mar 30 20:43:03 Ratatui AZ[255] \<Warning\>: current file received: Tips\_DATA, success? true Mar 30 20:43:03 Ratatui AZ[255] \<Warning\>: Gamedonia.store.requestProducts Mar 30 20:43:03 Ratatui AZ[255] \<Warning\>: Runtime error ERROR: Could not load provider (gameCenter) due to the following reason: module 'CoronaProvider.gameNetwork.gameCenter' not found:resource (CoronaProvider.gameNetwork.gameCenter.lu) does not exist in archive no field package.preload['CoronaProvider.gameNetwork.gameCenter'] no file '/private/var/mobile/Containers/Bundle/Application/20FDD625-3F63-4D91-B8B7-F0B13B8849EF/AZ.app/CoronaProvider.gameNetwork.gameCenter.lua' no file '/private/var/mobile/Containers/Bundle/Application/20FDD625-3F63-4D91-B8B7-F0B13B8849EF/AZ.app/CoronaProvider.gameNetwork.gameCenter.lua' no file './CoronaProvider.gameNetwork.gameCenter.so' no file '/private/var/mobile/Containers/Bundle/Application/20FDD625-3F63-4D91-B8B7-F0B13B8849EF/AZ.app/CoronaProvider.gameNetwork.gameCenter.so' no file './CoronaProvider.so' no file '/private/var/mobile/Containers/Bundle/Application/20FDD625-3F63-4D91-B8B7-F0B13B8849EF/AZ.app/CoronaProvider.so'CoronaProvider.gameNetwork.gameCenter. stack traceback: [C]: ? [C]: in function 'assert' ?: in function 'requireProvider' ?: in function 'setCurrentProvider' /Users/perry/src/corona/core/main/plugins/gameNetwork/ios/../shared/gameNetwork.lua:18: in function 'init' /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/achievements/achievementsManager.lua:214: in function 'login' /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/achievements/achievementsManager.lua:228: in function 'connectToGC' /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/achievements/achievementsManager.lua:236: in function 'setup' /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/menu/menu.lua:54: in function \</Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/menu/menu.lua:52\> ?: in function 'dispatchEvent' /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/superStoryboard.lua:1666: in function 'gotoScene' /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/thousandgears/thousandgears.lua:26: in function 'gotoMenu' /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/thousandgears/thousandgears.lua:33: in function \</Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/thousandgears/thousandgears.lua:7\> ?: in function 'dispatchEvent' /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/controller/gamedonia/GamedoniaController.lua:562: in function 'dispatchFileReceivedEvent' /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/controller/gamedonia/GamedoniaController.lua:659: in function 'target' /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/controller/gamedonia/plugin\_gamedonia.lua:745: in function 'onRequestCompleted' /Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/controller/gamedonia/plugin\_gamedonia.lua:738: in function \</Users/gizzofytal/Documents/codiwans/Dropbox/Codiwans/Thousand Gears Ltd/Workspace/Animal\_Zombies/trunk/controller/gamedonia/plugin\_gamedonia.lua:733\> Mar 30 20:43:03 Ratatui AZ[255] \<Warning\>: WARNING! Couldn't load these products: bank\_twitter\_coins, bank\_facebook\_coins Mar 30 20:43:03 Ratatui AZ[255] \<Warning\>: get bank data saveData Mar 30 20:43:03 Ratatui AZ[255] \<Warning\>: \* config synchronized with gamedonia: true \*

Hi Roger,

I’m suspicious of this Gamedonia code and calls. What is that and what does it do? That code may be calling the store improperly.

Brent