distriqt / ANE-Adverts-Mediation

Mediation adapters for the Adverts ANE
https://airnativeextensions.com/extension/com.distriqt.Adverts
12 stars 0 forks source link

Crashes on xiaomi devices after ANE update #42

Closed SponsorAds closed 1 year ago

SponsorAds commented 2 years ago

We experience vast amount of crashes after updating to your newest ANE version (2022.03.08 [v6.3.0]). It seems to exclusively affect xiaomi (redmi) devices.

Looking at the descriptor, we are missing READ_EXTERNAL_STORAGE permission. Everything else is set up correctly.

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> * <<<

backtrace:
  #00  pc 000000000058f8d4  /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+208)
  #00  pc 0000000000130a14  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20)
  #00  pc 00000000003bd98c  /data/app/*-4XWiYC-gT10yJ088qoC3AA==/oat/arm64/base.vdex (com.facebook.ads.internal.dynamicloading.DynamicLoaderFactory.doCallInitialize+80)
  #00  pc 0000000000593ff8  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStaticRange+768)
  #00  pc 0000000000130c94  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static_range+20)
  #00  pc 00000000003bd924  /data/app/*-4XWiYC-gT10yJ088qoC3AA==/oat/arm64/base.vdex (com.facebook.ads.internal.dynamicloading.DynamicLoaderFactory.access$200)
  #00  pc 0000000000593ff8  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStaticRange+768)
  #00  pc 0000000000130c94  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static_range+20)
  #00  pc 00000000003bd0f8  /data/app/*-4XWiYC-gT10yJ088qoC3AA==/oat/arm64/base.vdex (com.facebook.ads.internal.dynamicloading.DynamicLoaderFactory$1.run+136)
  #00  pc 00000000002ae388  /apex/com.android.runtime/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.5451048858579704465)+240)
  #00  pc 000000000057fbc8  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1024)
  #00  pc 000000000013f468  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88)
  #00  pc 00000000004afdc8  /system/framework/arm64/boot.oat (java.lang.Thread.run+72)
  #00  pc 0000000000136334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)
  #00  pc 0000000000145060  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244)
  #00  pc 00000000004a1844  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #00  pc 00000000004a28ec  /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416)
  #00  pc 00000000004e1bd0  /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1332)
  #00  pc 00000000000e2ce8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #00  pc 0000000000084dac  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> * <<<

backtrace:
  #00  pc 00000000004e0ce8  /apex/com.android.runtime/lib64/libart.so (art::CodeInfo::CodeInfo(art::OatQuickMethodHeader const*, art::CodeInfo::DecodeFlags))
  #00  pc 000000000045d14c  /apex/com.android.runtime/lib64/libart.so (art::OatQuickMethodHeader::ToDexPc(art::ArtMethod*, unsigned long, bool) const+84)
  #00  pc 00000000001f031c  /apex/com.android.runtime/lib64/libart.so (art::FaultManager::IsInGeneratedCode(siginfo*, void*, bool)+920)
  #00  pc 00000000001efc60  /apex/com.android.runtime/lib64/libart.so (art::FaultManager::HandleFault(int, siginfo*, void*)+92)
  #00  pc 0000000000004ecc  /system/bin/app_process64 (art::SignalChain::Handler(int, siginfo*, void*)+584)
  #00  pc 000000000000063c  [vdso] (__kernel_rt_sigreturn)
  #00  pc 00000000005a2418  /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+200)
  #00  pc 0000000000131a14  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20)
  #00  pc 00000000003bd98c  /data/app/*-R1vl4eKyOa1y3VS1TjmIRg==/oat/arm64/base.vdex (com.facebook.ads.internal.dynamicloading.DynamicLoaderFactory.doCallInitialize+80)
  #00  pc 00000000005a6ad4  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStaticRange+780)
  #00  pc 0000000000131c94  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static_range+20)
  #00  pc 00000000003bd924  /data/app/*-R1vl4eKyOa1y3VS1TjmIRg==/oat/arm64/base.vdex (com.facebook.ads.internal.dynamicloading.DynamicLoaderFactory.access$200)
  #00  pc 00000000005a6ad4  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStaticRange+780)
  #00  pc 0000000000131c94  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static_range+20)
  #00  pc 00000000003bd0f8  /data/app/*-R1vl4eKyOa1y3VS1TjmIRg==/oat/arm64/base.vdex (com.facebook.ads.internal.dynamicloading.DynamicLoaderFactory$1.run+136)
  #00  pc 00000000002b4ae4  /apex/com.android.runtime/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.17460956533834400288)+240)
  #00  pc 00000000005924d4  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032)
  #00  pc 0000000000140468  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88)
  #00  pc 00000000004afbb8  /system/framework/arm64/boot.oat (java.lang.Thread.run+72)
  #00  pc 0000000000137334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)
  #00  pc 0000000000145fec  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244)
  #00  pc 00000000004b0ed8  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #00  pc 00000000004b1fec  /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416)
  #00  pc 00000000004f29a8  /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176)
  #00  pc 00000000000d6cb0  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #00  pc 0000000000074eac  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
marchbold commented 2 years ago

Can you check you have the latest audience_network.dex file in your application? This was updated with the last release as well.

SponsorAds commented 2 years ago

Yes, I always point directly to the extracted folder instead of moving assets around.

I also did not add the following provider, maybe that could explain it (we don't have devices to test it):

<provider
    android:name="androidx.startup.InitializationProvider"
    android:authorities="*.androidx-startup"
    android:exported="false" >
    <meta-data
        android:name="androidx.work.WorkManagerInitializer"
        android:value="androidx.startup" />
    <meta-data
        android:name="androidx.lifecycle.ProcessLifecycleInitializer"
        android:value="androidx.startup" />
</provider>

This provider seems to cause crashes on older ANE versions though, that's why it's not added right now.

marchbold commented 2 years ago

Yes it will crash on older versions. The manifest additions must match the versions of the extensions you are using, you can't mix and match them.

SponsorAds commented 2 years ago

That is obvious and not the issue (it is a big issue for anyone wanting to downgrade and missing older docs).

Do you believe that missing provider would cause these crashes on just one device manufacturer? We obviously can't yolo it and hope for the best.

Such incredibly important breaking changes should be mentioned in change logs. Oftentimes in the past your docs were not up to date, so they're simply no guarantee in the first place. Simply updating sdk numbers or compatibility (according to change logs) should not require going through the entire setup process unless important changes are mentioned.

marchbold commented 2 years ago

We put a lot of work into the extensions so it's always disappointing to hear feedback like this. We are moving towards using apm solely as our distribution means as manually managing manifests is something no one should have to do. And we do not advise anyone use old versions of the extensions, in the mobile world this is generally not feasible as the ecosystem is changing so fast.

From what I can tell from the log I would suggest you double check you are using the latest facebook mediator and audience_network.dex. There were some last minute fixes pushed out that may help here. It is more likely that than a missing provider. Missing the provider would more likely cause things to function incorrectly than cause a crash loading dynamic classes.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 5 days with no activity.