yandexmobile / metrica-sample-android Goto Github PK
View Code? Open in Web Editor NEWYandex AppMetrica SDK Sample for Android
Yandex AppMetrica SDK Sample for Android
java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.LocalSocket android.net.LocalServerSocket.accept()' on a null object reference
at com.yandex.metrica.impl.ob.by.run(SourceFile:108)
at java.lang.Thread.run(Thread.java:764)
Android version: 8.0.0, 8.1.0
I have a Kotlin project with coroutines and ProGuard rules (as usual). It has several attached libraries, including AppMetrica. When an application crashes in release
build, it shows a strange stacktrace. Its' lines are mixed, and line numbers don't refer to source code. Recently my friend has gotten this behaviour when moved a project with AppMetrica from Java to Kotlin.
In Kotlin forums they answer the problem is in ProGuard.
Have you met this problem?
Интеграция метрики в ненативные мобильные приложения, собранные с использованием фреймворка Apache Cordova
Для справки: http://plugins.cordova.io/#/package/com.analytics.google
Bug in version 3.10.0
public class App extends MultiDexApplication {
private final static BackgroundThreadPoster mBackgroundThreadPoster =
new BackgroundThreadPoster();
private final static UiThreadPoster mUiThreadPoster = new UiThreadPoster();
public static BackgroundThreadPoster getBackgroundThreadPoster() {
return mBackgroundThreadPoster;
}
public static UiThreadPoster getUiThreadPoster() {
return mUiThreadPoster;
}
public void onCreate() {
super.onCreate();
// Создание расширенной конфигурации библиотеки.
YandexMetricaConfig config =
YandexMetricaConfig.newConfigBuilder("").build();
// Инициализация AppMetrica SDK.
YandexMetrica.activate(getApplicationContext(), config);
SP.init(this);
try {
WebViewDatabase.getInstance(this);
} catch (final Throwable throwable) {
}
//if (isMainProcess()) {
FirebaseApp.initializeApp(this);
MobileAds.initialize(this, getString(R.string.pub_id));
Ads.init(this);
}
private static App sInstance;
public App() {
sInstance = this;
}
public static App get() {
return sInstance;
}
In attach my logcat
logcat.txt
Hey, guys!
We are getting this issue multiple times on multiple Samsung devices on Android OS 10:
Fatal Exception: java.lang.RuntimeException: Unable to create service com.yandex.metrica.MetricaService: java.lang.RuntimeException: android.os.DeadSystemException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4294)
at android.app.ActivityThread.access$1800(ActivityThread.java:272)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8016)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
Caused by java.lang.RuntimeException: android.os.DeadSystemException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4288)
at android.app.ActivityThread.access$1800(ActivityThread.java:272)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8016)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
Caused by android.os.DeadSystemException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4288)
at android.app.ActivityThread.access$1800(ActivityThread.java:272)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8016)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
Devices:
Galaxy S10e (36%)
Galaxy A51 (17%)
Galaxy S10 (15%)
Galaxy A31 (9%)
Galaxy Note10 Lite (5%)
Galaxy Note10+ (4%)
Galaxy S20 Ultra 5G (4%)
Galaxy S10+ (4%)
Galaxy S20 (2%)
Galaxy S10 (2%)
Galaxy A10s (2%)
java.lang.IllegalStateException:
at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1518)
at android.app.ContextImpl.startService (ContextImpl.java:1474)
at android.content.ContextWrapper.startService (ContextWrapper.java:644)
at com.yandex.metrica.impl.ob.br.a (SourceFile:212)
at com.yandex.metrica.impl.ob.br.a (SourceFile:1179)
at com.yandex.metrica.impl.ag$2.run (SourceFile:588)
at java.lang.Thread.run (Thread.java:764)`
We are using official react native wrapper that uses 'com.yandex.android:mobmetricalib:3.1.0'.
Can you confirm that this bug was fixed in the next releases?
Добрый день! Возникла проблема с отправкой событий.
В приложении есть плеер, пока он играет в фоне мы ежеминутно отправляем события в аппметрику, Если пользователь ставит на паузу, события перестают отправляться
Если пользователь был на паузе дольше 5 минут, а потом запустил плеер не разблокировав экран, мы по новой шлем события, но в аппметрику они не доходят. Т.е по логам мы событие отправляем, но в системе они не отображаются
События начинают по новой отправляться только если пользователь разблокирует экран и начнет взаимодействие с приложением.
Подскажите, в чем может быть проблема?
Hello i am trying to use Admob mediation to show Yandex ads (Banner & Interstitial ), Yandex ads not showing i get this warning!
Yandex Mobile Ads 5.7.0 integrated successfully
Yandex Mobile Ads Adapter 5.7.0.0 for Admob Mediation integrated successfully
Yandex Mobile Ads Adapter 5.7.0.0 for Admob Mediation initialized successfully
Class com.yandex.metrica.impl.ob.Ni failed lock verification and will run slower.
Common causes for lock verification issues are non-optimized dex code
and incorrect proguard optimizations.
Could not instantiate mediation adapter: com.admob.mobileads.YandexBanner (not a valid adapter).
Could not instantiate mediation adapter: com.admob.mobileads.YandexInterstitial (not a valid adapter).
Yandex Mobile Ads 5.7.0 initialized successfully
Class com.yandex.metrica.impl.ob.Ni failed lock verification and will run slower.
Common causes for lock verification issues are non-optimized dex code
and incorrect proguard optimizations.
I am using in Gradle
implementation 'com.yandex.android:mobileads:5.7.0'
implementation 'com.yandex.ads.adapter:admob-mobileads:5.7.0.0'
implementation 'com.google.android.gms:play-services-ads:21.3.0'
I followed this guide here:
https://yandex.com/dev/mobile-ads/doc/android/adapters/admob-adapter.html
How to fix this problem? Thanks
Can't build the project with version 3.16.1
Error: ...\app\build\intermediates\transforms\FirebasePerformancePlugin\assistant\debug\201\com\yandex\metrica\ConfigurationJobService.class, boolean com.yandex.metrica.ConfigurationJobService.c(android.app.job.JobParameters), Class content provided for type descriptor com.yandex.metrica.impl.ob.Sh actually defines class com.yandex.metrica.impl.ob.sh
Stack trace:
com.android.tools.r8.errors.a: Class content provided for type descriptor com.yandex.metrica.impl.ob.Sh actually defines class com.yandex.metrica.impl.ob.sh
at com.android.tools.r8.errors.a.a(:7)
at com.android.tools.r8.ir.conversion.O.b(:58)
at com.android.tools.r8.ir.conversion.O.a(:104)
at com.android.tools.r8.ir.conversion.O.a(:53)
at com.android.tools.r8.graph.C.b(:40)
at com.android.tools.r8.ir.conversion.O.b(:35)
at com.android.tools.r8.utils.U0.a(:10)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:322)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:66)
at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:36)
at com.android.tools.r8.utils.U0.a(:3)
at com.android.tools.r8.ir.conversion.O.a(:10)
at com.android.tools.r8.D8.d(:29)
at com.android.tools.r8.D8.b(:1)
at com.android.tools.r8.utils.W.a(:30)
at com.android.tools.r8.D8.run(:11)
at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:116)
Версия библиотеки 3.21.1 (на нескольких прошлых версиях тоже воспроизводится, все версии не проверял). Устройства разные, версии андроида разные.
При запуске релизного билда падает со следующей ошибкой
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/yandex/metrica/impl/ob/CD;
at com.yandex.metrica.YandexMetricaConfig$Builder.(:1)
at com.yandex.metrica.YandexMetricaConfig.newConfigBuilder(:1)
С дебаг версией таких проблем нет. Если отключить в релизной сборке минификацию таких проблем тоже нет.
Правила для proguard взял из этого репозитория.
When I updated the library to
implementation 'com.android.installreferrer:installreferrer:1.1'
an application stopped running in release mode on ZTE Blade A520 device with the following crash log:
2019-12-09 16:54:18.417 19278-19278/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.some_project:Metrica, PID: 19278
java.lang.NoClassDefFoundError: Failed resolution of: Lb/d/a/a/a/a$a;
at com.android.installreferrer.api.InstallReferrerClientImpl$InstallReferrerServiceConnection.onServiceConnected()
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1493)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1521)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6272)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: java.lang.ClassNotFoundException: b.d.a.a.a.a$a
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.android.installreferrer.api.InstallReferrerClientImpl$InstallReferrerServiceConnection.onServiceConnected()
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1493)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1521)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6272)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/aidl/BaseStub;
at com.android.installreferrer.api.InstallReferrerClientImpl$InstallReferrerServiceConnection.onServiceConnected()
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1493)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1521)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6272)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.aidl.BaseStub" on path: DexPathList[[zip file "/data/app/com.some_project-1/base.apk"],nativeLibraryDirectories=[/data/app/com.some_project-1/lib/arm, /system/lib, /vendor/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.android.installreferrer.api.InstallReferrerClientImpl$InstallReferrerServiceConnection.onServiceConnected()
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1493)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1521)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6272)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
2019-12-09 16:54:18.603 1147-4694/? E/setSystemUIColor: setSystemUIColor sbc=0 nbc=0
2019-12-09 16:54:21.819 19242-19242/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.some_project, PID: 19242
java.lang.NoClassDefFoundError: Failed resolution of: Lb/d/a/a/a/a$a;
at com.android.installreferrer.api.InstallReferrerClientImpl$InstallReferrerServiceConnection.onServiceConnected()
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1493)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1521)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6272)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: java.lang.ClassNotFoundException: b.d.a.a.a.a$a
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.android.installreferrer.api.InstallReferrerClientImpl$InstallReferrerServiceConnection.onServiceConnected()
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1493)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1521)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6272)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/aidl/BaseStub;
at com.android.installreferrer.api.InstallReferrerClientImpl$InstallReferrerServiceConnection.onServiceConnected()
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1493)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1521)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6272)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.aidl.BaseStub" on path: DexPathList[[zip file "/data/app/com.some_project-1/base.apk"],nativeLibraryDirectories=[/data/app/com.some_project-1/lib/arm, /system/lib, /vendor/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.android.installreferrer.api.InstallReferrerClientImpl$InstallReferrerServiceConnection.onServiceConnected()
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1493)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1521)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6272)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Hi, i have three questions:
MetricaEventHandler
seems deprecated on latest version of library, i was using it to support install tracking by multiple SDKs. What is the suggested path now?
Is it safe to use install referrer library 2.0 ? Your doc. is suggesting 1.1.2
Is MetricaEventHandler
BroadcastReceiver still enabled by default on latest version? Do we have to disable it manually?
MetricaEventHandler
should not be used anymore, as BroadcastReceiver will not be sent since March 1 and each 3rd party SDK implements install tracking separately using install referrer library. (still MetricaEventHandler
looks like enabled by default)هي مدينة تقع في شمال المملكة
Добрый день. Постоянно появляются ANR связанные с Yandex.Metrica
В Google Play Console отображаются следующие:
Правда stacktrace не отображает.
В Firebase stacktrace уже есть
`an.main:Metrica (unknown)
tid=4239 systid=4239
0 libc.so syscall + 28
1 libart.so art::ConditionVariable::WaitHoldingLocks(art::Thread*) + 148
2 libart.so art::ThreadList::WaitForOtherNonDaemonThreadsToExit(bool) + 128
3 libart.so art::JII::DestroyJavaVM(_JavaVM*) + 32
4 libandroid_runtime.so android::AndroidRuntime::start(char const*, android::Vectorandroid::String8 const&, bool) + 1196
5 app_process64 main + 1332
6 libc.so __libc_init + 108`
Hi,
I have some questions about "recordEvent" method.
1- Is there any limits in event numbers?
2- Can I use recordEvent as an alternative for crashlytics log function?
Thanks.
After setting push notification I send it and in onMessageReceived(remoteMessage: RemoteMessage)
receive this:
{"a":"u=d5a80287-8226-465f-ae5f-74101fb49ce5","b":false,"c":"Доп. параметры","d":{"a":1588267480,"ab":1,"e":"Тест 😸","u":[],"g":"Тест 😺","w":"abc:\/\/def.ru\/g?h=7","m":{}}}
I see that additional settings are after c
key and deep link parameters are after w
. Where can I find a list of parameters?
After switching to target sdk 28 and running on android 9, I get the following error in logcat:
FATAL EXCEPTION: hv@7272c23
Process: com.test:Metrica, PID: 26384
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
at com.yandex.metrica.impl.ob.hq.a(SourceFile:62)
at com.yandex.metrica.impl.ob.ht.a(SourceFile:41)
at com.yandex.metrica.impl.ob.hv$b.handleMessage(SourceFile:62)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/app/com.test-Q6ylhpNLcIwiVLe1LUvBvg==/base.apk"],nativeLibraryDirectories=[/data/app/com.test-Q6ylhpNLcIwiVLe1LUvBvg==/lib/arm, /data/app/com.test-Q6ylhpNLcIwiVLe1LUvBvg==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.yandex.metrica.impl.ob.hq.a(SourceFile:62)
at com.yandex.metrica.impl.ob.ht.a(SourceFile:41)
at com.yandex.metrica.impl.ob.hv$b.handleMessage(SourceFile:62)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Детали утечки описаны в stackoverflow: https://stackoverflow.com/q/64439422/5222156
Утечку нашел через LeakCananary
Версия библиотеки: com.yandex.android:mobmetricalib:3.13.1
Также есть небольшой видео-разбор этой утечки: https://twitter.com/Piwai/status/1322671467759198208
com.yandex.android:mobmetricalib:5.2.0
huawei/honor
android 10
Недавно в крашлитике начали массово сыпаться вылеты со следующим логом:
Fatal Exception: java.lang.RuntimeException
Unable to instantiate service com.yandex.metrica.ConfigurationJobService: java.lang.ClassNotFoundException:
Didn't find class "com.yandex.metrica.ConfigurationJobService" on path: DexPathList[[
zip file "/data/app/com.our.app-25W08dNPPtwlFmtDVLhvtQ==/base.apk",
zip file "/data/app/com.our.app-25W08dNPPtwlFmtDVLhvtQ==/split_config.arm64_v8a.apk",
zip file "/data/app/com.our.app-25W08dNPPtwlFmtDVLhvtQ==/split_config.xxhdpi.apk"],
nativeLibraryDirectories=[/data/app/com.our.app-25W08dNPPtwlFmtDVLhvtQ==/lib/arm64,
/data/app/com.our.app-25W08dNPPtwlFmtDVLhvtQ==/base.apk!/lib/arm64-v8a,
/data/app/com.our.app-25W08dNPPtwlFmtDVLhvtQ==/split_config.arm64_v8a.apk!/lib/arm64-v8a,
/data/app/com.our.app-25W08dNPPtwlFmtDVLhvtQ==/split_config.xxhdpi.apk!/lib/arm64-v8a,
/system/lib64, /hw_product/lib64, /system/product/lib64, /prets/lib64]]
Краш затрагивает исключительно устройства huawei на 10 андроиде, сначала думали, что проблема в отсутствии поддержки hms-push
в проекте (но мы подержку huawei девайсов и не добавляли), но ее прикручивание не помогло
Крашлитика говорит, что это early crash
, но в то же время, что 95% вылетов происходят в бэкграунде
Hi there
My app is working fine. The I wanted to add appmetrica sdk and it keep showing
app_name keeps stopping
How can I solve this issue ?
please let me know
thanks
Hello, we have some crashes at devices with Android 9:
Fatal Exception: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 4874 SQLITE_IOERR_SHMSIZE)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.executeForLong + 648(SQLiteConnection.java:648)
at android.database.sqlite.SQLiteSession.executeForLong + 652(SQLiteSession.java:652)
at android.database.sqlite.SQLiteStatement.simpleQueryForLong + 107(SQLiteStatement.java:107)
at android.database.DatabaseUtils.longForQuery + 842(DatabaseUtils.java:842)
at android.database.DatabaseUtils.longForQuery + 830(DatabaseUtils.java:830)
at android.database.sqlite.SQLiteDatabase.getVersion + 956(SQLiteDatabase.java:956)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked + 371(SQLiteOpenHelper.java:371)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase + 322(SQLiteOpenHelper.java:322)
at com.yandex.metrica.impl.ob.jk.a + 116(jk.java:116)
at com.yandex.metrica.impl.ob.lu.<init> + 32(lu.java:32)
at com.yandex.metrica.impl.ob.dj.a + 272(dj.java:272)
at com.yandex.metrica.impl.ob.di.<init> + 164(di.java:164)
at com.yandex.metrica.impl.ob.di.<init> + 117(di.java:117)
at com.yandex.metrica.impl.ob.ed.<init> + 31(ed.java:31)
at com.yandex.metrica.impl.ob.es.c + 61(es.java:61)
at com.yandex.metrica.impl.ob.es.a + 26(es.java:26)
at com.yandex.metrica.impl.ob.dx.d + 148(dx.java:148)
at com.yandex.metrica.impl.ob.dx.a + 107(dx.java:107)
at com.yandex.metrica.impl.ob.er.b + 36(er.java:36)
at com.yandex.metrica.impl.ob.eg.a + 51(eg.java:51)
at com.yandex.metrica.impl.ob.aw$a.run + 455(aw.java:455)
at android.os.Handler.handleCallback + 873(Handler.java:873)
at android.os.Handler.dispatchMessage + 99(Handler.java:99)
at android.os.Looper.loop + 193(Looper.java:193)
at android.os.HandlerThread.run + 65(HandlerThread.java:65)
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.yandex.metrica.impl.ob.fj.b(boolean)' on a null object reference
at com.yandex.metrica.impl.ob.lx.d(SourceFile:78)
at com.yandex.metrica.impl.ob.es.a(SourceFile:110)
at com.yandex.metrica.impl.ob.de.a(SourceFile:1075)
at com.yandex.metrica.impl.ob.dn.c(SourceFile:1200)
at com.yandex.metrica.impl.ob.ab.c(SourceFile:245)
at com.yandex.metrica.impl.ob.bs.a(SourceFile:57)
at com.yandex.metrica.impl.ob.bf$1.a(SourceFile:27)
at com.yandex.metrica.impl.ob.bf$1.a(SourceFile:24)
at com.yandex.metrica.impl.ob.ay.a(SourceFile:36)
at com.yandex.metrica.impl.ob.bf.b(SourceFile:24)
at com.yandex.metrica.impl.ob.ab.a(SourceFile:222)
at com.yandex.metrica.impl.ob.aw.a(SourceFile:34)
at com.yandex.metrica.impl.ai$a.run(SourceFile:374)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Android 5.1, 6.0. Rooted 100%
Падения начались с 28.11.2018 8:00 AM UTC
com.yandex.android:mobmetricalib:3.1.0
После обновления у меня такая проблема:
java.lang.RuntimeException: Unable to create application <package>...view.app.App: com.yandex.metrica.impl.w$c:
Please check com.yandex.metrica.MetricaService in AndroidManifest file.
Attribute metrica:api:level should be equal to 61.
Перейти на старую версию не могу. Была версия 2.7.6. Но Вы я думаю знаете, чтобыло в Android 8.0. Пришлось обновиться. Пробовал все версии выше 2.7.6. Всегда одна и та же ошибка. Что делать?
Доброе утро.
Наше приложение имеет очень большое количество ANR связанное с "executing service com.yandex.metrica.MetricaService", а так же "
executing service org.findmykids.app/com.yandex.metrica.ConfigurationService" . Ни стектрейса, ничего нет. Что можно сделать чтобы поправить это?
File > New > Import Project...
Open a folder metrica-sample-android
. AS answers: "The length of the project file exceeds the limit of 100 characters.". Other ways of opening also haven't succeeded.
Hi,
My use case is an android launcher app for a tv box and Metrica crashes on device boot.
After a few seconds user is unlocked automatically and everything is fine from there.
java.lang.IllegalStateException: SharedPreferences in credential encrypted storage are not available until after user is unlocked at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:419) at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:404) at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:174) at com.yandex.metrica.impl.ob.kr.a(SourceFile:1) at com.yandex.metrica.impl.ob.cr.a(SourceFile:1) at com.yandex.metrica.impl.ob.cr.<init>(SourceFile:5) at com.yandex.metrica.impl.ob.fr.<init>(SourceFile:1) at com.yandex.metrica.impl.ob.vc.a(SourceFile:1) at com.yandex.metrica.impl.ob.ye.<init>(SourceFile:17) at com.yandex.metrica.impl.ob.ye.<init>(SourceFile:6) at com.yandex.metrica.impl.ob.ye.<init>(SourceFile:3) at com.yandex.metrica.impl.ob.we.l(SourceFile:1) at com.yandex.metrica.impl.ob.we.a(SourceFile:1) at com.yandex.metrica.impl.ob.te.call(SourceFile:2) at com.yandex.metrica.impl.ob.te.call(SourceFile:1) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.os.HandlerThread.run(HandlerThread.java:65) java.util.concurrent.ExecutionException: java.lang.IllegalStateException: SharedPreferences in credential encrypted storage are not available until after user is unlocked at java.util.concurrent.FutureTask.report(FutureTask.java:123) at java.util.concurrent.FutureTask.get(FutureTask.java:193) at com.yandex.metrica.impl.ob.we.n(SourceFile:1) at com.yandex.metrica.impl.ob.we.a(SourceFile:13) at com.yandex.metrica.impl.ob.Vt.run(SourceFile:3) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.os.HandlerThread.run(HandlerThread.java:65) java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: SharedPreferences in credential encrypted storage are not available until after user is unlocked at com.yandex.metrica.impl.ob.we.n(SourceFile:2) at com.yandex.metrica.impl.ob.we.a(SourceFile:13) at com.yandex.metrica.impl.ob.Vt.run(SourceFile:3) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.os.HandlerThread.run(HandlerThread.java:65)
Я использую оболочку замариновскую для метрики. На дроиде 7.1.2 все работает хорошо, однако на дроиде 9 крашится со стэктрейсом ниже.
Я также оформил тикет на репозиторие с замариновским плагином, однако там уже давно не было обновлений. Возможно там просто надо повысить версию метрики с 3.6.4 на 3.8.0 и ошибка исправится?
10-25 13:10:53.427 18480 18512 I AppMetrica: [my.package.name] : [] Initializing of Metrica, Release type, Version 3.6.4, API Level 81, Dated 13.06.2019.
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: Error while reading from SharedPreferences
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: java.lang.SecurityException: MODE_WORLD_READABLE no longer supported
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at android.app.ContextImpl.checkMode(ContextImpl.java:2495)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:414)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:404)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at com.google.android.gms.ads.identifier.AdvertisingIdClient.getAdvertisingIdInfo(Unknown Source:12)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at java.lang.reflect.Method.invoke(Native Method)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at com.yandex.metrica.impl.ac.GoogleAdvertisingIdGetter.e(SourceFile:261)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at com.yandex.metrica.impl.ac.GoogleAdvertisingIdGetter.b(SourceFile:51)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at com.yandex.metrica.impl.ac.GoogleAdvertisingIdGetter$2.a(SourceFile:163)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at com.yandex.metrica.impl.ac.GoogleAdvertisingIdGetter$2.call(SourceFile:158)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at android.os.Handler.handleCallback(Handler.java:873)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at android.os.Handler.dispatchMessage(Handler.java:99)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at android.os.Looper.loop(Looper.java:193)
10-25 13:10:53.453 18480 18509 W AdvertisingIdClient: at android.os.HandlerThread.run(HandlerThread.java:65)
Stacktrace:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.Object.clone()' on a null object reference
at com.yandex.metrica.impl.ob.je.a(SourceFile:22)
at com.yandex.metrica.impl.ob.jf.a(SourceFile:23)
at com.yandex.metrica.impl.ob.m.reportError(SourceFile:320)
at com.yandex.metrica.impl.ob.ap.reportError(SourceFile:152)
at com.yandex.metrica.impl.ob.py$2.run(SourceFile:176)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
SDK v3.6.0-v3.6.4 (в версии 3.5.3 ошибка не возникает)
Nexus 5, Android v6.0.1
Ошибка возникает только при использовании ProGuard на APK приложения (скорее всего это не столь важно для непосредственной причины вылета).
Вылетает каждый второй запуск приложения.
Скорее ошибка в вызывающем коде со стороны приложения или одной из сторонних библиотек, однако из стека этого не видно. Хорошо бы, чтобы AppMetrica проверяла входные параметры перед отправкой Runnable в Handler. Тогда можно было бы увидеть исходную проблему в стектрэйсе. (Fail earlier).
Посмотрев исходный код, оказалось что похоже вылетает из-за того, что входящий Throwable в reportError == null. Хотя аннотация явно и указывает, что он может быть null, фактически в коде AppMetrica этот контракт не выполняется.
Добрый день.
Версия библиотеки:
'com.yandex.android:mobmetricalib:3.20.1'
В приложении есть 3 процесса: "main", "light" и "Metrica".
Метрика инициализируется во всех процессах:
YandexMetricaConfig.Builder builder = YandexMetricaConfig.newConfigBuilder(YANDEX_METRICA_API_KEY);
if(BuildConfig.DEBUG)
builder.withLogs();
YandexMetricaConfig config = builder.build();
YandexMetrica.activate(getApplicationContext(), config);
YandexMetrica.enableActivityAutoTracking(this);
Firebase инициализируется везде кроме "Metrica" процесса:
if (!isMetricaProcess()) {
FirebaseInit.init(this);
}
А Yandex Push SDK только в "main" процессе:
if (isMainProcess()) {
YandexMetricaPush.init(getApplicationContext());
}
Android Manifest:
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND"
android:process=":light"
tools:node="replace">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</receiver>
<service
android:name=".services.FirebaseService"
android:exported="false"
android:process=":light">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<!-- Yandex PushSDK -->
<service android:name="com.yandex.metrica.push.firebase.MetricaMessagingService" tools:node="remove"/>
В Firebase сервисе при получении токена и сообщений мы перенаправляем данные в MetricaMessagingService:
@Override
public void onNewToken(String s) {
super.onNewToken(s);
SharedPrefs.getInstance().set(SharedPrefs.KEY_PUSH_TOKEN, s);
new MetricaMessagingService().onNewToken(s);
}
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
Timber.d("Push received");
if(Notify.isOurPush(remoteMessage.getData())) {
Timber.d("Push: Our");
Notify.send(remoteMessage.getData());
}else {
Timber.d("Push: Yandex");
new MetricaMessagingService().processPush(this, remoteMessage);
}
}
При этом достаточно большое кол-во крэшей видим в Firebase Crashlytics:
Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 1610 byte allocation with 8388608 free bytes and 22MB until OOM; failed due to fragmentation (required continguous free 16384 bytes for a new buffer where largest contiguous free 12288 bytes)
at java.lang.StringFactory.newStringFromBytes(StringFactory.java:79)
at java.lang.StringFactory.newStringFromBytes(StringFactory.java:53)
at java.lang.StringFactory.newStringFromBytes(StringFactory.java:45)
at com.yandex.metrica.impl.ob.za.a(SourceFile:4)
at com.yandex.metrica.impl.ob.fa.a(SourceFile:13)
at com.yandex.metrica.impl.ob.fa.(SourceFile:16)
at com.yandex.metrica.impl.ob.Ta.b(SourceFile:6)
at com.yandex.metrica.impl.ob.sd.a(SourceFile:56)
at com.yandex.metrica.impl.ob.V.reportError(SourceFile:3)
at com.yandex.metrica.impl.ob.Rs.run(SourceFile:1)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
This happened today, application was not updated.
Fatal Exception: java.lang.SecurityException: MODE_WORLD_READABLE no longer supported
at android.app.ContextImpl.checkMode + 2420(ContextImpl.java:2420)
at android.app.ContextImpl.openFileOutput + 532(ContextImpl.java:532)
at android.content.ContextWrapper.openFileOutput + 201(ContextWrapper.java:201)
at com.yandex.metrica.impl.ob.ag.a + 285(ag.java:285)
at com.yandex.metrica.impl.ob.ls.a + 60(ls.java:60)
at com.yandex.metrica.impl.ob.ls.a + 51(ls.java:51)
at com.yandex.metrica.impl.ob.sd.a + 304(sd.java:304)
at com.yandex.metrica.impl.ob.ca.a + 63(ca.java:63)
at com.yandex.metrica.impl.ob.bi.b + 27(bi.java:27)
at com.yandex.metrica.impl.ob.cc.b + 78(cc.java:78)
at com.yandex.metrica.impl.ob.bh.a + 92(bh.java:92)
at com.yandex.metrica.impl.ob.bh.run + 75(bh.java:75)
at com.yandex.metrica.impl.ob.ur.execute + 18(ur.java:18)
at com.yandex.metrica.impl.ob.vd.execute + 15(vd.java:15)
at com.yandex.metrica.impl.ob.bb.run + 90(bb.java:90)
After then I've added YandexMetrica, I went to chrome://inspect and saw it:
com.myapp.android.dev (2.0.0-dev)
MyApp (powered by Stetho):Metrica
inspectcom.myapp.android.dev (2.0.0-dev)
MyApp (powered by Stetho)
inspect
If I open the first "inspect" by Metrica then I don't see my network requests.
But if I open the second "inspect" then I see them, but in my app I get exception for each, like this:
HTTP FAILED: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference
And this exception be until I will close the "inspect window".
There is my settings for OkHttpClient:
final HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(message -> {
if (BuildConfig.DEBUG) {
Timber.tag("OkHttp").d(message);
}
});
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
final OkHttpClient.Builder builder = new OkHttpClient.Builder()
.connectTimeout(15, TimeUnit.SECONDS)
.readTimeout(60, TimeUnit.SECONDS)
.addInterceptor(loggingInterceptor)
.addInterceptor(new StethoInterceptor());
+ default settings Yandex Metrica.
// Yandex Appmetrica SDK.
implementation 'com.yandex.android:mobmetricalib:3.5.3'
implementation 'com.android.installreferrer:installreferrer:1.0'
// Stetho
debugImplementation 'com.facebook.stetho:stetho:1.5.0'
debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
Добрый день!
Столкнулся с проблемой, что после поднятия версии UI в приложении начинает себя вести некорректно.
кнопки начинают пропадать, viewPager перестает обновляться и т.д.
Инициализировал метрику, согласно инструкции с офф сайта.
Есть мнение, что либа тянет с собой зависимости, которые конфликтуют с нашими.
10-22 11:26:28.040: WARN/Bundle(11016): Key metrica:api:level expected Integer but value was a java.lang.Float. The default value 0 was returned.
10-22 11:26:28.085: WARN/Bundle(11016): Attempt to cast generated internal exception:
java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Integer
В firebase наблюдаем очень много таких крешей. Версия метрики 3.7.2. Подскажите это исправлено в новых версиях или планируется это исправить?
Fatal Exception: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
at android.database.sqlite.SQLiteConnection.nativeOpen(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:210)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:194)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:493)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:200)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:192)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:864)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:849)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:724)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:714)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:305)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:262)
at com.yandex.metrica.impl.ob.kk.a(SourceFile:6)
at com.yandex.metrica.impl.ob.nf.(SourceFile:9)
at com.yandex.metrica.impl.ob.eg.a(SourceFile:7)
at com.yandex.metrica.impl.ob.ef.(SourceFile:23)
at com.yandex.metrica.impl.ob.ef.(SourceFile:5)
at com.yandex.metrica.impl.ob.fq.c(SourceFile:3)
at com.yandex.metrica.impl.ob.fq.a(SourceFile:1)
at com.yandex.metrica.impl.ob.eu.d(SourceFile:5)
at com.yandex.metrica.impl.ob.eu.a(SourceFile:4)
at com.yandex.metrica.impl.ob.fo.b(SourceFile:1)
at com.yandex.metrica.impl.ob.fd.a(SourceFile:1)
at com.yandex.metrica.impl.ob.bc$a.run(SourceFile:7)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
Please add AndroidX support, so I can disable jetifier in my project
Today i've noticed several users with this crash.
62% of the them was in background.
Library version — 3.10.0.
Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.BATTERY_CHANGED flg=0x60000010 (has extras) } in com.yandex.metrica.impl.ob.p$1@d1bd2b0
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1214)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6351)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:896)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:786)
Caused by java.lang.NullPointerException: Attempt to read from field 'com.yandex.metrica.impl.ob.p$a$a com.yandex.metrica.impl.ob.p$a.b' on a null object reference
at com.yandex.metrica.impl.ob.p$1.onReceive(SourceFile:88)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1196)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6351)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:896)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:786)
При релизе апы вижу такое предупреждение.
В приложении используется версия SDK, которая нарушает правила
Ваше приложение packagename версии N содержит SDK com.yandex.android:mobmetricalib или использует библиотеку, зависящую от SDK, который по умолчанию запрашивает сведения о местоположении устройства и не проверяет программными способами, разрешил ли конечный пользователь доступ к этой информации приложению. Продукты с SDK, собирающими личные и конфиденциальные данные без уведомления и получения согласия, нарушают правила Google Play.
Согласно данным от вашего поставщика SDK вы можете перейти на версию 5.0.0 или спросить у него, существует ли более поздняя подходящая версия. Google не может рекомендовать стороннее ПО.
до какого то момента таких проблем не было. есть идеи, с чем может быть связано?
Версия сдк - 5.0.0
Build plugin не поддерживает сборки Android App Bundle, только APK.
buildscript {
...
dependencies {
...
classpath 'com.yandex.android:appmetrica-build-plugin:0.0.1'
}
}
configBuilder.withLocationTracking(false);
implementation "com.yandex.android:mobmetricalib:3.18.0"
Мегафон Q5 Android 4.4.2
Сыпет крашами в цикле, 20+ тыс крашей в день!
E/AndroidRuntime: FATAL EXCEPTION: YMM-MSTE-13
Process: com.megalabs.megafon.tv:Metrica, PID: 6124
java.lang.NullPointerException
at android.location.LocationManager.getProviders(LocationManager.java:344)
at com.yandex.metrica.impl.ob.q.a(SourceFile:2)
at com.yandex.metrica.impl.ob.wg.a(SourceFile:18)
at com.yandex.metrica.impl.ob.wg.a(SourceFile:6)
at com.yandex.metrica.impl.ob.bg.a(SourceFile:2)
at com.yandex.metrica.impl.ob.bg.a(SourceFile:1)
at com.yandex.metrica.impl.ob.Tf.a(SourceFile:3)
at com.yandex.metrica.impl.ob.cg.b(SourceFile:1)
at com.yandex.metrica.impl.ob.Qe.a(SourceFile:5)
at com.yandex.metrica.impl.ob.if.a(SourceFile:7)
at com.yandex.metrica.impl.ob.Df.b(SourceFile:4)
at com.yandex.metrica.impl.ob.rf.a(SourceFile:1)
at com.yandex.metrica.impl.ob.Fc.run(SourceFile:6)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
I am using your library by initialising in the onCreate() method of the Application class as follows:
// Creating an extended library configuration. val config = YandexMetricaConfig.newConfigBuilder(getString(yandex_metrika_api_key)).build() // Initializing the AppMetrica SDK. YandexMetrica.activate(applicationContext, config) // Automatic tracking of user activity. YandexMetrica.enableActivityAutoTracking(this)
My project uses koin as a dependency injection, and I have class TaskManager class that I announced as a singleton in koin module. I inject this class in activities as well in Application class, because I need trigger its synchronize() function on network change. The problem is that, when I initialise YandexMetrica, the library creates the instance of TaskManager, and calls synchronize() method by itself and here the problems start. Because I have a queue which writes/reads data to Room DB and synchronises with network. Because of such unexpected behaviour, my queue is broken. Can you please explain why it tries to recreate the objects declared in Application in its own process (I know that YandexMetrica works in a different process) even if the objects are declared as singletones? Thanks for your response in advance.
Стабильно ловим краши на устройствах Prestigio, DOOGEE, Micromax, UMIDIGI, UMI. Android 4, 5, 6. Версия библиотеки: 'com.yandex.android:mobmetricalib:3.5.3'.
Fatal Exception: java.lang.SecurityException: MODE_WORLD_READABLE no longer supported at android.app.ContextImpl.checkMode(ContextImpl.java:2171) at android.app.ContextImpl.openFileOutput(ContextImpl.java:495) at android.content.ContextWrapper.openFileOutput(ContextWrapper.java:192) at com.yandex.metrica.impl.x.a(SourceFile:285) at com.yandex.metrica.impl.ob.hd.a(SourceFile:1053) at com.yandex.metrica.impl.ob.ms.a(SourceFile:305) at com.yandex.metrica.impl.bp.a(SourceFile:63) at com.yandex.metrica.impl.aw.b(SourceFile:23) at com.yandex.metrica.impl.br.b(SourceFile:167) at com.yandex.metrica.impl.aq.c(SourceFile:2191) at com.yandex.metrica.impl.aq$a.run(SourceFile:252) at com.yandex.metrica.impl.ob.pc.execute(SourceFile:18) at com.yandex.metrica.impl.ob.po.execute(SourceFile:15) at com.yandex.metrica.impl.aq.run(SourceFile:94)
Hello,
We have a random video call app, named Hola, which is using WebRTC library. We started to publish TikTok ads and in order to track the installations we are trying to implement AppMetrica library to our project. In Anroid, when we tried to initialize WebRTC’s PeerConnection library with AppMetrica we are facing the following error:
java.lang.UnsatisfiedLinkError: No implementation found for void org.webrtc.PeerConnectionFactory.nativeInitializeAndroidGlobals() (tried Java_org_webrtc_PeerConnectionFactory_nativeInitializeAndroidGlobals and Java_org_webrtc_PeerConnectionFactory_nativeInitializeAndroidGlobals__)
at org.webrtc.PeerConnectionFactory.nativeInitializeAndroidGlobals(Native Method)
In this following link, it is being said that the other third party libraries need to be initialized in the Application class’s main process. We are implementing them exactly as it is recommended in the link and we are still facing this problem.
https://appmetrica.yandex.com/docs/mobile-sdk-dg/concepts/android-features.html#recommendations
Do you have any idea how can we resolve this situation?
Thank you for your help and interest
YandexMetrica doesn't have time to initialize before YandexMetricaPush initializing.
And it crashes on some devices
Fatal Exception: java.lang.IllegalStateException: YandexMetrica isn't initialized. Use YandexMetrica#activate(android.content.Context, String) method to activate.
at com.yandex.metrica.push.impl.b.a(SourceFile:79)
at com.yandex.metrica.push.YandexMetricaPush.init(SourceFile:139)
Application class
public class MyApp extends Application {
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
YandexMetrica.activate(getApplicationContext(),
YandexMetricaConfig.newConfigBuilder(YANDEX_METRICA_API_KEY)
.build());
YandexMetrica.enableActivityAutoTracking(this);
YandexMetricaPush.init(getApplicationContext());
}
}
build.gradle in app module
implementation "com.android.support:appcompat-v7:26.1.0"
implementation "com.yandex.android:mobmetricapushlib:1.1.0"
implementation "com.yandex.android:mobmetricalib:3.2.0"
implementation "com.google.firebase:firebase-messaging:12.0.1"
implementation "com.google.android.gms:play-services-base:12.0.1"
Добрый день,
com.yandex.android:mobmetricalib:3.21.1
При инициализации на Android 12 получаем следующий ексепшн:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: Metrica, PID: 9089
java.lang.RuntimeException: Unable to create service com.yandex.metrica.ConfigurationJobService: java.lang.IllegalArgumentException: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4498)
at android.app.ActivityThread.access$1500(ActivityThread.java:250)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2064)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7829)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:982)
Когда планируется добавить поддержку Android 12 в SDK?
Good morning,
google send us an advice in order to migrate to the new install referrer API but it seems that Yandex Metrica is still using the old method. Could you please update the SDK in order to migrate to the new API?
Google message says:
We recently announced that we’ll be deprecating the install_referrer intent broadcast mechanism. Because one or more of your apps uses this intent to track referrals, we wanted to ensure you make the switch before March 1, 2020. After this date, new versions of the Play Store app will no longer broadcast the install_referrer intent after app installs.
Thanks in advance
I encountered this bug when integrate the AppMetrica SDK into my app(a Chromium-base browser)
I just called YandexMetrica.activate() in my Application class and then this crash happened.
My browser run lots of process: main and render processes for each tab
I'm using AppMetrica version 5.0.1
Please help me with that.
at com.yandex.metrica.impl.ob.l3.g(SourceFile:4)
at com.yandex.metrica.impl.ob.l3.b(SourceFile:4)
at com.yandex.metrica.impl.ob.yg$k.run(SourceFile:34)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.os.UserManager.isUserUnlockingOrUnlocked(int)' on a null object reference
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:191)
at com.yandex.metrica.impl.ob.l3.g(SourceFile:1)
... 7 more
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.os.UserManager.isUserUnlockingOrUnlocked(int)' on a null object reference
at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:589)
at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:566)
at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:205)
at com.yandex.metrica.impl.ob.i.a(SourceFile:49)
at com.yandex.metrica.impl.ob.ue.a(SourceFile:1)
at com.yandex.metrica.impl.ob.ue.<init>(SourceFile:7)
at com.yandex.metrica.impl.ob.xe.<init>(SourceFile:1)
at com.yandex.metrica.impl.ob.Q1.a(SourceFile:1)
at com.yandex.metrica.impl.ob.n3.<init>(SourceFile:32)
at com.yandex.metrica.impl.ob.n3.<init>(SourceFile:13)
at com.yandex.metrica.impl.ob.n3.<init>(SourceFile:5)
at com.yandex.metrica.impl.ob.k3.a(SourceFile:19)
at com.yandex.metrica.impl.ob.l3.a(SourceFile:25)
at com.yandex.metrica.impl.ob.l3$a.call(SourceFile:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
Android O crashes with exception
Not allowed to start service Intent { act=com.yandex.metrica.configuration.ACTION_START pkg=chocolife.me (has extras) }: app is in background uid UidRecord{3aace4b u0a101 CEM idle procs:2 seq(0,0,0)}
To reproduce just enable StrictMode in Application onCreate():
https://gist.github.com/svareniem/6fbcc0ffcf7968ee122a#file-enablestrictmode-java
Reproduced constantly on version 2.30 and 2.32.
Exception StackTrace:
02-19 08:01:02.463 4111-4119/com.swipe.android:Metrica E/StrictMode: Finalizing a Cursor that has not been deactivated or closed. database = /data/user/0/com.swipe.android/databases/db_metrica_com.swipe.android, table = reports, query = SELECT * FROM reports WHERE session_id = 1455845592 AND session_type = 0 AND id <= (SELECT id FROM reports WHERE session_id = 1455845592 AND session_type = 0 ORDER BY id ASC LIMIT 0, 1)
android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
at android.database.sqlite.SQLiteCursor.<init>(SQLiteCursor.java:98)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:50)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1316)
at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1163)
at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1034)
at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1240)
at com.yandex.metrica.impl.ob.az.a(SourceFile:270)
at com.yandex.metrica.impl.ob.az.a(SourceFile:233)
at com.yandex.metrica.impl.ar.c(SourceFile:223)
at com.yandex.metrica.impl.ad.c(SourceFile:134)
at com.yandex.metrica.impl.ad$a.run(SourceFile:279)
at com.yandex.metrica.impl.ob.be.execute(SourceFile:10)
at com.yandex.metrica.impl.ad.run(SourceFile:81)```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.