dreamsoftin / facebook_audience_network

Flutter Facebook Audience Network
https://pub.dartlang.org/packages/facebook_audience_network/
MIT License
156 stars 99 forks source link

Test ads are working but real ads are not appearing #16

Closed dheerajbred closed 3 years ago

dheerajbred commented 5 years ago

Hi, the test ads are appearing perfectly. But when I add my placement id, ads are not appearing. .

D/FBAudienceNetwork(21439): SDK dex loading time: 87
I/ProxyCache(21439): Proxy cache server started. Ping it...
D/ProxyCache(21439): Open connection  to http://127.0.0.1:42043/ping
E/ProxyCache(21439): Error reading ping response
E/ProxyCache(21439): com.facebook.ads.internal.kd: Error opening connection for http://127.0.0.1:42043/ping with offset 0
E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:66)
E/ProxyCache(21439):    at com.facebook.ads.internal.kg.a(SourceFile:131)
E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.a(SourceFile:1060)
E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.call(SourceFile:396)
E/ProxyCache(21439):    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/ProxyCache(21439):    at java.lang.Thread.run(Thread.java:764)
E/ProxyCache(21439): Caused by: java.io.IOException: Cleartext HTTP traffic to 127.0.0.1 not permitted
E/ProxyCache(21439):    at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:115)
E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:458)
E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)
E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:538)
E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:145)
E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:61)
E/ProxyCache(21439):    ... 7 more
E/FBAudienceNetwork(21439): You don't call AudienceNetworkAds.initialize(). Some functionality may not work properly.
D/AdInternalSettings(21439): Test mode device hash: deb67081-d21d-4208-989c-ac24fcd2cc8a
D/AdInternalSettings(21439): When testing your app with Facebook's ad units you must specify the device hashed ID to ensure the delivery of test ads, add the following code before loading an ad: AdSettings.addTestDevice("deb67081-d21d-4208-989c-ac24fcd2cc8a");
E/FBAudienceNetwork(21439): You are using custom Application class and don't call AudienceNetworkAds.isInAdsProcess(). Multi-process support will be disabled. Please call AudienceNetworkAds.isInAdsProcess() if you want to support multi-process mode.
D/ProxyCache(21439): Open connection  to http://127.0.0.1:42043/ping
E/ProxyCache(21439): Error reading ping response
E/ProxyCache(21439): com.facebook.ads.internal.kd: Error opening connection for http://127.0.0.1:42043/ping with offset 0
E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:66)
E/ProxyCache(21439):    at com.facebook.ads.internal.kg.a(SourceFile:131)
E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.a(SourceFile:1060)
E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.call(SourceFile:396)
E/ProxyCache(21439):    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/ProxyCache(21439):    at java.lang.Thread.run(Thread.java:764)
E/ProxyCache(21439): Caused by: java.io.IOException: Cleartext HTTP traffic to 127.0.0.1 not permitted
E/ProxyCache(21439):    at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:115)
E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:458)
E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)
E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:538)
E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:145)
E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:61)
E/ProxyCache(21439):    ... 7 more
I/flutter (21439): Native Banner Ad: NativeAdResult.ERROR --> {error_message: No fill, error_code: 1001, invalidated: true, placement_id: 383262725809870_384072102395599}
D/ProxyCache(21439): Open connection  to http://127.0.0.1:42043/ping
E/ProxyCache(21439): Error reading ping response
E/ProxyCache(21439): com.facebook.ads.internal.kd: Error opening connection for http://127.0.0.1:42043/ping with offset 0
E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:66)
E/ProxyCache(21439):    at com.facebook.ads.internal.kg.a(SourceFile:131)
E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.a(SourceFile:1060)
E/ProxyCache(21439):    at com.facebook.ads.internal.kg$c.call(SourceFile:396)
E/ProxyCache(21439):    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/ProxyCache(21439):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/ProxyCache(21439):    at java.lang.Thread.run(Thread.java:764)
E/ProxyCache(21439): Caused by: java.io.IOException: Cleartext HTTP traffic to 127.0.0.1 not permitted
E/ProxyCache(21439):    at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:115)
E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:458)
E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)
E/ProxyCache(21439):    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:538)
E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:145)
E/ProxyCache(21439):    at com.facebook.ads.internal.ki.a(SourceFile:61)
E/ProxyCache(21439):    ... 7 more
I/flutter (21439): Native Ad: NativeAdResult.ERROR --> {error_message: No fill, error_code: 1001, invalidated: true, placement_id: 383262725809870_384038435732299}
E/ProxyCache(21439): Shutdown server... Error pinging server [attempts: 3, max timeout: 1200].
I/ProxyCache(21439): Shutdown proxy server
E/ProxyCache(21439): HttpProxyCacheServer error
E/ProxyCache(21439): com.facebook.ads.internal.km: Error during waiting connection
E/ProxyCache(21439):    at com.facebook.ads.internal.kg$g.run(SourceFile:1267)
E/ProxyCache(21439):    at java.lang.Thread.run(Thread.java:764)
E/ProxyCache(21439): Caused by: java.net.SocketException: Socket closed
E/ProxyCache(21439):    at java.net.PlainSocketImpl.socketAccept(PlainSocketImpl.java:205)
E/ProxyCache(21439):    at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:451)
E/ProxyCache(21439):    at java.net.ServerSocket.implAccept(ServerSocket.java:547)
E/ProxyCache(21439):    at java.net.ServerSocket.accept(ServerSocket.java:515)
E/ProxyCache(21439):    at com.facebook.ads.internal.kg$g.run(SourceFile:1262)
E/ProxyCache(21439):    ... 1 more

