Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Fatal error when app starts
Started by sysads Sep 24 2019 03:25 AM

10 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

sysads

[GLOBAL: userInfoPane.html]
sysads
  • Contributor

  • 112 posts
  • Corona SDK

I tried updating my game to latest Appodeal plugin and after build is completed and installed on my phone, the game starts but then crash with this error captured in log:

--------- beginning of crash
09-24 09:57:18.324 15482 15482 E AndroidRuntime: FATAL EXCEPTION: main
09-24 09:57:18.324 15482 15482 E AndroidRuntime: Process: com.gamers.tetrispuzzle, PID: 15482
09-24 09:57:18.324 15482 15482 E AndroidRuntime: java.lang.ClassCastException: com.google.android.gms.internal.dw$g cannot be cast to com.google.android.gms.common.GooglePlayServicesClient$OnConnectionFailedListener
09-24 09:57:18.324 15482 15482 E AndroidRuntime: 	at com.google.android.gms.internal.dx.a(Unknown Source)
09-24 09:57:18.324 15482 15482 E AndroidRuntime: 	at com.google.android.gms.internal.dw$h.b(Unknown Source)
09-24 09:57:18.324 15482 15482 E AndroidRuntime: 	at com.google.android.gms.internal.dw$h.b(Unknown Source)
09-24 09:57:18.324 15482 15482 E AndroidRuntime: 	at com.google.android.gms.internal.dw$b.bR(Unknown Source)
09-24 09:57:18.324 15482 15482 E AndroidRuntime: 	at com.google.android.gms.internal.dw$a.handleMessage(Unknown Source)
09-24 09:57:18.324 15482 15482 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
09-24 09:57:18.324 15482 15482 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
09-24 09:57:18.324 15482 15482 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6682)
09-24 09:57:18.324 15482 15482 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
09-24 09:57:18.324 15482 15482 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
09-24 09:57:18.324 15482 15482 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

Please can anyone advise on what could be causing this. Thanks

 

build.settings [Updated]

settings =
{
    plugins =
    {
		-- Base
        ['plugin.appodeal.base'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.GoogleAdMob'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' },
 
        -- Banner
        ['plugin.appodeal.AppLovin'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.FacebookAudience'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Flurry'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.InMobi'] = { publisherId = 'com.coronalabs' },
        --['plugin.appodeal.MyTarget'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Yandex'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.AmazonAds'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.TwitterMoPub'] = { publisherId = 'com.coronalabs' },
 
        -- Interstitial
        ['plugin.appodeal.AdColony'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.AppLovin'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Chartboost'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.FacebookAudience'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Flurry'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.InMobi'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.IronSource'] = { publisherId = 'com.coronalabs' },
        --['plugin.appodeal.Mobvista'] = { publisherId = 'com.coronalabs' },
        --['plugin.appodeal.MyTarget'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Ogury'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.AmazonAds'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.TwitterMoPub'] = { publisherId = 'com.coronalabs' },
 
        -- Rewarded Video
        ['plugin.appodeal.AdColony'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.AppLovin'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Chartboost'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.FacebookAudience'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Flurry'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.InMobi'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.IronSource'] = { publisherId = 'com.coronalabs' },
        --['plugin.appodeal.Mobvista'] = { publisherId = 'com.coronalabs' },
        --['plugin.appodeal.MyTarget'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Unity'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Vungle'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Tapjoy'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.TwitterMoPub'] = { publisherId = 'com.coronalabs' },
        
		-- Others
		["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" },
        ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true }, },
        ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } },
		-- ["CoronaProvider.gameNetwork.google"] = { publisherId = "com.coronalabs", supportedPlatforms = { android = true }, },
		-- ["CoronaProvider.gameNetwork.apple"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true },
		["plugin.gpgs"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } },
		},
    },

	orientation =
 	{
		default = "portrait", --landscapeRight
		supported =
 		{
			"portrait",
		}
	},

	iphone =
	{

		xcassets = "Images.xcassets",
		plist =
		{
            UIStatusBarHidden = true,
		},
	},

    android =
    {
		googlePlayGamesAppId = "xxxxxxxx",  --insert your app id number for google game services
        usesPermissions =
        {
            "android.permission.INTERNET",
            "android.permission.ACCESS_NETWORK_STATE",
            "android.permission.READ_PHONE_STATE",
            "com.android.vending.BILLING",
        },
		
        applicationChildElements =
        {
            [[
                <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
                    android:value="[ca-app-pub-xxxxxxx]"/>  -- replace with your app id. See: https://goo.gl/fQ2neu
            ]],
        },
    },
}


