App crashed on play store

#1

work fine while development.
Crashes as soon as user open’s up the app.

java.lang.SecurityException:
at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1253)
at android.app.ContextImpl.startService (ContextImpl.java:1230)
at android.content.ContextWrapper.startService (ContextWrapper.java:581)
at com.google.android.gms.iid.k.a (Unknown Source)
at com.google.android.gms.iid.k.a (Unknown Source)
at com.google.android.gms.iid.k.b (Unknown Source)
at com.google.android.gms.iid.k.a (Unknown Source)
at com.google.android.gms.iid.a.b (Unknown Source)
at com.google.android.gms.iid.a.a (Unknown Source)
at host.exp.exponent.gcm.RegistrationIntentService.onHandleIntent (RegistrationIntentService.java:62)
at android.app.IntentService$ServiceHandler.handleMessage (IntentService.java:66)
at android.os.Handler.dispatchMessage (Handler.java:111)
at android.os.Looper.loop (Looper.java:207)
at android.os.HandlerThread.run (HandlerThread.java:61)

Weird behavior with permissions
#2

Have you tried you .apk file locally before pushing it to Play?

Try adb logcat E:* on your machine, with Android developer tools installed and a device connected via USB debugging.

There should be a little more information before the actual exception happens. I had a similiar issue, that I solved by adding the missing permission to app.json -> android -> permissions array.

#3

What device/OS version?

#4

Looks like this is a permissions issue.

My app needs just location permission. so in the permissions array I just have

[“ACCESS_COARSE_LOCATION”, “ACCESS_FINE_LOCATION”]

Why is it asking for so much ?

Here is more detail from adb logcat

I/ActivityManager( 558): Force stopping com.atinder.appname appid=10060 user=-1: update pkg
W/PackageManager( 558): Not granting permission android.permission.GLOBAL_SEARCH to package com.android.quicksearchbox (protectionLevel=18 flags=0x88be45)
W/PackageManager( 558): Unknown permission com.google.android.gallery3d.permission.GALLERY_PROVIDER in package com.android.bluetooth
W/PackageManager( 558): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH in package com.android.providers.calendar
W/PackageManager( 558): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.cl in package com.android.providers.calendar
W/PackageManager( 558): Unknown permission android.permission.READ_INTERNAL_STORAGE in package host.exp.exponent
W/PackageManager( 558): Not granting permission android.permission.MANAGE_DOCUMENTS to package host.exp.exponent (protectionLevel=2 flags=0x98be44)
W/PackageManager( 558): Unknown permission android.permission.USE_FINGERPRINT in package host.exp.exponent
W/PackageManager( 558): Unknown permission com.google.android.c2dm.permission.RECEIVE in package host.exp.exponent
W/PackageManager( 558): Unknown permission com.sec.android.provider.badge.permission.READ in package host.exp.exponent
W/PackageManager( 558): Unknown permission com.sec.android.provider.badge.permission.WRITE in package host.exp.exponent
W/PackageManager( 558): Unknown permission com.htc.launcher.permission.READ_SETTINGS in package host.exp.exponent
W/PackageManager( 558): Unknown permission com.htc.launcher.permission.UPDATE_SHORTCUT in package host.exp.exponent
W/PackageManager( 558): Unknown permission com.sonyericsson.home.permission.BROADCAST_BADGE in package host.exp.exponent
W/PackageManager( 558): Unknown permission com.anddoes.launcher.permission.UPDATE_COUNT in package host.exp.exponent
W/PackageManager( 558): Unknown permission com.majeur.launcher.permission.UPDATE_BADGE in package host.exp.exponent
W/PackageManager( 558): Unknown permission com.google.android.providers.gsf.permission.READ_GSERVICES in package host.exp.exponent
W/PackageManager( 558): Unknown permission com.google.android.gms.permission.ACTIVITY_RECOGNITION in package host.exp.exponent
W/PackageManager( 558): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.mail in package com.android.calendar
W/PackageManager( 558): Not granting permission android.permission.ACCESS_DOWNLOAD_MANAGER to package com.android.browser (protectionLevel=18 flags=0x89be45)
W/PackageManager( 558): Not granting permission android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS to package com.android.browser (protectionLevel=2 flags=0x89be45)
W/PackageManager( 558): Unknown permission android.permission.INSTALL_DRM in package com.android.mms
W/PackageManager( 558): Unknown permission com.cyanogenmod.filemanager.permissions.READ_THEME in package com.cyanogenmod.filemanager
W/PackageManager( 558): Unknown permission com.google.android.gallery3d.permission.PICASA_STORE in package com.android.dreams.phototable
W/PackageManager( 558): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH in package com.android.settings
W/PackageManager( 558): Unknown permission com.google.android.googleapps.permission.ACCESS_GOOGLE_PASSWORD in package com.android.development
W/PackageManager( 558): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH in package com.android.development
W/PackageManager( 558): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.ALL_SERVICES in package com.android.development
W/PackageManager( 558): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.YouTubeUser in package com.android.development
W/PackageManager( 558): Not granting permission android.permission.DELETE_PACKAGES to package com.svox.pico (protectionLevel=18 flags=0x88be45)
W/PackageManager( 558): Not granting permission android.permission.DEVICE_POWER to package com.android.deskclock (protectionLevel=2 flags=0xc8be45)

#5

Still stuck with the release. App works in expo but the apk crashes :frowning:

@jesse this is happening on all physical devices except emulator and expo app. one of them is

Lenovo K5 Note (A7020a48), 3072MB RAM, Android 6.0

#6

Those are warnings, and there a bunch of those on a normal day in Android-land.

Somewhere in ADB there is a “Fatal Exception”, which will tell you exactly why it is crashing.

#7

after debugging with adb logcat, I was able to fix by updating my permission set as

[
“ACCESS_COARSE_LOCATION”,
“ACCESS_FINE_LOCATION”,
“android.permission.CHANGE_CONFIGURATION”,
“com.google.android.c2dm.permission.RECEIVE”,
“android.permission.READ_EXTERNAL_STORAGE”,
“android.permission.WRITE_EXTERNAL_STORAGE”
]

Although my app needs just first two (location permissions) of these.

#8

I think I might be having a similar issue. Are you adding these permissions under android.permissions in app.json ?

My issue is explained here if you would like to help out.

#9

yes app permissions are under expo.android.permissions in app.json

Error message you have is not enough to tell anything specifically. Try catching the exception with try catch when you are getting the user location.