urbanairship / android-library

Urban Airship Android SDK
Other
112 stars 123 forks source link

ANR's on UrbanAirship #41

Closed santoshchauhan12 closed 7 years ago

santoshchauhan12 commented 7 years ago

Hi Team,

I am using UrbanAirship in my app for push notification and this is how my dependency looks like:-

urbanshipLibVersion = '7.2.+' implementation "com.urbanairship.android:urbanairship-sdk:${urbanshipLibVersion}"

In My Application class i did something like this:- ` AirshipConfigOptions options = new AirshipConfigOptions.Builder() // .loadDefaultOptions(this); .setGcmSender("xxxxxxxxx") .setAllowedTransports(new String[]{"gcm"}) .setDevelopmentAppKey("xxxxxxxxxxxxxxxxx") .setDevelopmentAppSecret("xxxxxxxxxxxxxxxxxx") .setProductionAppKey("xxxxxxxxxxxxxxxx") .setProductionAppSecret("xxxxxxxxxxxxxx") .setAnalyticsEnabled(true) .setInProduction(true).build();

    UAirship.takeOff(this, options);
    UAirship.shared().getPushManager() .setUserNotificationsEnabled(false);
    UAirship.shared().getPushManager().setPushEnabled(false);
    UAirship.shared().getLocationManager().setLocationUpdatesEnabled(true);
    UAirship.shared().getLocationManager() .setBackgroundLocationAllowed(true);`

Getting lots of ANR related to UrbanAirship , below is my log details from google play store.Can you provide any solution for resolving this ANR's.

ANR 1 executing service com.my_packagename/com.urbanairship.location.LocationService "main" tid=1 Waiting "main" prio=5 tid=1 Waiting | group="main" sCount=1 dsCount=0 obj=0x765ec698 self=0xb7f3f218 | sysTid=25334 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb6f6bbec | state=S schedstat=( 1345317398 334397449 1752 ) utm=93 stm=41 core=3 HZ=100 | stack=0xbe33a000-0xbe33c000 stackSize=8MB | held mutexes=

at java.lang.Object.wait! (Native method)

#########################################################################

ANR 2:-**(executing service com.mypackagename/com.urbanairship.analytics.EventService)** "main" tid=1 Waiting "main" prio=5 tid=1 Waiting | group="main" sCount=1 dsCount=0 obj=0x752e4000 self=0xb7c5d218 | sysTid=26192 nice=0 cgrp=default sched=0/0 handle=0xb6f64bec | state=S schedstat=( 379410156 83789739 539 ) utm=22 stm=15 core=1 HZ=100 | stack=0xbe529000-0xbe52b000 stackSize=8MB | held mutexes=

at java.lang.Object.wait! (Native method)

###################################################################

ANR 3:-**(executing service com.mypackagename/com.urbanairship.location.LocationService)** Motorola Moto G (1st Gen) (falcon_cdma), 1024MB RAM, Android 5.1 Report 1 of 2 "main" tid=1 Native "main" prio=5 tid=1 Native | group="main" sCount=1 dsCount=0 obj=0x74272000 self=0xb8ae26d0 | sysTid=20439 nice=0 cgrp=apps sched=0/0 handle=0xb6fd3bec | state=D schedstat=( 0 0 0 ) utm=13 stm=41 core=0 HZ=100 | stack=0xbe560000-0xbe562000 stackSize=8MB | held mutexes=

00 pc 00000000000a4dfc /system/lib/libicuuc.so (u_charType_53+123)

01 pc 0000000000074d0d /system/lib/libicuuc.so (???)

02 pc 0000000000074ea5 /system/lib/libicuuc.so (icu_53::UnicodeSet::applyFilter(signed char ()(int, void), void*, int, UErrorCode&)+164)

03 pc 0000000000074f7f /system/lib/libicuuc.so (icu_53::UnicodeSet::applyIntPropertyValue(UProperty, int, UErrorCode&)+122)

04 pc 00000000000d9327 /system/lib/libicui18n.so (???)

05 pc 00000000000de199 /system/lib/libicui18n.so (???)

06 pc 00000000000de2db /system/lib/libicui18n.so (???)

07 pc 00000000000ea51f /system/lib/libicui18n.so (???)

08 pc 00000000000175a1 /system/lib/libjavacore.so (???)

09 pc 000000000001a55d /system/framework/arm/boot.oat (Java_java_util_regex_Pattern_compileImpl__Ljava_lang_String_2I+104)

at java.util.regex.Pattern.compileImpl (Native method)

at java.util.regex.Pattern.compile (Pattern.java:411)

at java.util.regex.Pattern. (Pattern.java:394)

at java.util.regex.Pattern.compile (Pattern.java:381)

at java.lang.String.replaceAll (String.java:1600)

at com.google.android.gms.internal.zzrv. (unavailable)

at com.google.android.gms.internal.zzrw. (unavailable)

at com.google.android.gms.internal.zzrw.zzW (unavailable)

at com.google.android.gms.analytics.GoogleAnalytics.getInstance (unavailable)

at com.my_packagename.application.MyApp.onCreate (MyApp.java:65)

at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1035)

at android.app.ActivityThread.handleBindApplication (ActivityThread.java:4638)

at android.app.ActivityThread.access$1500 (ActivityThread.java:155)

at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1378)

at android.os.Handler.dispatchMessage (Handler.java:102)

at android.os.Looper.loop (Looper.java:135)

at android.app.ActivityThread.main (ActivityThread.java:5343)

at java.lang.reflect.Method.invoke! (Native method)

at java.lang.reflect.Method.invoke (Method.java:372)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:905)

at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:700)

#####################################################################

rlepinski commented 7 years ago

@santoshchauhan12 We need the full ANR report to figure where the actual block is at. However if you update to the latest SDK version (8.9.4) those services listed in your ANR have all been replaced.

rlepinski commented 7 years ago

Closing for now. Let me know if you are still having issues with 8.9