App Fails to Start On Android Device

Hi guys,

I am having a problem. It worked last week when I was testing it on device, but now the app fails to even start on my Samsung S3 (Android 4.3). It still works on my Nexus (Android 6). Both having same apk which I just re-build on Corona SDK 2016.2830

I have a ‘print’ command on the first line in main.lua, and it doesn’t even appear. 

Any idea what’s wrong ?

adb logcat :

--------- beginning of /dev/log/main --------- beginning of /dev/log/system V/Corona (15315): \> Class.forName: network.LuaLoader V/Corona (15315): \< Class.forName: network.LuaLoader V/Corona (15315): Loading via reflection: network.LuaLoader I/Corona (15315): Platform: GT-I9300 / ARM Neon / 4.3 / Mali-400 MP / OpenGL ES 2.0 / 2016.2830 / English | US | en\_US | en V/Corona (15315): \> Class.forName: plugin.fuse.LuaLoader V/Corona (16148): \> Class.forName: network.LuaLoader V/Corona (16148): \< Class.forName: network.LuaLoader V/Corona (16148): Loading via reflection: network.LuaLoader I/Corona (16148): Platform: GT-I9300 / ARM Neon / 4.3 / Mali-400 MP / OpenGL ES 2.0 / 2016.2830 / English | US | en\_US | en V/Corona (16148): \> Class.forName: plugin.fuse.LuaLoader

.

build.settings (sorry, kinda messy) :

