DrMoriarty / godot-applovin-max

AppLovinMax plugin for godot engine.
27 stars 7 forks source link

Unable to initialize the plugin #1

Closed hirsimaki-markus closed 3 years ago

hirsimaki-markus commented 3 years ago

I'm unable to initialize the plugin on PC or Android as both result in the below error.

E 0:00:00.453   initialize: No library set for this platform
  <C++ Source>  modules/gdnative/gdnative.cpp:290 @ initialize()

Steps I have taken so far:

I'm happy to provide more accurate steps/info if needed.

DrMoriarty commented 3 years ago

What problem do you have? Does your exported project has errors during compilation? Does it crash in run time? Also it is useful to show the application logs (use logcat or AndroidStudio debugger)

hirsimaki-markus commented 3 years ago

What problem do you have? Does your exported project has errors during compilation? Does it crash in run time? Also it is useful to show the application logs (use logcat or AndroidStudio debugger)

The problem is that the applovin_max node does not initialize correctly. applovin_max.isInited() returns false. This in turn prevents me from loading a banner advertisement and showing it. I could also use some advise on how to more specifically use loadBanner(id: String, isTop: bool, callback_id: int) and showBanner(id: String) so I can actually try loading the banner is I have not done it yet.

The game compiles normally and does not crash at runtime. I have not used logcat or AndroidStudio debugger but I checked the logfiles left behind by the game on the phone (more specifically I added overlay that constantly shows the latest output of logfile on Android).

On the phone I'm getting nearly the same error. I assume the logfiles do not differ from logcat output?

**ERROR**: No library set for this platform
  At: modules/gdnative/gdnative.cpp:290:initialized() - No library set for this platform
hirsimaki-markus commented 3 years ago

What problem do you have? Does your exported project has errors during compilation? Does it crash in run time? Also it is useful to show the application logs (use logcat or AndroidStudio debugger)

**ERROR**: No library set for this platform
  At: modules/gdnative/gdnative.cpp:290:initialized() - No library set for this platform

... ... ...

I Further narrowed down the problem. Toggling the enabled/disabled seen here causes the error to appear and disappear.

image

DrMoriarty commented 3 years ago

Show me the full log of your application. This message (No library set for this platform) is not a problem.

hirsimaki-markus commented 3 years ago

Show me the full log of your application. This message (No library set for this platform) is not a problem.

What is the correct way for getting the full log you are looking for? Is there some verbose mode I need to turn on for the logging?

DrMoriarty commented 3 years ago

No. I only interested in godot's system logs when it initialized native plugins and may be showed some errors. Use logcat of AndroidStudio debugger for it.

hirsimaki-markus commented 3 years ago

No. I only interested in godot's system logs when it initialized native plugins and may be showed some errors. Use logcat of AndroidStudio debugger for it.

I got logcat output. Steps taken:

The resulting file is here

https://drive.google.com/file/d/1nMr5ExwrTT8xmaoOn0_bvwiG9A9heyNM/view?usp=sharing

The id of the application is com.vivuta.betweenbeats and name is Between Beats - Color Dash

If I can somehow help filter the logfile please inform me on how

DrMoriarty commented 3 years ago

Your plugin was initialized successfully. You can see sdk status and all networks status:

