distriqt / ANE-Adverts-Mediation

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

Unity Ads initialization failed #40

Closed everseen83 closed 2 years ago

everseen83 commented 2 years ago

Hello, again. Sorry to bother you.😅

This error seems to have occurred 1-2 months ago. From that point on, the number of impressions of Unity ads started to decrease, and now it is 0.

Please check the error below.

Environment

Advert : 13.5.0, 13.4.0 Advert Mediation : 4.0.0

Logs
-Adobe Scout
Advert ::  initialised
Advert ::  adapter: com.google.android.gms.ads.MobileAds : READY [3798] - 
Advert ::  adapter: com.google.ads.mediation.facebook.FacebookMediationAdapter : READY [207] - 
Advert ::  adapter: com.google.ads.mediation.unity.UnityMediationAdapter : NOT_READY [2579] - {
  "Code": 301,
  "Message": "Unity Ads initialization failed: [INTERNAL_ERROR] Unity Ads SDK fail to initialize due to internal error",
  "Domain": "com.unity3d.ads",
  "Cause": "null"
}
-Android Logcat
03-22 07:49:25.861  2309  2472 E Unity   : Failed to load 'libmain.so', the application will terminate.
03-22 07:49:25.862  2309  2472 E UnityAds: com.unity3d.services.core.webview.bridge.Invocation.nextInvocation() (line:55) :: Error handling invocation com.unity3d.services.core.api.ClassDetection.areClassesPresent([["com.unity3d.player.UnityPlayer"]]): null: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/air.net.ideasam.games.cat-meKrs0XmB7dsm0yN9fWBxg==/base.apk"],nativeLibraryDirectories=[/data/app/air.net.ideasam.games.cat-meKrs0XmB7dsm0yN9fWBxg==/lib/arm, /data/app/air.net.ideasam.games.cat-meKrs0XmB7dsm0yN9fWBxg==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]] couldn't find "libmain.so"
03-22 07:49:25.878  3646  4487 W StorageManager: getStorageLowBytes lowPercent : 5, lowBytes : 1340041625, maxLowBytes : 524288000
03-22 07:49:25.896  2309  2461 E UnityAds: com.unity3d.services.core.configuration.InitializeThread$InitializeStateCreate.execute() (line:456) :: Unity Ads SDK fail to initialize due to internal error
03-22 07:49:25.896  2309  2472 E UnityAds: com.unity3d.services.core.api.Sdk.logError() (line:73) :: Initialization error: Unity Ads SDK fail to initialize due to internal error
03-22 07:49:25.896  2309  2461 E UnityAds: com.unity3d.services.core.configuration.InitializeThread$InitializeStateError.execute() (line:495) :: Unity Ads init: halting init in create webapp: Unity Ads SDK fail to initialize due to internal error
03-22 07:49:25.897  2309  2461 E UnityAds: com.unity3d.services.core.configuration.InitializationNotificationCenter.triggerOnSdkInitializationFailed() (line:62) :: SDK Failed to Initialize due to Unity Ads SDK fail to initialize due to internal error
03-22 07:49:25.905  2309  2494 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
03-22 07:49:25.905  2309  2494 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
03-22 07:49:25.909  3326  3604 D DnsProxyListener: DNSDBG::dns addrinfo af 2
03-22 07:49:25.913  2309  2309 D UnityMediationAdapter: {
03-22 07:49:25.913  2309  2309 D UnityMediationAdapter:   "Code": 301,
03-22 07:49:25.913  2309  2309 D UnityMediationAdapter:   "Message": "Unity Ads initialization failed: [INTERNAL_ERROR] Unity Ads SDK fail to initialize due to internal error",
03-22 07:49:25.913  2309  2309 D UnityMediationAdapter:   "Domain": "com.unity3d.ads",
03-22 07:49:25.913  2309  2309 D UnityMediationAdapter:   "Cause": "null"
03-22 07:49:25.913  2309  2309 D UnityMediationAdapter: }
marchbold commented 2 years ago

Can you just confirm you tried using v13.5.0 with the v4.0.0 adapter and the log above is from that combination?

4.0.0 will not work with 13.4.0.

everseen83 commented 2 years ago

The error also occurs in a combination of version 13.4.0 and version less than 4.0.0.

However, updating to the latest ane seems to have fixed the error, but I'm not sure yet. I'll test it more and report back.

