googleads / googleads-mobile-flutter

A Flutter plugin for the Google Mobile Ads SDK
Apache License 2.0
344 stars 285 forks source link

Adcolony mediation not working #484

Closed gametathya closed 1 year ago

gametathya commented 2 years ago

Plugin Version

  google_mobile_ads: 0.13.4

 implementation 'com.adcolony:sdk:4.6.3'
 implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
 implementation 'com.google.ads.mediation:adcolony:4.6.0.0'

Steps to Reproduce

add all above dependencies and init the app with moblie ads

  1. Run flutter create bug.
  2. Update the files as follows: ...
  3. ...

Expected results: Adcolony ads working Actual results: W/AdColonyMediationAdapter( 9559): Unexpected SDK version format: . Returning 0.0.0 for SDK version.

Logs ``` ``` ``` ``` ``` ```
maheshj01 commented 2 years ago

Hi @gametathya, Thanks for filing the issue. You are using an older version of ads plugin could you please try upgrading to the latest plugin google_mobile_ads: ^1.0.1 and see if the issue persists? Additionally please refer this docs IOS: https://developers.google.com/admob/ios/mediation/adcolony Android: https://developers.google.com/admob/android/mediation/adcolony Thank you.

gametathya commented 2 years ago

W/AdColonyMediationAdapter(23265): Unexpected SDK version format: . Returning 0.0.0 for SDK version. Still same issue

implementation 'com.adcolony:sdk:4.6.3'
     //implementation 'com.google.android.gms:play-services-ads-identifier:15.0.0'
     implementation 'com.google.ads.mediation:adcolony:4.6.0.0'
     implementation 'com.google.ads.mediation:tapjoy:12.8.1.0'

 also tapjoy have conflict with this plugin
 com.tapjoy:tapjoy-android-sdk:12.8.1 -> com.google.android.gms:play-services-ads-identifier@[15.0.0,
   17.0.0], but play-services-ads-identifier version was 17.0.0.
  -- Project 'app' depends on project 'google_mobile_ads' which depends onto com.google.android.gms:play-services-ads@20.4
  .0

updated plugin version: google_mobile_ads: ^1.0.1

maheshj01 commented 2 years ago

Thanks for the info @gametathya, Could you please share the steps to reproduce the issue?

gametathya commented 2 years ago

to reproduce just add these dependencies

implementation 'com.adcolony:sdk:4.6.3'
implementation 'com.google.ads.mediation:adcolony:4.6.0.0'

and call

MobileAds.instance
   .updateRequestConfiguration(RequestConfiguration(
       tagForChildDirectedTreatment: TagForChildDirectedTreatment.unspecified))
            .then((value) {});
      });

before

runApp(MyApp());

maheshj01 commented 2 years ago

@gametathya, ~I am hitting a missing plugin exception~ I am not able to reproduce the issue, the app just built fine and there were no conflict error based on your reproducible steps. Would it be possible for you to share a minimal reproducible project?

