WordPress-Android icon indicating copy to clipboard operation
WordPress-Android copied to clipboard

ApplicationNotResponding in UserAgent

Open oguzkocer opened this issue 5 years ago • 26 comments

ANRs weren't available in Sentry until the last release, so this issue is not newly introduced. Please keep that in mind while debugging the issue so as not to limit it to the changes introduced recently.

Sentry Url: https://sentry.io/share/issue/09ee294fc5b3453bb0b2920117ae4387/ User Count: 712 Count: 1339 First Release: [email protected]+874 First Seen: 2020-06-03T13:44:42.073000Z Last Seen: 2020-06-24T01:23:36Z 24 Hours: 296 30 Days: 1334

ApplicationNotResponding: Application Not Responding for at least 5000 ms.
     at org.wordpress.android.fluxc.network.UserAgent.<init>(UserAgent.java:18)
     at org.wordpress.android.modules.AppConfigModule.provideUserAgent(AppConfigModule.java:22)
     at org.wordpress.android.modules.AppConfigModule_ProvideUserAgentFactory.provideUserAgent(AppConfigModule_ProvideUserAgentFactory.java:37)
     at org.wordpress.android.modules.AppConfigModule_ProvideUserAgentFactory.get(AppConfigModule_ProvideUserAgentFactory.java:27)
     at org.wordpress.android.modules.AppConfigModule_ProvideUserAgentFactory.get(AppConfigModule_ProvideUserAgentFactory.java:10)
     at org.wordpress.android.fluxc.module.ReleaseNetworkModule_ProvideAccountRestClientFactory.get(ReleaseNetworkModule_ProvideAccountRestClientFactory.java:61)
     at org.wordpress.android.fluxc.module.ReleaseNetworkModule_ProvideAccountRestClientFactory.get(ReleaseNetworkModule_ProvideAccountRestClientFactory.java:15)
     at org.wordpress.android.fluxc.store.AccountStore_Factory.get(AccountStore_Factory.java:44)
     at org.wordpress.android.fluxc.store.AccountStore_Factory.get(AccountStore_Factory.java:12)
     at org.wordpress.android.modules.DaggerAppComponent.injectWordPress(DaggerAppComponent.java:5578)
...
(28 additional frame(s) were not displayed)

oguzkocer avatar Jun 24 '20 01:06 oguzkocer

This issue has been marked as stale because:

  • It has been inactive for the past year.
  • It isn't in a project or a milestone.
  • It hasn’t been labeled [Pri] Blocker, [Pri] High, or good first issue.

Please comment with an update if you believe this issue is still valid or if it can be closed. This issue will also be reviewed for validity and priority during regularly scheduled triage sessions.

stale[bot] avatar Jul 21 '21 12:07 stale[bot]

Sentry Issue: WORDPRESS-ANDROID-2VFK

sentry[bot] avatar Mar 01 '24 01:03 sentry[bot]

Thanks for reporting! 👍

dangermattic avatar Mar 01 '24 01:03 dangermattic

Probably fixed with https://github.com/wordpress-mobile/WordPress-Android/pull/20296 since there are no occurrences after 24.3.1. Feel free to reopen if the issue persist

antonis avatar Mar 27 '24 16:03 antonis

Sentry Issue: JETPACK-ANDROID-P3K

sentry[bot] avatar Apr 03 '24 07:04 sentry[bot]

Sentry Issue: WORDPRESS-ANDROID-2VYY

sentry[bot] avatar Apr 03 '24 07:04 sentry[bot]

Sentry Issue: JETPACK-ANDROID-NWK

sentry[bot] avatar Apr 03 '24 07:04 sentry[bot]

Probably fixed with https://github.com/wordpress-mobile/WordPress-Android/pull/20296 since there are no occurrences after 24.3.1. Feel free to reopen if the issue persist

I'm reopening this issue since the ANR still persist after the fix and is related to a know limitation of the getDefaultUserAgent call https://issuetracker.google.com/issues/289118199#comment9

The issue seems to occur almost exclusively on low end devices.

antonis avatar Apr 03 '24 08:04 antonis

Sentry Issue: WORDPRESS-ANDROID-23MM

sentry[bot] avatar Apr 03 '24 08:04 sentry[bot]

Sentry Issue: JETPACK-ANDROID-N3J

sentry[bot] avatar Apr 03 '24 08:04 sentry[bot]

Sentry Issue: WORDPRESS-ANDROID-2WA6

sentry[bot] avatar Apr 03 '24 08:04 sentry[bot]

Sentry Issue: WORDPRESS-ANDROID-2WCX

sentry[bot] avatar Apr 03 '24 08:04 sentry[bot]