Thanks:)

marchbold commented 2 years ago

Yes the mediators are tied to a version of the main extension, mixing them will fail.

Let me know if you do experience the error with the latest releases though.

mwelk commented 2 years ago

I get a similar error:

2022-07-13 11:53:58.810 30194-30496/? E/Unity: Failed to load 'libmain.so', the application will terminate.
2022-07-13 11:53:58.811 30194-30496/? E/UnityAds: com.unity3d.services.core.webview.bridge.Invocation.nextInvocation() (line:55) :: Error handling invocation com.unity3d.services.core.api.ClassDetection.areClassesPresent([["com.unity3d.player.UnityPlayer"]]): null: dlopen failed: library "libmain.so" not found
2022-07-13 11:53:58.843 30194-30496/? E/UnityAds: com.unity3d.services.core.api.Sdk.logError() (line:72) :: Initialization error: Unity Ads SDK fail to initialize due to internal error
2022-07-13 11:53:58.843 30194-30528/? E/UnityAds: com.unity3d.services.core.configuration.InitializeThread$InitializeStateCreate.execute() (line:456) :: Unity Ads SDK fail to initialize due to internal error
2022-07-13 11:53:58.843 30194-30528/? E/UnityAds: com.unity3d.services.core.configuration.InitializeThread$InitializeStateError.execute() (line:495) :: Unity Ads init: halting init in create webapp: Unity Ads SDK fail to initialize due to internal error
2022-07-13 11:53:58.843 30194-30528/? E/UnityAds: com.unity3d.services.core.configuration.InitializationNotificationCenter.triggerOnSdkInitializationFailed() (line:62) :: SDK Failed to Initialize due to Unity Ads SDK fail to initialize due to internal error
2022-07-13 11:53:58.845 30194-30194/? D/UnityMediationAdapter: {
      "Code": 301,
      "Message": "Unity Ads initialization failed: [INTERNAL_ERROR] Unity Ads SDK fail to initialize due to internal error",
      "Domain": "com.unity3d.ads",
      "Cause": "null"
    }
2022-07-13 11:53:58.883 30194-30496/? W/UnityAds: com.unity3d.services.core.api.Sdk.logWarning() (line:78) :: {"message":"model: DeviceInfo key: openAdvertisingTrackingId with value: null: null is not in: string,undefined","name":"CheckValueError"}

ANE's managed by apm:

apm list
├──com.distriqt.playservices.Auth@20.1.1
├──com.distriqt.NativeWebView@5.3.11
├──com.distriqt.Application@6.9.2
├──com.distriqt.Dialog@8.6.11
├──com.distriqt.AppleSignIn@2.2.94
├──com.distriqt.Firebase@7.2.1
├──com.distriqt.admob.TapJoy@12.10.0
├──com.distriqt.IDFA@5.1.0
├──com.distriqt.NetworkInfo@4.0.12
├──com.distriqt.admob.IronSource@7.2.2
├──com.distriqt.firebase.Auth@7.2.1
├──com.distriqt.Adverts@13.7.0
├──com.distriqt.firebase.DynamicLinks@7.2.1
├──com.distriqt.admob.FacebookAudience@6.11.0
├──com.distriqt.Share@7.1.3
├──com.distriqt.firebase.Crashlytics@7.2.1
├──com.distriqt.facebook.Login@10.2.0
├──com.distriqt.Notifications@6.3.1
├──com.distriqt.firebase.Performance@7.2.1
├──com.distriqt.admob.AdColony@4.8.0
├──com.distriqt.GoogleIdentity@5.3.1
├──com.distriqt.InAppBilling@13.2.4
├──com.distriqt.ApplicationRater@6.1.3
├──com.distriqt.admob.AppLovin@11.4.3
├──com.distriqt.admob.UnityAds@4.2.1
├──com.distriqt.playservices.Identity@18.0.101
├──com.distriqt.PushNotifications-FCM@11.1.1
├──com.distriqt.Memory@4.0.11
└──com.distriqt.RestartApp@3.0.14

AIR: 33.1.1.889 Android: 13

marchbold commented 2 years ago

Can you create a new issue with your details.

mwelk commented 2 years ago

Sorry, it turned out that our build was still using some "old" mediation packages even we added the apm managed dependencies.

It's working fine now!