Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Crash On Launch Android - Help!
Started by xnailbender Aug 06 2018 08:51 PM

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

xnailbender

[GLOBAL: userInfoPane.html]
xnailbender
  • Contributor

  • 339 posts
  • Corona SDK

Corona,

 

edit: I have successfully uploaded a current build to Google Play, it was not rejected.

 

I can build my app and load it onto my Android device, but it crashes on launch immediately after the Corona Splash Screen displays.

 

I've tried the latest daily build and also the most recent public release.

 

I did not change my build.settings that worked Nov 3/17.

 

I have stripped out almost everything from my build settings that I've posted below and it still crashes on launch.

 

It appears Corona is calling the "getCurrentUser()" function and it needs the android.permission.INTERACT_ACROSS_USERS.

 

My App does not have this funciton.

 

I have that permission in my build.settings.

 

Here is log from the console.

BUILD SUCCESSFUL
Total time: 0 seconds
BuildID: 5b691e7ed3ce5
     [echo]  "creating unsigned.apk"

BUILD SUCCESSFUL
Total time: 7 seconds
Android build succeeded in 37 seconds
Installing and running Yard_Sale_Android_Ver_220 on SM-T113
4371 KB/s (11527857 bytes in 2.575s)
Installing and running Yard_Sale_Android_Ver_220 to SM-T113 successfull!
Starting: Intent { cmp=com.portal5b.register.yardsale/com.ansca.corona.CoronaActivity }
----------  Device Log Starts  ----------
SM-T113: mDVFSHelper.acquire()
SM-T113: Permission Denial: getCurrentUser() from pid=17526, uid=10178 requires android.permission.INTERACT_ACROSS_USERS
SM-T113: Permission Denial: getCurrentUser() from pid=17526, uid=10178 requires android.permission.INTERACT_ACROSS_USERS
SM-T113: Platform: SM-T113 / ARM Neon / 4.4.4 / Mali-400 MP / OpenGL ES 2.0 / 2018.3342 / English | US | en_US | en
SM-T113: mDVFSHelper.release()
SM-T113: WARNING: licensing.init() was already called for google.
SM-T113: mDVFSHelper.acquire()
SM-T113: mDVFSHelper.release()
SM-T113: Scheduling restart of crashed service com.android.defcontainer/.DefaultContainerService in 1000ms
SM-T113: Permission Denial: getCurrentUser() from pid=17601, uid=10002 requires android.permission.INTERACT_ACROSS_USERS
SM-T113: mDVFSHelper.acquire()
SM-T113: mDVFSHelper.release()
---------- Device Log Finished ----------

 

 

Here are my build.settings

settings =
{  
    orientation =
    {
        default = "landscapeLeft",
        supported =
        {
            "landscapeLeft", "landscapeRight",
        },
    },
    
    android =
    {
    usesPermissions =
        {
            "android.permission.INTERACT_ACROSS_USERS",
            "android.permission.INTERNET",
            "android.permission.ACCESS_NETWORK_STATE",
            "android.permission.WRITE_EXTERNAL_STORAGE",
            "android.permission.ACCESS_FINE_LOCATION",
            "android.permission.ACCESS_COARSE_LOCATION",
            "com.android.vending.CHECK_LICENSE",
        },

        minSdkVersion = "16",
        largeHeap = true,
    },
}

Any ideas? I want to continue allowing older Android devices the ability to use the app if possible.

 

Nail



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,331 posts
  • Corona Staff

Can you provide more context as to what library is providing getCurrentUser()?

 

Rob



[TOPIC: post.html]
#3

xnailbender

[GLOBAL: userInfoPane.html]
xnailbender
  • Contributor

  • 339 posts
  • Corona SDK

Hey Rob,

I have no idea where the function is getting called from.

 

It does not exist in my project from what I can tell.  I've searched my project with no results found.

 

This is why I was assuming it was coming from Corona.  I don't have logcat running and I don't have any plugins enabled as you can see in my build settings.

 

Even if I did have something calling the function, I have always had the permission in build.settings and still do.

 

Are you saying Corona does not make this call?

 

It's as if the permission isn't getting written to the android manifest or whatever it's called.

 