Sentry Issue: WORDPRESS-ANDROID-2WA4

sentry[bot] avatar Apr 03 '24 08:04 sentry[bot]

The ANR roots in two places:

  1. The AppConfigModule that uses the FluxC implemantation.
io.sentry.android.core.ApplicationNotResponding: Background ANR
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:509)
    at WV.ir.<init>(chromium-TrichromeWebViewGoogle6432.aab-stable-626111933:43)
    at WV.rC.<init>(chromium-TrichromeWebViewGoogle6432.aab-stable-626111933:8)
    at org.chromium.android_webview.AwBrowserProcess.f(chromium-TrichromeWebViewGoogle6432.aab-stable-626111933:106)
    at com.android.webview.chromium.M.e(chromium-TrichromeWebViewGoogle6432.aab-stable-626111933:208)
    at com.android.webview.chromium.M.b(chromium-TrichromeWebViewGoogle6432.aab-stable-626111933:42)
    at com.android.webview.chromium.WebViewChromiumFactoryProvider.getStatics(chromium-TrichromeWebViewGoogle6432.aab-stable-626111933:16)
    at android.webkit.WebSettings.getDefaultUserAgent(WebSettings.java:1355)
    at org.wordpress.android.fluxc.network.UserAgent.<init>(UserAgent.kt:17)
    at org.wordpress.android.modules.AppConfigModule.provideUserAgent(AppConfigModule.java:30)
  1. The AppInitialiser.
io.sentry.android.core.ApplicationNotResponding: Background ANR
    at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:227)
    at android.webkit.WebSettings.getDefaultUserAgent(WebSettings.java:1355)
    at org.wordpress.android.AppInitializer$Companion$defaultUserAgent$2.invoke(AppInitializer.kt:1065)
    at org.wordpress.android.AppInitializer$Companion$defaultUserAgent$2.invoke(AppInitializer.kt:1063)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at org.wordpress.android.AppInitializer$Companion.getDefaultUserAgent(AppInitializer.kt:1063)
    at org.wordpress.android.AppInitializer$Companion$userAgent$2.invoke(AppInitializer.kt:1097)
    at org.wordpress.android.AppInitializer$Companion$userAgent$2.invoke(AppInitializer.kt:1096)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at org.wordpress.android.AppInitializer$Companion.getUserAgent(AppInitializer.kt:1096)
    at org.wordpress.android.AppInitializer.init(AppInitializer.kt:308)
    at org.wordpress.android.WordPressApp.onCreate(WordPressApp.java:20)

antonis avatar Apr 03 '24 09:04 antonis

@antonis, is your investigation ongoing? Can I assign this issue and WORDPRESS-ANDROID-2WA6 to you?

irfano avatar Apr 03 '24 15:04 irfano

Hey @irfano 👋 I'll be glad to continue looking at this. I've requested feedback internally (ref pcdRpT-5Us-p2#comment-9676) to see if we can avoid calling getDefaultUserAgent on initialisation when possible. I think that this might also be one of the root causes of https://github.com/wordpress-mobile/WordPress-Android/issues/20147

antonis avatar Apr 03 '24 15:04 antonis

Sentry Issue: JETPACK-ANDROID-P8V

sentry[bot] avatar Apr 10 '24 07:04 sentry[bot]

Sentry Issue: JETPACK-ANDROID-Q96

sentry[bot] avatar Apr 22 '24 06:04 sentry[bot]

Sentry Issue: WORDPRESS-ANDROID-2Y27

sentry[bot] avatar May 09 '24 10:05 sentry[bot]

Sentry Issue: JETPACK-ANDROID-QTP

sentry[bot] avatar May 09 '24 10:05 sentry[bot]

Reopening since the issue persist after https://github.com/wordpress-mobile/WordPress-Android/pull/20603:

The rate seems lower but I'll keep monitoring how this evolves.

antonis avatar May 09 '24 10:05 antonis

Sentry Issue: JETPACK-ANDROID-R42

sentry[bot] avatar May 09 '24 10:05 sentry[bot]

Added the SSLCertsViewActivity related crashes in a separate issue https://github.com/wordpress-mobile/WordPress-Android/issues/20786

antonis avatar May 09 '24 13:05 antonis

Sentry Issue: JETPACK-ANDROID-S38

sentry[bot] avatar May 22 '24 12:05 sentry[bot]

Sentry Issue: WORDPRESS-ANDROID-2YC7

sentry[bot] avatar Jun 07 '24 14:06 sentry[bot]

Sentry Issue: JETPACK-ANDROID-RG5

sentry[bot] avatar Jun 07 '24 14:06 sentry[bot]