03-12 11:04:17.746 27500 27500 I ru.mobilap.applovinmax.AppLovinMax: ApplovinMAX initialized
03-12 11:04:17.747 27500 27500 I ru.mobilap.applovinmax.AppLovinMax: GDPR applies
03-12 11:04:17.750 27500 27558 D AppLovinSdk: [AppLovinSdk] 
03-12 11:04:17.750 27500 27558 D AppLovinSdk: ========================================
03-12 11:04:17.750 27500 27558 D AppLovinSdk: AppLovin SDK
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Version: 9.14.6
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Plugin Version: 
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Ad Review Version: 
03-12 11:04:17.750 27500 27558 D AppLovinSdk: OS: Q 29
03-12 11:04:17.750 27500 27558 D AppLovinSdk: GAID: <Enable verbose logging to see the GAID to use for test devices - https://monetization-support.applovin.com/hc/en-us/articles/236114328-How-can-I-expose-verbose-logging-for-the-SDK>
03-12 11:04:17.750 27500 27558 D AppLovinSdk: SDK Key: pVVMhhgNBoAsnE0uvvud95a8cVCoeQoQPdJkmkNHiEo2M-7W1ESaFGA8i-Hz6TxEVZP7XIeR3TT0MKrBIRXgIG
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Model: Pixel
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Locale: en_US
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Emulator: false
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Application ID: com.vivuta.betweenbeats
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Test Mode On: false
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Verbose Logging On: false
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Mediation Provider: max
03-12 11:04:17.750 27500 27558 D AppLovinSdk: TG: 71
03-12 11:04:17.750 27500 27558 D AppLovinSdk: ===Privacy States===
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Please review AppLovin MAX documentation to be compliant with regional privacy policies.
03-12 11:04:17.750 27500 27558 D AppLovinSdk: 
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Age Restricted User - false
03-12 11:04:17.750 27500 27558 D AppLovinSdk: Has User Consent - No value set
03-12 11:04:17.750 27500 27558 D AppLovinSdk: "Do Not Sell" - false
03-12 11:04:17.750 27500 27558 D AppLovinSdk: ========================================
03-12 11:04:18.025   956  1108 I system_server: Explicit concurrent copying GC freed 342816(16MB) AllocSpace objects, 38(1748KB) LOS objects, 42% free, 31MB/54MB, paused 405us total 494.921ms
03-12 11:04:18.233 27500 27570 D AppLovinSdk: [MediationDebuggerService]  
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ================== APP INFO ==================
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Dev Build - true
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Test Mode - disabled
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ================== MAX ==================
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK Version - 9.14.6
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Plugin Version - None
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Ad Review Version - Disabled
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ================== PRIVACY ==================
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Age Restricted User - false
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Has User Consent - No value set
03-12 11:04:18.233 27500 27570 D AppLovinSdk: "Do Not Sell" - false
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ================== NETWORKS ==================
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ ADCOLONY_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ AMAZON_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ APPLOVIN_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - COMPLETE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - 9.14.6
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - 9.14.6
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ CHARTBOOST_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: * MISSING com.google.android.gms:play-services-base: Please add "com.google.android.gms:play-services-base:x.y.z" to the dependencies block of your build.gradle
03-12 11:04:18.233 27500 27570 D AppLovinSdk: [MediationDebuggerService]  
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ FACEBOOK_MEDIATE ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ FYBER_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ GOOGLE_AD_MANAGER_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ ADMOB_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ HYPRMX_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ INMOBI_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ IRONSOURCE_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ LINE_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: [MediationDebuggerService]  
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ MAIO_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ MINTEGRAL_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ MOPUB_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ MYTARGET_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ NEND_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ OGURY_PRESAGE_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ TIKTOK_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ SMAATO_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: [MediationDebuggerService]  
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ SNAP_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ TAPJOY_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ UNITY_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ VERIZON_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ VUNGLE_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ------------------ YANDEX_NETWORK ------------------
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Status  - MISSING
03-12 11:04:18.233 27500 27570 D AppLovinSdk: SDK     - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: Adapter - UNAVAILABLE
03-12 11:04:18.233 27500 27570 D AppLovinSdk: ================== END ==================

Now show me your gd code. What you do and what you get.

hirsimaki-markus commented 3 years ago

Now show me your gd code. What you do and what you get.

There is not much gdscript to show relating to the plugin yet. The application itself is quite large (https://www.youtube.com/watch?v=iXEZifi_uUQ).

I tried to replicate the problem from yesterday by showing that applovin_max.isInited() would return false. However, it works now. Since the start of this issue I have reinstalled the plugin and rebooted my PC but nothing else should have changed.

But I'm unable tor replicate the problem now.

Is there any documentation available on how to use the rest of the functions, such as showBanner(id: String) ? Or what to use the callbacks for. Any information would help so that I could confirm that it works as intended now.

I have already registered applovin max account and added my SDK key as well as connected AdColony to applovin. Do I now need to copy some sort of key/token for AdUnit to actually display the banner?

DrMoriarty commented 3 years ago

The SDK can return to you isInited = false if you created the project a little time ago (for me it took usually several hours when I would be available to use SDK). What about banners, using it very simple:

1) call loadBanner(zoneid, top, callback_object.get_instance_id())
2) wait until it called callback_object._on_banner_loaded(zone_id) or callback_object._on_banner_failed_to_load(zoneid)
3) if previous step was ok, run showBanner(zoneid)
hirsimaki-markus commented 3 years ago

