larpon / QtFirebase

An effort to bring Google's Firebase C++ API to Qt + QML
MIT License
284 stars 83 forks source link

Getting error: Ad failed to load : 3 #108

Closed edips closed 5 years ago

edips commented 5 years ago

Hi. I used QtFirebase's banners successfully last year. Now I updated my apps and I updated NDK r19c, Qt 5.13, Firebase SDK latest version and QtFirebase and banners aren't seen. I get this error on log messages:

I Ads     : Ad failed to load : 3
W libApp.so: QtFirebaseAdMobBanner(0xe6ac9420) ::load load failed ERROR code: 7 message: No ad was available to serve. 

Test banner work. I changed package name and other configurations for Qt Firebase example project according to documentation, I got the same error. I also tried other Qt Admob projects and I get I Ads : Ad failed to load : 3 error for these projects too. I tried different ad units for these projects. Banners of my apps in Play Store work that I used QtFirebase before. What can be the problem? Thanks.

larpon commented 5 years ago

Hey! By the looks of it, the error message comes directly from AdMob's closed source libraries.

Are you trying this out on a test device?

I've had a few phones where this happened out of the blue. I suspect it might be about fill rates i.e. Google are having trouble getting enough adverts through to your app. I'm just guessing here. I've also had similar scenarios in the past - sometimes it wouldn't show anything on my devices. Try pushing a closed beta version of your app to a friend and see if the ads show. AdMob has some tricky AI to detect fraud patterns etc. so it could be they are simply blocking your IP or phone ids.

No one knows really - that's why all this need to change :)

edips commented 5 years ago

I try it on my device which I develop my apps on it. When you told about fill rates I thought that my device is connected to WiFi, so Google cannot acquire any information about my interest to advertise. I turned off WiFi and used mobile data. Now it works! What a non-sense problem. Normally the same banner on Play Store works with WiFi but it doesn't work with updated app. I spent days to find out the problem. Thank you so much!

larpon commented 5 years ago

@edips - glad I could help! And yeah ... it doesn't make sense ... at all :)

edips commented 5 years ago

@Larpon A few days ago, the ads worked after I clicked "Reset Ad Test Device". Then it stopped working. Today I used mobile data instead of WiFi, it worked for a while but it also didn't work after some time. Now I looked Ionic's AdmobPlus project's issues, someone suggested to deploy app with "signed" mode on here. It may help if someone has this problem.

paoletto commented 5 years ago

Seeing the same issue in the Example app. Tried the mobile data, as well as signing the apk with a self-signed certificate. In both cases i see the "QtFirebaseExample LOG AdMobInterstitial ::onError Interstitial failed with error code 7 and message No ad was available to serve." error, and the ads always in loading... state in the AdMob page.

I wonder if i'm missing something. during the build process i see some warnings, such as: Warning: The app gradle file must have a dependency on com.google.firebase:firebase-core for Firebase services to work as intended. and Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease] But i don't know if they are in any way related.