floatinghotpot / cordova-plugin-facebookads

Cordova/PhoneGap plugin for Facebook Audience Network Ads
64 stars 71 forks source link

pesky error 1001 'no fill' #84

Open jglesner opened 6 years ago

jglesner commented 6 years ago

Getting the common 1001 'no fill' error. spent much time debugging this to no avail. I'm on an iOS iPhone 6. I'm using the 4.26.2 audnet-sdk (Facebook Audience Network SDK 4.26.0) release. I'm trying to test native ad placement; I've got my app set up in Facebook Developer, set the bundle id, and also configured the Ad space and placement for a native iOS device. My app has not been approved by Facebook yet because its not published. However, I believe I should still be able to receive test ads.

I think I've checked all the easy stuff ... I have the Facebook app up on the device, and I'm logged in w/ my Facebook App admin user. I do NOT have Ad Tracking turned on, so that shouldn't be the issue.

I'm using a placement ID similar to the following using the format specified by Facebook to request a test ad: "IMG_16_9_APP_INSTALL#111222333444555_111222333444555".

The only thing I haven't done is set my device Hash ... because the SDK never generates one in the XCode console.

Also of note, these requests never make it to Facebook Audience Request Debugger. So I'm not sure what's happening. Any insights as to what else I could check? Is there anyway to turn on verbose logging via the FacebookAds.setOptions or elsewhere?

Any help would be appreciated! Thank you in advance.

floatinghotpot commented 6 years ago

No fill, is actually not a error. It's quite common. If the ad server does not find suitable ad available for you, it will return 'no fill'.

Usually google admob fill rate is 95% or higher, while facebook audience network fill rate is 75% or less. FYI.

jglesner commented 6 years ago

Thank you for your reply; I appreciate your time. I'd use admob, but it doesn't appear those plugins for phonegap/cordova support Native Ads yet. I know that's something you've looked into based on your posts.

I'm confused though ... how can 'no fill' be acceptable when I'm requesting a specific test ad (IMG_16_9_APP_INSTALL)? I would think that would be guaranteed to return a response?

Also why wouldn't these requests make it to Facebook Audience Request Debugger if it was set up correctly? Is there anyway to turn on debug logging for the Audnet SDK?

jglesner commented 6 years ago

In case this helps anyone else ... it started working for me once I commented out the setOptions block of code:

// set your hashed device id if testing on device (optional) if(FacebookAds) FacebookAds.setOptions({ isTesting: true, deviceHash: 'HASHED_ID' });

For whatever reason, I never received a Device Hash ID in the XCode Console Output when testing on a real device. So, in my case, commenting out this code caused things to start working.

There are two options for testing: real ads and test ads. I started with test ads ... although its worth noting that you can still receive error:1001 no fill from time to time using test ads. This is counterintuitive, as you would think Facebook's APIs should always be able to return one of their static test ads. But for whatever reason, it works sometimes, and not others. (Ridiculous, in my opinion).

Refer to this page for information on calling Test Ads: https://developers.facebook.com/docs/audience-network/testing#testing-testAd

Essentially, use a normal placement ID for the Ad ID, or you can use the following format for requesting test IDs: TEST_AD_TYPE#YOUR_PLACEMENT_ID. The TEST_AD_TYPE's are defined at the link above.