settings = { plugins = { ["plugin.openssl"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true, iphone=true, osx=true, win32=true }, }, ["plugin.notifications"] = { publisherId = "com.coronalabs" }, -- http://coronalabs.com/blog/2015/01/21/notifications-have-been-moved-to-a-plugin/ ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" }, -- corona show-popup / Sharing ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, -- AdMob ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, -- ["facebook"] = { publisherId = "com.coronalabs" }, -- facebook -- ["plugin.facebook.v4"] = { publisherId = "com.coronalabs" }, -- facebook-v4 -- ['plugin.qrscanner'] = {publisherId = 'com.spiralcodestudio'}, -- ["CoronaProvider.native.popup.addressbook"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, osx=true } }, }, build = { -- neverStripDebugInfo = false }, android = { minSdkVersion = "11", -- Android 3.0.x, http://developer.android.com/guide/topics/manifest/uses-sdk-element.html -- facebookAppId = "", -- Test 16-nov-15 permissions = { { name = ".permission.C2D\_MESSAGE", protectionLevel = "signature" }, }, usesPermissions = { "android.permission.READ\_EXTERNAL\_STORAGE", -- to access photo gallery -- "android.permission.WRITE\_EXTERNAL\_STORAGE", -- debug. to check what's wrong with the WAM mask. -- "android.permission.CALL\_PHONE", "android.permission.READ\_PHONE\_STATE", "android.permission.VIBRATE", "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", -- "android.permission.GET\_ACCOUNTS", -- For GCM push-notification -- "android.permission.RECEIVE\_BOOT\_COMPLETED", -- For GCM push-notification -- "com.google.android.c2dm.permission.RECEIVE", -- For GCM push-notification -- ".permission.C2D\_MESSAGE", -- For GCM push-notification "com.android.vending.BILLING", -- For IAP -- "android.permission.ACCESS\_FINE\_LOCATION", -- "android.permission.ACCESS\_COARSE\_LOCATION", --"android.permission.CAMERA", -- Used in full version, to upload photo --"android.permission.WRITE\_EXTERNAL\_STORAGE", -- Used in full version, to upload photo }, usesFeatures = { -- If you set permissions "ACCESS\_FINE\_LOCATION" and "ACCESS\_COARSE\_LOCATION" above, -- then you may want to set up your app to not require location services as follows. -- Otherwise, devices that do not have location sevices (such as a GPS) will be unable -- to purchase this app in the app store. -- { name = "android.hardware.location", required = false }, -- { name = "android.hardware.location.gps", required = false }, -- { name = "android.hardware.location.network", required = false }, { name = "android.hardware.telephony", required = false }, { name = "android.hardware.telephony.cdma", required = false }, { name = "android.hardware.telephony.gsm", required = false }, }, }, orientation = { default = "landscapeRight", supported = { "landscapeRight", "landscapeLeft", -- "portrait", }, }, iphone = { plist = { NSLocationWhenInUseUsageDescription = "This app uses location services to search for the shops around you.", UIApplicationExitsOnSuspend = false, -- FacebookAppID = "", -- SAD Testing (16-Nov-15) CFBundleURLTypes = { { CFBundleURLSchemes = { -- "fb", --SAD Testing (16-Nov-15) } } }, -- For iOS9 : https://coronalabs.com/blog/2015/09/17/about-app-transport-security-ats/ NSAppTransportSecurity = { NSAllowsArbitraryLoads = true, NSExceptionDomains = { ["fbcdn.net"] = { NSIncludesSubdomains = true, NSExceptionRequiresForwardSecrecy = false, }, ["facebook.com"] = { NSIncludesSubdomains = true, NSExceptionRequiresForwardSecrecy = false, }, ["akamaihd.net"] = { NSIncludesSubdomains = true, NSExceptionRequiresForwardSecrecy = false, }, }, }, -- Whitelist Facebook Apps LSApplicationQueriesSchemes = { "fb", "fbapi20130214", "fbapi20130410", "fbapi20140410", "fbapi20140116", "fbapi20150313", "fbapi20150629", "fbauth", "fbauth2", "fb-messenger-api20140430", }, UIAppFonts = { "PAINP.ttf", -- "HelveticaNeue\_Lt.ttf", -- "HelveticaNeue\_Med.ttf", -- "HelveticaNeueBold.ttf", }, MinimumOSVersion = "7.0", UIStatusBarHidden = false, CFBundleIconFiles = { -- "AppIcon167x167.png", -- "AppIcon76x76@2x.png", -- "AppIcon76x76.png", -- "AppIcon72x72@2x.png", -- "AppIcon72x72.png", -- "AppIcon60x60@3x.png", -- "AppIcon60x60@2x.png", -- "AppIcon60x60.png", -- "AppIcon57x57@2x.png", -- "AppIcon57x57.png", -- "AppIcon50x50@2x.png", -- "AppIcon50x50.png", -- "AppIcon40x40@3x.png", -- "AppIcon40x40@2x.png", -- "AppIcon40x40.png", -- "AppIcon29x29@3x.png", -- "AppIcon29x29@2x.png", -- "AppIcon29x29.png", "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-167.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" }, UILaunchImages = { { -- iPhone 4 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 4 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 4 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 5 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPhone 5 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPhone 5 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPad Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPhone 6 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-736h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPhone 6 Plus LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-Landscape-736h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPhone 6 Plus LandscapeRight ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-Landscape-736h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{414, 736}" }, }, }, }, }

Hi yosu,

Is there any more detail in adb logcat you can provide us. Just seeing a print statement not occurring isn’t too helpful.

Does you app actually crash? Does it just hang on a black screen? Are there any exceptions in adb logcat? What’s the relevant code in main.lua?

Hi McCaleb, the app will not start at all. It will just go back to the main device screen.

after drilling down, i notice this error during the start of the app (adb logcat).

W/ActivityManager( 2356): Permission Denial: Accessing service ComponentInfo{com.google.android.gsf/com.google.android.gsf.gtalkservice.PushMessagingRegistrarProxy} from pid=7563, uid=10167 requires com.google.android.c2dm.permission.RECEIVE

It seems that even though I do not use push-notification in the app, but included it in the ’ config.lua’ , it wont start because of insufficient-permission. I guess it works on Android 6 because of its change in permission request.

Thanks

Hi yosu,

Is there any more detail in adb logcat you can provide us. Just seeing a print statement not occurring isn’t too helpful.

Does you app actually crash? Does it just hang on a black screen? Are there any exceptions in adb logcat? What’s the relevant code in main.lua?

Hi McCaleb, the app will not start at all. It will just go back to the main device screen.

after drilling down, i notice this error during the start of the app (adb logcat).

W/ActivityManager( 2356): Permission Denial: Accessing service ComponentInfo{com.google.android.gsf/com.google.android.gsf.gtalkservice.PushMessagingRegistrarProxy} from pid=7563, uid=10167 requires com.google.android.c2dm.permission.RECEIVE

It seems that even though I do not use push-notification in the app, but included it in the ’ config.lua’ , it wont start because of insufficient-permission. I guess it works on Android 6 because of its change in permission request.

Thanks