floatinghotpot / cordova-plugin-facebookads

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

Getting error 2000 on ios #77

Open choppermio opened 6 years ago

choppermio commented 6 years ago

i tried to follow these steps and i'm getting error 2000 i created my app and i added the plugin like this cordova plugin add cordova-plugin-facebookads and it did not work so i browsed the issues section and i tried to add it like this cordova plugin add cordova-plugin-facebookads@4.23.0 and it did not work too i tried your example https://github.com/floatinghotpot/cordova-plugin-facebookads/blob/master/test/index.html and i changed the keys with my keys and did not work

floatinghotpot commented 6 years ago

Please paste more error message details.

BTW, if I remember correctly, to get live ad, you may need get facebook approved your app id.

floatinghotpot commented 6 years ago

And, can you see test Ad when use option isTesting:true? If yes, the plugin and SDK APIs are working fine, the error is caused by the ad unit placement id or other reason.

choppermio commented 6 years ago

yes testing isTesting:true and i can't see the ad not the banner not the interstitial not the native all of them give me the 2000 error

choppermio commented 6 years ago

just this is the error i see the code is working with android but the ios is not working facebookAds, onAdFailLoad, {'adNetwork':'FacebookAds','adType':'banner','adEvent':'onAdFailLoad','error':2000,'reason':'Server Error'} 2017-09-15 00:52:04.156 myApp[947:18590] FacebookAds, onAdFailLoad, {'adNetwork':'FacebookAds','adType':'interstitial','adEvent':'onAdFailLoad','error':2000,'reason':'Server Error'} 2017-09-15 00:52:37.657 myApp[947:18590] FacebookAds, onAdFailLoad, {'adNetwork':'FacebookAds','adType':'banner','adEvent':'onAdFailLoad','error':2000,'reason':'Server Error'} 2017-09-15 00:53:11.503 myApp[947:18590] FacebookAds, onAdFailLoad, {'adNetwork':'FacebookAds','adType':'banner','adEvent':'onAdFailLoad','error':2000,'reason':'Server Error'} 2017-09-15 00:53:46.013 myApp[947:18590] FacebookAds, onAdFailLoad, {'adNetwork':'FacebookAds','adType':'banner','adEvent':'onAdFailLoad','error':2000,'reason':'Server Error'}

floatinghotpot commented 6 years ago

The "2000 server error" message seems be caused by out-dated SDK version. Please make sure you are using the latest version of plugin, v4.23.2. If the error persists, I will find time to check whether Facebook has released newer SDK.

choppermio commented 6 years ago

i used the plugin sdk 4.23.2 and for me the same problem error 2000 i don't know what is the problem the sdk version is now v4.26.0 https://developers.facebook.com/docs/ios

floatinghotpot commented 6 years ago

Yes, I can reproduce your issue now, we may need update the plugin to latest SDK.

floatinghotpot commented 6 years ago

The facebook SDK dependency has been updated to v4.26.0.

Please update the plugin like this:

cordova plugin rm cordova-plugin-facebookads
cordvoa plugin rm cordova-facebook-audnet-sdk

cordova plugin add cordova-plugin-facebookads
floatinghotpot commented 6 years ago

You can also try this plugin with another id, cordova-plugin-facebookads-pod@4.26.0, which depends on Facebook SDK repo directly, but you need install gradle and cocoapods first.

choppermio commented 6 years ago

i tired the plugin cordova plugin add cordova-plugin-facebookads when i try to run the app in xcode this error happen Apple Mach-O Linker Error Group

BigFoppa commented 6 years ago

See my workaround in issue #78 //Big

floatinghotpot commented 6 years ago

Fixed, see: #78, and big thanks to @BigFoppa for the research and detailed description.

Please notice: Even after plugin fixed,

choppermio commented 6 years ago

thank you it works now but it has some problems

when isTesting is true it gives you the 2000 error i got my device id(deviceHash) from xcode>window>devices and simulator and there is identifier in the device info

the second problem the native ad is not working the banner is working and interstitial is working when the isTesting:false but the native is not working

chrishenx commented 6 years ago

Ok, so I still have the issue on iOS. The versions of cordova-facebook-audnet-sdk and cordova-plugin-facebookads are the latest, but I keep receiving the same "Server Error", how can a trouble shot this? @floatinghotpot

juxfr commented 6 years ago

Are you still getting this 2000 error? I'm not able to make it work with isTesting : true (I've a 1001 no fill error). When I'm not testing, i've got the 2000 error directly.

lucaele commented 6 years ago

Same error 2000 on iOS for ios 11.0 with cordova-facebook-audnet-sdk 4.26.2 "Facebook AudienceNetwork SDK for Cordova" cordova-plugin-extension 1.5.4 "Cordova Plugin Extension" cordova-plugin-facebookads 4.23.2 "FacebookAds"

Any Help?