Google IAP v3 crashing on store.init()

@rohan.k

I am also using native activity indicator all over the application (especially in login sequence). That may be the source of the problem. If this is the case it is very annoying that a simple thing such as a stupid activity indicator causing my app to freeze for no reason.

my build.settings:

settings = {     orientation = {         default = "portrait",         supported = {             "portrait", "portraitUpsideDown",         }             },       iphone = {         plist = {             UIHiddenStatusBar= true, UIPrerenderedIcon = true,                     CFBundleIconFile = "Icon.png",             CFBundleIconFiles = {                 "Icon.png",                 "Icon@2x.png",                 "Icon-60.png",                 "Icon-60@2x.png",                 "Icon-60@3x.png",                 "Icon-72.png",                 "Icon-72@2x.png",                 "Icon-76.png",                 "Icon-76@2x.png",                 "Icon-Small-40.png",                 "Icon-Small-40@2x.png",                 "Icon-Small-40@3x.png",                 "Icon-Small-50.png",                 "Icon-Small-50@2x.png",                 "Icon-Small.png",                 "Icon-Small@2x.png",                 "Icon-Small@3x.png"             },               --launch image files table             UILaunchImages = {                 {  -- iPhone 4 Portrait                     ["UILaunchImageMinimumOSVersion"] = "7.0",                     ["UILaunchImageName"] = "Default",                     ["UILaunchImageOrientation"] = "Portrait",                     ["UILaunchImageSize"] = "{320, 480}"                 },                 {  -- iPhone 5 Portrait                     ["UILaunchImageMinimumOSVersion"] = "7.0",                     ["UILaunchImageName"] = "Default-568h",                     ["UILaunchImageOrientation"] = "Portrait",                     ["UILaunchImageSize"] = "{320, 568}"                 },             },            UIApplicationExitsOnSuspend = false,               CFBundleShortVersionString = "2.2",                     FacebookAppID = "MyAppIdXXXXXXX",             CFBundleURLTypes =             {                 {                     CFBundleURLSchemes =                     {                         "fbXXXXXXXXXXXX",                     }                 }             },               ["URL types"] = {                 item = {                     ["URL Schemes"] =                         { ["Item 0"] = "fbXXXXXXXXXXXX" },                 },             },                                      UIAppFonts = {                                                 "HelveticaNeue-CondensedBold.ttf"             },                 },             },       android = {         largeHeap = true,         permissions = {             {                 name = ".permission.C2D\_MESSAGE",                 protectionLevel = "signature"             },         },         usesPermissions = {             "android.permission.INTERNET",             "android.permission.GET\_ACCOUNTS",             "android.permission.RECEIVE\_BOOT\_COMPLETED",             "com.google.android.c2dm.permission.RECEIVE",             "com.android.vending.BILLING",             "com.android.vending.CHECK\_LICENSE",             ".permission.C2D\_MESSAGE",         },     },       plugins =     {           --ADMOB ADSv2 MODULE         ["plugin.google.play.services"] =         {             publisherId = "com.coronalabs",             --supportedPlatforms = { ["ios"] = true, ["android"] = true }         },           -- key is the name passed to Lua's 'require()'         ["CoronaProvider.analytics.flurry"] =         {             -- required             publisherId = "com.coronalabs",         },             ["facebook"] =         {             publisherId = "com.coronalabs",         },           ["CoronaProvider.native.popup.social"] =         {             --required             publisherId = "com.coronalabs",         },           ["plugin.google.iap.v3"] =         {             publisherId = "com.coronalabs",             supportedPlatforms = { android=true }         },               },   }

and the config.lua

application = { content = {     width = 320,     height = 480, scale = "letterbox", xAlign="center", yAlign="bottom",       fps = 60,       imageSuffix =       {          ["@2x"] = 1.8,       },        },   notification =     {         iphone =         {             types =             {                 "badge", "sound", "alert", "custom"             }         },         google =         {             projectNumber = "XXXXXXXX",         },     },     license =     {         google =         {             key = "MIIBIjANBgkqhkiG---AND-THE-REST-OF-LICENSE-KEY-GOES-HERE",         },     },       }

Hi @deniz,

Comment the [lua] native.setActivityIndicator() [/lua] wherever you’re using, and check it.

It will solve that freezing issue.

I have exact same issue. It happened between builds. One was working perfectly the next one started freezing.

This must be plugin related, since it works perfectly on iOS. There is also another topic on the same issue posted also today.

http://forums.coronalabs.com/topic/53276-storeinitgoogle-transactioncallback-crashes/?hl=store.init

Hi all,

Can one (or both) of you provide a console error log report? We tried the code that @thatssopanda supplied and we can’t reproduce the issue.

Thanks,

Brent

The problem is, that there is no log error.

App is not responding.

Here is ANR report from Google Play

ANR Broadcast of Intent { act=android.intent.action.SCREEN_OFF flg=0x50000010 }

Hello,

When running adb logcat Corona:v *:s from my Samsung Galaxy Tab 3, here’s what I get:

V/Corona&nbsp; (12972): \> Class.forName: network.LuaLoader V/Corona&nbsp; (12972): \< Class.forName: network.LuaLoader V/Corona&nbsp; (12972): Loading via reflection: network.LuaLoader I/Corona&nbsp; (12972): Platform: SM-T217S / ARM Neon / 4.4.2 / Adreno (TM) 305 / OpenGL ES 3.0 V@45.0 AU@04.04.02.007.050 (CL@) / 2014.2511 V/Corona&nbsp; (12972): \> Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona&nbsp; (12972): \< Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona&nbsp; (12972): Loading via reflection: CoronaProvider.licensing.google.LuaLoader V/Corona&nbsp; (12972): \> Class.forName: plugin.google.iap.v3.LuaLoader V/Corona&nbsp; (12972): \< Class.forName: plugin.google.iap.v3.LuaLoader V/Corona&nbsp; (12972): Loading via reflection: plugin.google.iap.v3.LuaLoader

Once I get to V/Corona  (12972): Loading via reflection: plugin.google.iap.v3.LuaLoader_,_ the app will freeze and not respond to further interaction. I don’t get why it would freeze at that last line. Any hints?

Same here.

–EDIT

I’ve tried building it on Mac. Same issue.

Hi,

I  tired using the daily build too, but the issue is still observed.

Can corona give a correct information about this?

Stuck on this issue since 4 days.

Has anyone filed a bug report?  A case number would be great to have before I ping engineering.

Rob

Hello Rob,

I just filed the bug report and the case number is (Case 37734).

Daniel

I don’t know if you did anything to plugin, but it’s working for me now (with no changes in code).

Hi @delwing

Please check my build.settings here

http://forums.coronalabs.com/topic/51047-in-app-purchases-iap-storeinit-freezes-the-application/#entry277172

And let me know if something is wrong with my plugin.

@rohan.k, plugins are things that exist on Corona’s servers.  We can fix them and all you have to do is re-build to get fixes unlike Corona SDK where you have to download new builds to get fixes.

@delwing, Are you saying you can get past store.init() now?  The bug report filed @thatssopanda is still having a good back and forth between @thatssopanda and the engineer working on it.

Is anyone still having any issues?

I am having this issue right now… struggling with it for hours now.

Building for google play and application just hangs at line of code

store.init("google",&nbsp;transactionCallback)

There are no errors. Nothing is happening.

I downloaded plugins from few hours ago (plugins and daily enterprise edition)

I suspect these may not be in the Enterprise build yet.  Let me ask about it.

Rob

I just read in some other topic that this might be related to the fact that app has been freshly published in the app store as alpha.

I am curious, what if the information hasn’t yet been propagated? What if app can’t get store info because it hasn’t been published yet?

I published my app more than 24 hours ago, but still…maybe that’s the case.

There was a bug Engineering fixed in store.init() today.  It’s probably not had time to get into a daily build for Enterprise users.

Rob

Got it. My mistake! I didn’t add license key to my config.lua file.

It might have helped if there was some kind of warning if using google store and key is not present in config.lua