I'm at a total loss here, I built and launched my previous version of the app that is live with the same results. Black Screen.

 

Something has changed, I was hoping it was going to be an easy fix.

 

hmmmm,

 

Thanks for the help,

Nail



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,331 posts
  • Corona Staff

Is that your entire build.settings? It appears that this is related to Firebase or In-App Purchases, but I don't see any plugin code in your build.settings.

 

Rob



[TOPIC: post.html]
#5

xnailbender

[GLOBAL: userInfoPane.html]
xnailbender
  • Contributor

  • 339 posts
  • Corona SDK

Rob,

The build settings I posted are the stripped down version, I took out my plugins (OneSignal and Fliurry) to eliminate those from being the problem.  The build.settings I posted have the same result, crash.

 

I do not understand why I include the android.permission.INTERACT_ACROSS_USERS in my build settings, yet it isn't being read by the device.

 

Nail



[TOPIC: post.html]
#6

xnailbender

[GLOBAL: userInfoPane.html]
xnailbender
  • Contributor

  • 339 posts
  • Corona SDK

Rob,

 

edit: hmmm, since licensing wasn't working and it was the only plugin left, I start started removing it.

 

I removed all licensing references, config.lua and build.settings and I'm still getting the Denial Permission. 

Without the permission, licensing won't work. without the permission, licensing.init( "google") returns false.

 

I have no idea where the getCurrentUser() call is being from.

 

I am still wondering why the permission "android.permission.INTERACT_ACROSS_USERS" isn't being set.

local licensingInit = licensing.init( "google" )
 
print("licensingInit == ",licensingInit) --licensingInit == false
 
if ( licensingInit == true ) then
    licensing.verify( licensingListener )
end 

I'm still stuck.

 

Nail



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,331 posts
  • Corona Staff

Can you put together a simple demo app that has the issue including a build.settings, main.lua and config.lua file and put it in a .zip file so our engineers can just build, install and see the issue happen. Then use the Report a Bug link at the top of the page to submit a bug report.

 

Thanks

Rob



[TOPIC: post.html]
#8

xnailbender

[GLOBAL: userInfoPane.html]
xnailbender
  • Contributor

  • 339 posts
  • Corona SDK

Rob,

I submitted a Bug Report with a stripped down project.

 

From what I can tell, any Android app built and launched on device will kick the Permission Denial.

 

If Anyone else is reading this, could you build for Android and launch on a device then look to see if you are seeing the Permission Denial at the top of the console log?  I'd like to know if it's just my  Samsung Tab that's affected.

 

Thanks for the help,

 

Nail



[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,331 posts
  • Corona Staff

Thanks for the bug report. We can't reproduce the issue on the devices we've tested on. We are continuing to try and find a device closer to what you have to test this on.

 

Rob



[TOPIC: post.html]
#10

xnailbender

[GLOBAL: userInfoPane.html]
xnailbender
  • Contributor

  • 339 posts
  • Corona SDK

Rob,

Interesting result, I was not expecting.

 

I guess I could handle the false return for licensing.init("google") so the app would work on older devices and skip the pirating check.

 

Do you know if it was tested on an Android Ver 4.4.4 device?

 

Thanks for the help,

Nail



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,331 posts
  • Corona Staff

We are checking to see if we can find a 4.4 device. 

 

Rob



[TOPIC: post.html]
#12

fungrip

[GLOBAL: userInfoPane.html]
fungrip
  • Enthusiast

  • 49 posts
  • Corona SDK

@xnailbender I used to get the Permission Denial, but it never crashed (on a 4.4 device).

And the new daily build seems to fix it(tested it on 2 apps so far). You might want to test it out to see if it helps.



[TOPIC: post.html]
#13

xnailbender

[GLOBAL: userInfoPane.html]
xnailbender
  • Contributor

  • 339 posts
  • Corona SDK

fungrip,

 

I just tried 3349 and I'm still getting the Permission Denial. on 4.4.

 

Thanks for the letting me know what you are seeing.  I may have to try a timer to slow things down maybe.

 

Thanks for the help,

 

Nail




[topic_controls]
[/topic_controls]