[TOPIC: post.html]
#2

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,245 posts
  • Corona SDK

this is ancient:

["CoronaProvider.gameNetwork.google"] = { 
publisherId = "com.coronalabs", 
supportedPlatforms = { android = true }, },

please upgrade to a more current gamenetwork:

 

https://docs.coronalabs.com/plugin/gpgs2/index.html



[TOPIC: post.html]
#3

sysads

[GLOBAL: userInfoPane.html]
sysads
  • Contributor

  • 112 posts
  • Corona SDK

Hi

 

Just tried implementing the v2 but getting following error:

 

14:49:52.900  ?:0: attempt to call a nil value
14:49:52.900  stack traceback:
14:49:52.900  ?: in function 'require'
14:49:52.900  C:\xxxx\networksLib.lua:4: in main chunk
14:49:52.900  [C]: in function 'require'
14:49:52.900  ?: in function 'require'
14:49:52.900  C:\xxxx\setupFile.lua:5: in main chunk
14:49:52.900  [C]: in function 'require'
14:49:52.900  ?: in function 'require'
14:49:52.900  C:\xxxx\main.lua:23: in main chunk

 

networkLib.lua file

local networksLib = {};

-- local gpgs = require "gpgs";
local gpgs = require( "plugin.gpgs.v2" )

local currentSystem = system.getInfo("platformName");
if currentSystem ~= "Android" and currentSystem ~= "iPhone OS" then
  currentSystem = "Android";
end

local activeNetworksProviders;
local currentNetwork;

local initializeFunctions = {
  ["google"] = function()
    gpgs.init("google", function(event) 
       gpgs.request("login", { userInitiated=true, listener=function()  print("User logged in google game services"); end });
    end);
  end,
  ["gamecenter"] = function()
    gpgs.init( "gamecenter", initCallback )
  end
};

networksLib.init = function(activeNetworks)
  activeNetworksProviders = activeNetworks;
  currentNetwork = activeNetworks[currentSystem][1];
  if initializeFunctions[currentNetwork] then
    initializeFunctions[currentNetwork]();
  end
end

networksLib.showLeaderboard = function()
  if currentNetwork == "google" then
    gpgs.show("leaderboards");
  elseif currentNetwork == "gamecenter" then
    gpgs.show("leaderboards", { leaderboard = {timeScope="AllTime"}});
  end
end

networksLib.addScoreToLeaderboard = function(score)
  if currentNetwork == "google" then
    gpgs.request( "setHighScore",
    {
      localPlayerScore = { category= activeNetworksProviders[currentSystem][2], value=tonumber(score) }, 
      listener = function() print("Score was posted"); end
    });
  elseif currentNetwork == "gamecenter" then
    gpgs.request( "setHighScore",
    {
        localPlayerScore = { category=activeNetworksProviders[currentSystem][2], value=tonumber(score) },
        listener= function() print("Score was posted"); end
    })
  end
end

return networksLib;


[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,207 posts
  • Enterprise

Since you were asked to change your build.settings, can you post your current build.settings?
 

Rob



[TOPIC: post.html]
#5

sysads

[GLOBAL: userInfoPane.html]
sysads
  • Contributor

  • 112 posts
  • Corona SDK

Since you were asked to change your build.settings, can you post your current build.settings?
 

Rob

Hi Rob, I have updated the code above. All I did was disabled the gameNetwork and enable gpgs

		-- ["CoronaProvider.gameNetwork.google"] = { publisherId = "com.coronalabs", supportedPlatforms = { android = true } },
		-- ["CoronaProvider.gameNetwork.apple"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true } },
		["plugin.gpgs.v2"] = { publisherId = "com.coronalabs", supportedPlatforms = { ["android"] = true } },


