Facebook Audience Network (fbAudienceNetwork) gets stuck on blank screen

Hello jacek, I had faced the similar issue in past. It was because i had purchased FAN paid but was using plugin only FAN in build.settings. Try to use paid plugin instead and use .paid in both build.settings and require " ". It will be gone.

I want to test free version.

Did you purchase it yet? I remember for me it did not work either with free version and give exactly same error that you mentioned.

Generally, that error indicates that you’re calling .load() before .init() finishes. Because these are async events, it’s really easy to get a race condition situation.

Can you provide the URL to the sample app you’re using?

Rob

It’s sample from documentation so its should work

https://github.com/coronalabs/plugins-sample-fbAudienceNetwork

My devices runs Android 9.0 and Android 8.1.

I have tested this on Corona 3466 and 3439. 

Hello Rob, sorry to say, may be i am wrong but i remember i had similar issue when i tested sample code. I changed that code to get rid of race condition. I provide a good gap between both init and load. Try to use load on a button click after init is successful but i remember i had this issue. When i turned this to paid plugin the problem was gone. And now i am using FAN in almost every app and it works excellent.
I do think there is some issue may be in sample, not sure.

It doesn’t work in my private app either. When I wait 1 min to load SDK I get same result.

Are there any updates to the “You must wait for the ‘init’ event before calling other API methods” error? Does the free plugin not work? I am getting the same error now too on the free plugin. I get this error with the same build that o.jacek has put a link to above. I am on Corona daily build 3468.

Below is what I see in the console log for the sample app . It starts saying the initialization was successful followed by the annoying error message. Please help.

Mar 12 11:33:08.915 SM-G935V: Facebook Audience Network event: initialization s

Mar 12 11:33:08.916 uccessful

Mar 12 11:33:14.134 SM-G935V: ERROR

Mar 12 11:33:14.134 : fbAudienceNetwork.load(adUnitType, options]), You must wait for the ‘init’ event before calling other API methods

Hello, [member=‘shivapp’].
Thanks for bringing it up. Please, test it again (no need to rebuild), should work now.

The error has disappeared. Now I have new error: 

ERROR: fbAudienceNetwork.show(adUnitType [, options]), placementId 'XXXXXXXXXX\_XXXXXXX' not loaded

and still no ads.

(XXXXX_XXXX its my valid placement id)