The SDK can return to you isInited = false if you created the project a little time ago (for me it took usually several hours when I would be available to use SDK). What about banners, using it very simple:

1) call loadBanner(zoneid, top, callback_object.get_instance_id())
2) wait until it called callback_object._on_banner_loaded(zone_id) or callback_object._on_banner_failed_to_load(zoneid)
3) if previous step was ok, run showBanner(zoneid)

I managed to get these steps almost working. This information could maybe be added to the readme as without it I would have not known how to use the plugin.

Unfortunately I got my_object._on_banner_failed_to_load(zoneid) instead of my_object._on_banner_loaded(zoneid) with the error 204. Do you know what are common causes for this error? I am using a zone id I got from applovin max site but I also have max ad-unit ID for banner ads. Do I instead use the unit ID?

Additionally the readme shows both

_on_banner_failed_to_load(id: String)

_on_banner_failed_to_load(id: String, error: String)

But gdscript can only have one function with same name. Is this intended? (I defined _on_banner_failed_to_load(id: String, error: String))




Edit: I got the banner working by using Ad unit ID instead as seen here

image

Should I add pull request for improving the readme?

DrMoriarty commented 3 years ago

Yes. I would be nice if you fixed errors in README which you found. I will merge the PR.

hirsimaki-markus commented 3 years ago

Yes. I would be nice if you fixed errors in README which you found. I will merge the PR.

I will add PR for a simple explanation. What about the duplicate below?

# is this intended? so you can choose if you want the error string? or is there duplicate by accident
_on_banner_failed_to_load(id: String)

_on_banner_failed_to_load(id: String, error: String)
DrMoriarty commented 3 years ago

The right one is _on_banner_failed_to_load(id: String, error: String)

hirsimaki-markus commented 3 years ago

I have not yet updated to readme as I have yet to deploy the game I'm working on.

It seems that calling applovin_max.loadBanner once will result multiple calls to _on_banner_loaded

Is this intended? Basically my question is: should i only have to call loadBanner once per session, or should I manually call for new banner every now and then?

DrMoriarty commented 3 years ago

It automatically performs banner rotation after some time. See https://dash.applovin.com/documentation/mediation/android/getting-started/banners functions stopAutoRefresh and startAutoRefresh. Plugin starts autorefresh for every shown banner.

hirsimaki-markus commented 3 years ago

It automatically performs banner rotation after some time. See https://dash.applovin.com/documentation/mediation/android/getting-started/banners functions stopAutoRefresh and startAutoRefresh. Plugin starts autorefresh for every shown banner.

Thank you for this. Are rewarded video ads also automatically refreshed?

The functions stopAutoRefresh and startAutoRefresh do not appear in the documentation. Are they something I should be able to use? Do they only affect banners?

Also is there any difference between using showBanner(id: String) vs hideBanner(id: String)?

DrMoriarty commented 3 years ago

yes, it affects only on banners and it uses automatically so in plugin API no control for it. showBanner will show preloaded banner, hideBanner will hide it but don't release it's resources so you can call showBanner on it. removeBanner will hide banner if it's shown and release all it's resources. Banner id became invalid and you should load it again before showing.

hirsimaki-markus commented 3 years ago

Huge thanks for your responses.

How can I know if rewarded video is available? If i use loadRewardedVideo and then show a video it will work. If i do it immediately again it will not work. How do I check if rewarded video is actually available for viewing?

DrMoriarty commented 3 years ago

Rewarded videos and interstitials only can be shown once. If you show your ad then you should again load it and wait until is_loaded callback will be fired. And after it you could show it one more time.

hirsimaki-markus commented 3 years ago

closing