[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,207 posts
  • Enterprise

Please post your entire build.settings.



[TOPIC: post.html]
#7

sysads

[GLOBAL: userInfoPane.html]
sysads
  • Contributor

  • 112 posts
  • Corona SDK

Please post your entire build.settings.

As I said I updated the entire building setting above instead of repeating it. see below

settings =
{
    plugins =
    {
		-- Base
        ['plugin.appodeal.base'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.GoogleAdMob'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' },
 
        -- Banner
        ['plugin.appodeal.AppLovin'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.FacebookAudience'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Flurry'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.InMobi'] = { publisherId = 'com.coronalabs' },
        --['plugin.appodeal.MyTarget'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Yandex'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.AmazonAds'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.TwitterMoPub'] = { publisherId = 'com.coronalabs' },
 
        -- Interstitial
        ['plugin.appodeal.AdColony'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.AppLovin'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Chartboost'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.FacebookAudience'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Flurry'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.InMobi'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.IronSource'] = { publisherId = 'com.coronalabs' },
        --['plugin.appodeal.Mobvista'] = { publisherId = 'com.coronalabs' },
        --['plugin.appodeal.MyTarget'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Ogury'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.AmazonAds'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.TwitterMoPub'] = { publisherId = 'com.coronalabs' },
 
        -- Rewarded Video
        ['plugin.appodeal.AdColony'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.AppLovin'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Chartboost'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.FacebookAudience'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Flurry'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.InMobi'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.IronSource'] = { publisherId = 'com.coronalabs' },
        --['plugin.appodeal.Mobvista'] = { publisherId = 'com.coronalabs' },
        --['plugin.appodeal.MyTarget'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Unity'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Vungle'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.Tapjoy'] = { publisherId = 'com.coronalabs' },
        ['plugin.appodeal.TwitterMoPub'] = { publisherId = 'com.coronalabs' },
        
		-- Others
		["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" },
        ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true }, },
        ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } },
		-- ["CoronaProvider.gameNetwork.google"] = { publisherId = "com.coronalabs", supportedPlatforms = { android = true }, },
		-- ["CoronaProvider.gameNetwork.apple"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true },
		["plugin.gpgs"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } },
		},
    },

	orientation =
 	{
		default = "portrait", --landscapeRight
		supported =
 		{
			"portrait",
		}
	},

	iphone =
	{

		xcassets = "Images.xcassets",
		plist =
		{
            UIStatusBarHidden = true,
		},
	},

    android =
    {
		googlePlayGamesAppId = "xxxxxxxx",  --insert your app id number for google game services
        usesPermissions =
        {
            "android.permission.INTERNET",
            "android.permission.ACCESS_NETWORK_STATE",
            "android.permission.READ_PHONE_STATE",
            "com.android.vending.BILLING",
        },
		
        applicationChildElements =
        {
            [[
                <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
                    android:value="[ca-app-pub-xxxxxxx]"/>  -- replace with your app id. See: https://goo.gl/fQ2neu
            ]],
        },
    },
}


[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,207 posts
  • Enterprise

You're still using the GPGS v1 plugin. I can't troubleshoot why the v2 plugin isn't working if you're build.settings are still referencing the V1 plugin. Your snippet shows you changed it to v2, but I need to see the whole build.settings with the v2 plugin and the error message you're getting. Changing things then sharing items that don't match, isn't really helpful.

 

Rob



[TOPIC: post.html]
#9

sysads

[GLOBAL: userInfoPane.html]
sysads
  • Contributor

  • 112 posts
  • Corona SDK

You're still using the GPGS v1 plugin. I can't troubleshoot why the v2 plugin isn't working if you're build.settings are still referencing the V1 plugin. Your snippet shows you changed it to v2, but I need to see the whole build.settings with the v2 plugin and the error message you're getting. Changing things then sharing items that don't match, isn't really helpful.

 

Rob

Hi rob

 

I am not sure where else I referenced V1 since I have commented out those lines. I copied the entire content of the build.settings file and pasted it as you have seen. Not sure what else I missed to copy. Thanks



[TOPIC: post.html]
#10

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,207 posts
  • Enterprise

Your build.settings contains, which isn't commented out.

        ["plugin.gpgs"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } },
        },

It should be:

        ["plugin.gpgs.v2"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } },
        },

Rob.



[TOPIC: post.html]
#11

sysads

[GLOBAL: userInfoPane.html]
sysads
  • Contributor

  • 112 posts
  • Corona SDK

Your build.settings contains, which isn't commented out.

        ["plugin.gpgs"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } },
        },

It should be:

        ["plugin.gpgs.v2"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } },
        },

Rob.

Hi Rob, its 

["plugin.gpgs.v2"] = { publisherId = "com.coronalabs", supportedPlatforms = { ["android"] = true } },

and still have same error




[topic_controls]
[/topic_controls]