I am getting ad requests but no fill rate image

Any help is appreciated

SurajShettigar commented 5 years ago

In Android Pie (API 28), Cleartext traffic is disabled by deafult. Refer this to learn how to enable it.

dheerajbred commented 5 years ago

I did that image

But the ads are still not getting filled.

/SecWifiDisplayUtil(12294): Metadata value : none
D/FBAudienceNetwork(12294): SDK dex loading time: 1955
I/ProxyCache(12294): Proxy cache server started. Ping it...
D/ProxyCache(12294): Open connection  to http://127.0.0.1:51132/ping
I/System.out(12294): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(12294): KnoxVpnUidStorageknoxVpnSupported API value returned is false
I/System.out(12294): KnoxVpnUidStorageknoxVpnSupported API value returned is false
D/ProxyCache(12294): Accept new socket Socket[address=/127.0.0.1,port=59110,localPort=51132]
I/ProxyCache(12294): Request to cache proxy:GetRequest{rangeOffset=0, partial=false, uri='ping'}
D/ProxyCache(12294): Ping response: `ping ok`, pinged? true
D/ProxyCache(12294): Opened connections: 0
D/SensorManager(12294): registerListener :: 2, MPL Accelerometer, 200000, 0,
D/SensorManager(12294): registerListener :: 0, MPL Gyroscope, 200000, 0,
E/FBAudienceNetwork(12294): You are using custom Application class and don't call AudienceNetworkAds.isInAdsProcess(). Multi-process support will be disabled. Please call AudienceNetworkAds.isInAdsProcess() if you want to support multi-process mode.
E/FBAudienceNetwork(12294): You don't call AudienceNetworkAds.initialize(). Some functionality may not work properly.
D/AdInternalSettings(12294): Test mode device hash: 0d38efc0-dca9-4825-bb38-16f054d3c8ff
D/AdInternalSettings(12294): When testing your app with Facebook's ad units you must specify the device hashed ID to ensure the delivery of test ads, add the following code before loading an ad: AdSettings.addTestDevice("0d38efc0-dca9-4825-bb38-16f054d3c8ff");
D/PhoneWindow(12294): *FMB* installDecor mIsFloating : false
D/PhoneWindow(12294): *FMB* installDecor flags : -2139028216
D/ViewRootImpl(12294): Buffer Count from app info with  ::-1 && -1 for :: com.animeprime.anime from View :: -1 DBQ Enabled ::false false
D/SecWifiDisplayUtil(12294): Metadata value : none
D/PhoneWindow(12294): *FMB* installDecor mIsFloating : false
D/PhoneWindow(12294): *FMB* installDecor flags : -2139028216
D/ViewRootImpl(12294): Buffer Count from app info with  ::-1 && -1 for :: com.animeprime.anime from View :: -1 DBQ Enabled ::false false
D/SecWifiDisplayUtil(12294): Metadata value : none
D/PhoneWindow(12294): *FMB* installDecor mIsFloating : false
D/PhoneWindow(12294): *FMB* installDecor flags : -2139028216
D/ViewRootImpl(12294): Buffer Count from app info with  ::-1 && -1 for :: com.animeprime.anime from View :: -1 DBQ Enabled ::false false
D/SensorManager(12294): unregisterListener ::
E/Sensors (12294): ~SensorEventQueue 0
E/        (12294): BitTube(): close receivedFd (207)
D/SensorManager(12294): unregisterListener ::
E/Sensors (12294): ~SensorEventQueue 0
E/        (12294): BitTube(): close receivedFd (209)
D/PhoneWindow(12294): *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
D/PhoneWindow(12294): *FMB* isFloatingMenuEnabled return false
D/libEGL  (12294): eglInitialize EGLDisplay = 0x82750f3c
D/mali_winsys(12294): new_window_surface returns 0x3000,  [720x200]-format:1
D/PhoneWindow(12294): *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
D/PhoneWindow(12294): *FMB* isFloatingMenuEnabled return false
D/mali_winsys(12294): new_window_surface returns 0x3000,  [720x600]-format:1
D/PhoneWindow(12294): *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
D/PhoneWindow(12294): *FMB* isFloatingMenuEnabled return false
D/mali_winsys(12294): new_window_surface returns 0x3000,  [720x1]-format:1
D/libEGL  (12294): eglInitialize EGLDisplay = 0x82750f3c
I/System.out(12294): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(12294): KnoxVpnUidStorageknoxVpnSupported API value returned is false
D/libEGL  (12294): eglInitialize EGLDisplay = 0x82750f3c
I/System.out(12294): KnoxVpnUidStorageknoxVpnSupported API value returned is false
D/libEGL  (12294): eglInitialize EGLDisplay = 0x82750f3c
D/libEGL  (12294): eglInitialize EGLDisplay = 0x82750f3c
D/libEGL  (12294): eglInitialize EGLDisplay = 0x82750f3c
D/SensorManager(12294): registerListener :: 2, MPL Accelerometer, 200000, 0,
I/flutter (12294): Native Banner Ad: NativeAdResult.ERROR --> {error_message: No fill, invalidated: true, error_code: 1001, placement_id: 383262725809870_384072102395599}
D/SensorManager(12294): registerListener :: 0, MPL Gyroscope, 200000, 0,
D/SensorManager(12294): unregisterListener ::
E/Sensors (12294): ~SensorEventQueue 0
E/        (12294): BitTube(): close receivedFd (235)
I/System.out(12294): (HTTPLog)-Static: isSBSettingEnabled false
D/SensorManager(12294): unregisterListener ::
E/Sensors (12294): ~SensorEventQueue 0
E/        (12294): BitTube(): close receivedFd (165)
D/SensorManager(12294): registerListener :: 2, MPL Accelerometer, 200000, 0,
I/flutter (12294): Native Ad: NativeAdResult.ERROR --> {error_message: No fill, invalidated: true, error_code: 1001, placement_id: 2059955637433413_2138625126233130}
D/SensorManager(12294): registerListener :: 0, MPL Gyroscope, 200000, 0,
D/SensorManager(12294): unregisterListener ::
E/Sensors (12294): ~SensorEventQueue 0
E/        (12294): BitTube(): close receivedFd (235)
I/System.out(12294): (HTTPLog)-Static: isSBSettingEnabled false
D/SensorManager(12294): unregisterListener ::
E/Sensors (12294): ~SensorEventQueue 0
E/        (12294): BitTube(): close receivedFd (241)