Launching lib/main.dart on Redmi K20 Pro in debug mode...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
W/FlutterActivityAndFragmentDelegate( 9795): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
Connecting to VM Service at ws://127.0.0.1:63997/Cx1rRJDYSV8=/ws
I/DynamiteModule( 9795): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:214106404
I/DynamiteModule( 9795): Selected remote version of com.google.android.gms.ads.dynamite, version >= 214106404
D/DynamitePackage( 9795): Instantiated singleton DynamitePackage.
D/DynamitePackage( 9795): Instantiating com.google.android.gms.ads.ChimeraMobileAdsSettingManagerCreatorImpl
I/Ads     ( 9795): Updating ad debug logging enablement.
W/ConnectionStatusConfig( 9795): Dynamic lookup for intent failed for action: com.google.android.gms.leibniz.events.service.START
W/GmsClient( 9795): unable to connect to service: com.google.android.gms.leibniz.events.service.START on com.google.android.gms
W/AdColonyMediationAdapter( 9795): Unexpected SDK version format: . Returning 0.0.0 for SDK version.
I/WebViewFactory( 9795): Loading com.google.android.webview version 97.0.4692.70 (code 469207033)
W/ple.ads_exampl( 9795): Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (greylist, reflection, allowed)
W/ple.ads_exampl( 9795): Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (greylist, reflection, allowed)
W/ple.ads_exampl( 9795): Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (greylist, reflection, allowed)
W/ple.ads_exampl( 9795): Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (greylist, reflection, allowed)
W/ple.ads_exampl( 9795): Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (greylist, reflection, allowed)
I/cr_WVCFactoryProvider( 9795): Loaded version=97.0.4692.70 minSdkVersion=29 isBundle=true multiprocess=true packageId=2
I/cr_LibraryLoader( 9795): Successfully loaded native library
I/cr_CachingUmaRecorder( 9795): Flushed 9 samples from 9 histograms.
D/EgretLoader( 9795): EgretLoader(Context context)
D/EgretLoader( 9795): The context is not activity
W/ple.ads_exampl( 9795): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (greylist, reflection, allowed)
W/cr_media( 9795): Requires BLUETOOTH permission
E/chromium( 9795): [ERROR:simple_index_file_posix.cc(36)] opendir /data/user/0/com.example.ads_example/cache/WebView/Default/HTTP Cache/Code Cache/js: No such file or directory (2)
E/chromium( 9795): [ERROR:simple_index_file.cc(575)] Could not reconstruct index from disk
W/Ads     ( 9795): Update ad debug logging enablement as false
I/AdColony [INFO]( 9795): Configuring AdColony
D/DynamitePackage( 9795): Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
I/Ads     ( 9795): Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("7533D24B76F3D928E20EB84A8C420B39")) to get test ads on this device.
E/libc    ( 9795): Access denied finding property "ro.vendor.df.effect.conflict"
E/libc    ( 9795): Access denied finding property "ro.vendor.knock.type"
I/AudioManager( 9795): In isSpeakerphoneOn(), calling application: com.example.ads_example
W/AdWorker(Defaul( 9795): type=1400 audit(0.0:610250): avc: denied { read } for name="u:object_r:vendor_displayfeature_prop:s0" dev="tmpfs" ino=28867 scontext=u:r:untrusted_app:s0:c85,c256,c512,c768 tcontext=u:object_r:vendor_displayfeature_prop:s0 tclass=file permissive=0 app=com.example.ads_example
W/AdWorker(Defaul( 9795): type=1400 audit(0.0:610251): avc: granted { execute } for path="/data/data/com.example.ads_example/app_pccache/5/C9C1FFB0959089CD413CEC264F37E832D63E8ACA/pcam.jar" dev="sda31" ino=4201856 scontext=u:r:untrusted_app:s0:c85,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c85,c256,c512,c768 tclass=file app=com.example.ads_example
W/Ads     ( 9795): Not retrying to fetch app settings
I/ple.ads_exampl( 9795): ProcessProfilingInfo new_methods=1937 is saved saved_to_disk=1 resolve_classes_delay=8000
D/EgretLoader( 9795): EgretLoader(Context context)
D/EgretLoader( 9795): The context is not activity
D/EgretLoader( 9795): EgretLoader(Context context)
D/EgretLoader( 9795): The context is not activity
D/EgretLoader( 9795): EgretLoader(Context context)
D/EgretLoader( 9795): The context is not activity
I/DynamiteModule( 9795): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:214106404
I/DynamiteModule( 9795): Selected remote version of com.google.android.gms.ads.dynamite, version >= 214106404
I/flutter ( 9795): BannerAd loaded.
gametathya commented 2 years ago

Hi @maheshmnj in your output look at the your logs

W/AdColonyMediationAdapter( 9795): Unexpected SDK version format: . Returning 0.0.0 for SDK version.

this is main problem you have already reproduced the issue. As per my opinion plugin is calling adcolony adapter before it being initialized

maheshj01 commented 2 years ago

@gametathya, Ah I see thanks, This is reproducible

W/AdColonyMediationAdapter( 9795): Unexpected SDK version format: . Returning 0.0.0 for SDK version.

gametathya commented 2 years ago

Hi @maheshmnj our revenue is suffering from this. Can you please provide us any timeframe for this update .

maheshj01 commented 2 years ago

@gametathya unfortunately we cannot provide you with any eta on any of the issues.

chaudharydeepanshu commented 2 years ago

Facing this same issue.

I/flutter ( 7076): Adapter status for com.google.android.gms.ads.MobileAds: 
I/flutter ( 7076): Adapter status for com.google.ads.mediation.facebook.FacebookMediationAdapter: 
I/Ads     ( 7076): This request is sent from a test device.
W/AdColonyMediationAdapter( 7076): Unexpected SDK version format: . Returning 0.0.0 for SDK version.
W/AdColonyMediationAdapter( 7076): Unexpected SDK version format: . Returning 0.0.0 for SDK version.

Previously, simlilar issue (closed) was found when using googleads-mobile-android-mediation. They found it was due to this reason:

We found a Google Mobile Ads SDK bug where it's calling getSDKVersion() prior to initializing the AdColony adapter. This will be fixed in a future Google Mobile Ads SDK release, but in the meantime this will just be a benign warning log.

gametathya commented 2 years ago

hi @maheshmnj any updates on this bug

maheshj01 commented 2 years ago

@gametathya no updates so far. If there are any future updates you will see them here on this issue thread and also get notified via email.

3eif commented 2 years ago

I am also experiencing the same issue

jjliu15 commented 2 years ago

The warning message happens because the SDK is trying to get the adapter version before the AdColony SDK is configured: code ptr.

The fix needs to be made in the SDK as opposed to the plugin. However this warning is benign and can be ignored in the meantime. The AdColony mediation adapter configures the AdColony SDK when requesting an ad, and I confirmed I'm still able to load test ads from AdColony.

gametathya commented 2 years ago

Hello Sir we know you replied and ignored this threat on another same issue I can also find and attach that thread. So please dont close it just by saying that it will work fine because it willl not as test ads load only first time after that even second time it will not load, On native android development adcolony adapters are working fine only on your plugin it is not working Please review it and resolve (or either give us a work around like versions you are using we will tell you results )because companies are depending on your work.

jjliu15 commented 2 years ago

Could you share the full logs? And also the ad load error if there is one?

In my build.gradle I just included

implementation 'com.google.ads.mediation:adcolony:4.7.0.0'
raymond9991 commented 2 years ago

I encounter similar error, I'm using: google_mobile_ads: ^1.2.0

and in dependencies I'm using: implementation 'com.google.ads.mediation:adcolony:4.7.1.0'

and I got the following error: AdColony SDK returned a failure callback "Code": 100, "Message": "AdColony SDK returned a failure callback."

I tried to add: implementation 'com.google.android.gms:play-services-ads:20.6.0' and it's not working either, same error message.

I could show test ads but cannot show real ads, which is kind of weird, any pointers?

jjliu15 commented 2 years ago

It looks like this error happens when AdColony fails to fill the request:

Could you also attach the full logs? Is any additional information getting logged from AdColony?

raymond9991 commented 2 years ago

full log.txt Hi! Here is the full log from my physical device.

A little background: Admob limited my ad serving amount so I was trying to add mediation, don't know if it's relevant to the problem. Thanks!

GauravCreed commented 2 years ago

Hi @gametathya

I am also facing same error in android also. I am add only AdColony mediation library in my app, found any solution ?

Thanks(_)

jjliu15 commented 2 years ago

Hi, unfortunately I'm not sure how to help from here. Given that you can load test ads, and the logs from log.txt in https://github.com/googleads/googleads-mobile-flutter/issues/484#issuecomment-1111559435, it looks like AdColony is just no filling, but I don't see any logs from AdColony that point out the cause. I would recommend reaching out to AdColony to see if they have any pointers for debugging no-fills from them. Also double check AdColony's setup instructions: https://github.com/AdColony/AdColony-Android-SDK/wiki

huycozy commented 1 year ago

We’re closing this issue due to inactivity. If you’re still impacted, please create a new issue via the Developer Forum.