Android Question Firebase ads 1.60 problem

tufanv

Expert
Licensed User
Hello,

I have done as Erel suggested on firebase admob 1.60 tutorial. My app instantly crashes on launch without even a log. App id is correct , I also tried with sample app id. Result is same: Instant crash.

(with sdk manager I updated the all recommended things and also selected firebase-ads 18.1)
 

tufanv

Expert
Licensed User
There is no such thing in Android.
Connect with usb debugging and check the unfiltered log. There MUST be an error in the LOG
thanks. I connexted with usb, there are millions of lines when unfiltered but I saw this, it seems related. If this is the right error, stackoverflow says something about multidex. :
java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.MobileAdsInitProvider" on path: DexPathList[[zip file "/data/app/ct.doviz-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
 

DonManfred

Expert
Licensed User
firebase-ads 18.1
Google has added a few new requirements to AdMob implementation. You must make these changes if you are using the latest versions of Android SDK libraries (firebase-ads 18.1.1+).
Sounds like you have NOT the newest items.
 

tufanv

Expert
Licensed User
Make sure that the path to android.jar under Tools - Configure Paths points to the same folder as the Android SDK folder that you've updated.
sdkmanager shows : C:\androidsdk\tools\bin\sdkmanager.bat

My path shows : C:\androidsdk\platforms\android-28\android.jar

I think they are matching.
 

tufanv

Expert
Licensed User
I have now switchted to androidx and app started to work, but all 6 ad slots gives admob error code 3 which is no inverntory to fill but before this update I have never get this, I was always getting an ad. unisntalling the new version and installing the old version gives me the ads.

edit: only test ads are working normal ads are not showing in any of my devices. I am afraid to push the update. I also sent the apk to 2 friends, no ads are being shown to anyone. When I install the latest version without this change from thje play store I can see the real ads and also bothof the friends see them
 
Last edited:

tufanv

Expert
Licensed User
I have some interesting findings. Debug mode always gives error 3, when i get error code 3 and later isntall in release mode, I still dont see the ads. After sometime I start seeing ads without problem, later I install debug mode again I get error code 3, and If I install the release mode again I don't see the ads again. For the last 30 minutes no ads is coming. I am really confused and concerned about it being stable.
 

tufanv

Expert
Licensed User
Please don't make duplicate posts. I've deleted two other duplicate posts. It makes it impossible to help you.

Debug mode vs. release mode is unrelated here.
The ads should behave exactly the same.

1. Check the unfiltered logs.
2. Test it with the sample app id and the sample unit id.
So how we can explain the situation that it worked for release mode until i installed debug mode and started getting error code 3 again ? At a stackoverflow topic i read that some people experienced the same problem until they sign the app with release mode, but dont know if it is related.

Unfiltered logs gives me millions of lines, how can i find the related logs only ?
 

tufanv

Expert
Licensed User
Not related unless you are using a different key in debug and release modes for some strange reason.
unfiltered logs doesntg show me anything much : ( also tried sample app id, still getting error 3 for every ad unit)

Edit: my device is an old note 2, my friends phone is old note2 too. Now I sent the apk to a note 8 with latest android on it, he says it works without a problem. Can it be a device and android version relates problem?
B4X:
Logger connected to:  samsung SM-N9005
--------- beginning of main
s
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
Consent state: UNKNOWN
EU: false
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
(Intent) Intent { cmp=ct.doviz/.httputils2service }
cWEez2YrLtg:APA91bGqSXg60WEOiv3PLVqDesa_7GzgNzFes-xjfkEMgL7Z2WNyyJwoV3lxDV8y-5eOpgJ6xQQH3Xxdf2k6xTGLD48yj_PUzD7c9O43MJGUANlluiR5Un-kDfs0GWyXYzbK3JTZ3x1P
burdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
UNKNOWN
KAYIT : BTRWG9O85
Timeline: Activity_idle id: android.os.BinderProxy@16c44bc6 time:645392
Ad failed to load : 3
Ad failed to load : 3
PREMIUM Error Code: 3
Use AdRequest.Builder.addTestDevice("1BF76F3B1F0A7BCAA2FE57E91364BE63") to get test ads on this device.
PREMIUM BANNER ERROR
Use AdRequest.Builder.addTestDevice("1BF76F3B1F0A7BCAA2FE57E91364BE63") to get test ads on this device.
Not retrying to fetch app settings
Not retrying to fetch app settings
JobName = getir, Success = true

JobName = tokenkayit, Success = true
token updated
JobName = alertcheck, Success = true
no alerts set
JobName = getir2, Success = true
Ad failed to load : 3
not Received - Error Code: 3
Ad failed to load : 3
Aktif Degisti: http://loadbalance.tvworks.org/
Use AdRequest.Builder.addTestDevice("1BF76F3B1F0A7BCAA2FE57E91364BE63") to get test ads on this device.
Not retrying to fetch app settings
Use AdRequest.Builder.addTestDevice("1BF76F3B1F0A7BCAA2FE57E91364BE63") to get test ads on this device.
Not retrying to fetch app settings
NORMAL BANNER ERROR:3
Ad failed to load : 3
PREMIUM BANNER ERROR
Use AdRequest.Builder.addTestDevice("1BF76F3B1F0A7BCAA2FE57E91364BE63") to get test ads on this device.
Ad failed to load : 3
Not retrying to fetch app settings
PREMIUM Error Code: 3
Use AdRequest.Builder.addTestDevice("1BF76F3B1F0A7BCAA2FE57E91364BE63") to get test ads on this device.
Not retrying to fetch app settings
JobName = getir2, Success = true
JobName = getir2, Success = true
Ad failed to load : 3
NORMAL BANNER ERROR:3
Ad failed to load : 3
not Received - Error Code: 3
JobName = getir2, Success = true
-1 received
writer error
java.lang.InterruptedException
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1991)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2025)
    at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:373)
    at anywheresoftware.b4a.remotelogger.Connector$Writer.run(Connector.java:160)
    at java.lang.Thread.run(Thread.java:818)
JobName = getir2, Success = true
Starting remote logger. Port: 57310
After accept
 
Last edited:

LucaMs

Expert
Licensed User
I begin to suspect that Google has made some mistakes with the accounts.

My very few published apps don't get ads anymore, a test app that uses v. 1.60 has the same problem, error 3, but using the test IDs and also those of a friend the app receives them.

Apparently everything is normal, even the account and no notification from Google.

For the moment I am too lazy (and not very calm) to write to Google.

https://www.b4x.com/android/forum/threads/admob-no-ads-received.111192/
 
Top