I even tried with the example app by replacing it with my placement id and I get the same error_message: No fill, invalidated: true, error_code: 1001 error

SurajShettigar commented 5 years ago

No fill issues are server-sided. Try testing it by the methods shown in this link.

dheerajbred commented 5 years ago

I even tried with a banner placement id which is currently working for my app, it is also showing no fill. If I implement the same banner on android natively using FAN SDK, then the banner ad is working. I even tried creating a new app and a new property with new placements and tried them out too, the same result. I just don't know, it appears the working placement ids which are getting filled are not getting filled if I use here in flutter. Are you sure that the same works for real ads? Do you have a spare placement id which is working?

Mecze commented 4 years ago

This happened to me using Unity 2018.4.7f1 + Admob (Android sdk 18.3.0) and ANY recent facebook mediation (from 5.8 and back as shown here) https://developers.google.com/admob/unity/mediation/facebook

Is this mediation ever going to stop using http?

uditbatra commented 3 years ago

@dheerajbred Were you able to make it run. I am having the same issue as you are...

dheerajbred commented 3 years ago

Yeah .... They started working once the app was live

On Fri, Jul 23, 2021, 5:48 PM uditbatra @.***> wrote:

@dheerajbred https://github.com/dheerajbred Were you able to make it run. I am having the same issue as you are...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dreamsoftin/facebook_audience_network/issues/16#issuecomment-885598357, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALDLURFUMQTND2F7L7KAUK3TZFMXTANCNFSM4HQLHHIQ .

uditbatra commented 3 years ago

My App is live still the App is not getting real Ads.  I guess the Facebook audience doesn't work without mediation so I have added Iron Source Mediation

Screenshot 2021-07-23 at 11 42 21 AM Screenshot 2021-07-23 at 11 42 30 AM Please help me on this @dheerajbred

adimchi1 commented 1 year ago

Any solution to this? My app is live