You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ApplicationNotResponding: Background ANR
at org.wordpress.android.fluxc.network.UserAgent.<init>(UserAgent.kt:17)
at org.wordpress.android.modules.AppConfigModule.provideUserAgent(AppConfigModule.java:36)
at org.wordpress.android.modules.AppConfigModule_ProvideUserAgentFactory.provideUserAgent(AppConfigModule_ProvideUserAgentFactory.java:51)
at org.wordpress.android.DaggerWordPressRelease_HiltComponents_SingletonC$SingletonCImpl$SwitchingProvider.get0(DaggerWordPressRelease_HiltComponents_SingletonC.java:11957)
at org.wordpress.android.DaggerWordPressRelease_HiltComponents_SingletonC$SingletonCImpl$SwitchingProvider.get(DaggerWordPressRelease_HiltComponents_SingletonC.java:13317)
...
(50 additional frame(s) were not displayed)
The text was updated successfully, but these errors were encountered:
Note this crash occurs when calling android.webkit.WebSettings.getDefaultUserAgent(WebSettings.java:1402), which we do in UserAgent.init. This is a known issue and is by design.
If you need the user agent string but you don't need it immediately, then you can spawn a background thread early during your app startup which calls WebSettings.getDefaultUserAgent(). This will force WebView to load its code. Then you can just call WebSettings.getDefaultUserAgent() a second time whenever you need the user agent string...the second time you call this will be much faster. However you should be aware that calling WebSettings.getDefaultUserAgent() will still do some (not all) of its work on the UI thread, so you may want to initialize your app's UI before doing this.
Sentry Issue: JETPACK-ANDROID-1307
The text was updated successfully, but these errors were encountered: