damnedpie / godot-appodeal

Appodeal 3.3.3 SDK plugin for Godot Engine Android export.
MIT License
4 stars 0 forks source link

initialization error #3

Closed stromperton closed 1 year ago

stromperton commented 1 year ago

What does it mean?

I use GodotAppodeal.gd script, but on start my output says initialization finished with message: [com.appodeal.ads.initializing.ApdInitializationError$InternalError$SdkConfigurationError]

My .gdap file equals to readme without admob:

[config]

name="GodotAppodeal"
binary_type="local"
binary="GodotAppodeal.3.0.0.release.aar"

[dependencies]

remote=[
"com.appodeal.ads.sdk:core:3.0.0",
"com.appodeal.ads.sdk.networks:adcolony:3.0.0.2",
"com.appodeal.ads.sdk.networks:applovin:3.0.0.1",
"com.appodeal.ads.sdk.networks:bidmachine:3.0.0.2",
"com.appodeal.ads.sdk.networks:facebook:3.0.0.2",
"com.appodeal.ads.sdk.networks:ironsource:3.0.0.1",
"com.appodeal.ads.sdk.networks:my_target:3.0.0.2",
"com.appodeal.ads.sdk.networks:unity_ads:3.0.0.0",
"com.appodeal.ads.sdk.networks:vungle:3.0.0.2",
"com.appodeal.ads.sdk.networks:yandex:3.0.0.1",
"com.appodeal.ads.sdk.services:adjust:3.0.0.0",
"com.appodeal.ads.sdk.services:appsflyer:3.0.0.1",
"com.appodeal.ads.sdk.services:firebase:3.0.0.0",
"com.appodeal.ads.sdk.services:facebook_analytics:3.0.0.1",
]
custom_maven_repos=["https://artifactory.appodeal.com/appodeal"]
stromperton commented 1 year ago

My consent manager behavior is strange. There are no any windows of agree show up. (they are must be, how i understand) Is it root of problem, maybe?

printConsentStatus() shows

GodotAppodeal: consent -> ZONE = UNKNOWN
GodotAppodeal: consent -> US_PRIVACY = 
GodotAppodeal: consent -> STATUS = UNKNOWN
GodotAppodeal: consent -> IAB_CONSENT = 

even if i use this code before init:

updateGDPRUserConsent(ConsentType.NON_PERSONALIZED)
updateCCPAUserConsent(ConsentType.NON_PERSONALIZED)
damnedpie commented 1 year ago

I'm currently in research about ApdInitializationError callback, but you shouldn't be afraid of this message. Even though Appodeal throws this error, it works as intended and shows ads. Maybe it has something to do with it's current beta status.

I will push an update to at least make these callback messages more verbose when I have time for it. But if you don't want to wait, you can inspect what Appodeal throws into console via adb.

1) Set LogLevel to DEBUG or VERBOSE 2) In terminal, run adb shell 3) Run logcat | grep Appodeal

When doing adb shell logcat | grep Appodeal with DEBUG or VERBOSE log levels, you can see that Appodeal throws warnings about everything - for example, if you don't have some adapters like AdMob, it pushes warnings. Maybe this is where this ApdInitializationError comes from. Regardless, I experienced no issues with showing ads on my live games.

As per the consent status, it's interesting. Appodeal summons consent manager IF NECESSARY, meaning that for some regions (e.g. Europe) it will summon consent manager and for other (e.g. Russia) it won't. This can be easily tested if you use VPN and seems to depend on whether the given country has some specific data protection laws like GDPR or CCPA. Consent Manager gets summoned (if Appodeal SDK thinks it has to) when calling initialize() function and it's summon is directly handled by the Appodeal SDK, my plugin doesn't have anything to do with that.

Consent manager will NOT get summoned if you force-update consent statuses from code.

The other thing about Appodeal that I noticed is that it looks like if you get consent from user via Appodeal Consent Manager, this type of consent seems more trusted than a consent that you force-define via updateGDPRUserConsent and updateCCPAUserConsent. Seems like Appodeal Consent Manager generates some certificates and other stuff that we can't create and it probably has something to do with ads quality and eCPMs, hence you probably want to let Appodeal collect consent on their own (as opposed to collect it by your own).

damnedpie commented 1 year ago

UPD: the reason it throws ApdInitializationError$InternalError$SdkConfigurationError is because I was trying to stringify the object that is responsible for SDK initialization errors, but there was no method to stringify it. So basically plugin was throwing ApdInitializationError$InternalError$SdkConfigurationError even if the error object was null, which stands for the successful init according to the docs. I will update the plugin when I get to it, but this basically means that this initialization message is nothing to worry about.

stromperton commented 1 year ago

Interesting, but i recieve _load_failed errors 😢 I try to set up logcat for look deep

stromperton commented 1 year ago
10-18 17:56:09.955 21926 21926 D Appodeal: Banner [Cache]: isDebug: false, isLoaded: false, isLoading: false
10-18 17:56:09.960 21926 21926 D Appodeal: SDK [Dump]: Banner waterfall:
10-18 17:56:09.960 21926 21926 D Appodeal:   Ads:
10-18 17:56:09.960 21926 21926 D Appodeal:     Test ad (Mraid), eCPM: 0.00;
10-18 17:56:09.961  1276  1382 D ConnectivityService: get Network state from cache, cacheBlock is 0
10-18 17:56:09.964 21926 21926 D Appodeal: Banner [Load Failed]: ADAPTER NOT FOUND (8)
10-18 17:56:09.969 21926 21926 D Appodeal: Banner [Notify Load Failed]
10-18 17:56:09.976 21926 22203 I godot   : GodotAppodeal : banner_load_failed
damnedpie commented 1 year ago

These have nothing to do with the plugin, all happens under the hood of Appodeal SDK. It happens a lot due to how mediation waterfall works. If you want to know possible reasons for this, I'd suggest to read more about how ad mediation works.

In short, it doesn't fail to load ads because of some technical unavailability, but rather because no ads can be served from a given provider. Info to look up: "mediation waterfall", "fillrate" and "mediation bidding".

Also AFAIK SDK 3.0.0 always fails to load ads if in testing mode. Back in SDK 2.x.x it worked differently.

damnedpie commented 1 year ago

I have updated the way plugin handles SDK initialization callbacks so I close this.