Closed prinzekero closed 7 years ago
Have anyone been able to resolve this?
From Facebook Audience Network docs, we could not find the meaning of error code 1203. https://developers.facebook.com/docs/audience-network/testing
Only following error codes listed: 1000 - Network Error 1001 - No Fill 1002 - Ad Load Too Frequently 2000 - Server Error 2001 - Internal Error
I will try updating the AudNet SDK to newest version, and see whether it happens again.
Any good news for this?
I have the same issue. It used to work around 2 months ago.
Did manage to find a solution - an update of FB audience network SDK was needed. See here: https://github.com/floatinghotpot/cordova-plugin-facebookads/pull/53
@jonas-m- nice one, I will take a look. Thanks for linking the PR 👍
@jonas-m- Can I edit this fixed in my local project "plugin.xml" directly? I use Phonegap/Cordova CLI.
@princekero Until the fix is merged, you may use my fixed version of this plugin, as such:
<plugin name="cordova-plugin-facebookads" spec="https://github.com/jonas-m-/cordova-plugin-facebookads.git" />
Use with caution though - I haven't tested the iOS part, though for Android - should work fine :)
@jonas-m- I try your code, it's work when isTesting: true
.
But not work when I turn it false. It show error:-1, reason: unknown error
instead. :'(
@princekero This might be related to your Facebook audience network setup, because it works for me, when I:
isTesting: true
)cordova build android --release
)Hi @mrakowski0, any ETA on this one?
@anmolagar I'm not the maintainer. @floatinghotpot has to take a look.
same error
@jonas-m- Thanks for the fix Jonas. Though, while building using Phonegap Build service, the plugin fails the build.
Logs: Build Date: 2017-04-19 15:18:33 +0000 Configuration on demand is an incubating feature. Incremental java compilation is an incubating feature. Download https://repo1.maven.org/maven2/com/facebook/android/audience-network-sdk/4.21.1/audience-network-sdk-4.21.1.pom Download https://jcenter.bintray.com/com/google/android/exoplayer/exoplayer/r2.0.3/exoplayer-r2.0.3.pom Download https://jcenter.bintray.com/com/google/android/exoplayer/exoplayer/r2.0.3/exoplayer-r2.0.3.aar Download https://repo1.maven.org/maven2/com/facebook/android/audience-network-sdk/4.21.1/audience-network-sdk-4.21.1.aar :preBuild UP-TO-DATE :preReleaseBuild UP-TO-DATE :checkReleaseManifest :preDebugBuild UP-TO-DATE :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugNdk UP-TO-DATE :CordovaLib:compileLint :CordovaLib:copyDebugLint UP-TO-DATE :CordovaLib:mergeDebugProguardFiles :CordovaLib:packageDebugRenderscript UP-TO-DATE :CordovaLib:checkDebugManifest :CordovaLib:prepareDebugDependencies :CordovaLib:compileDebugRenderscript :CordovaLib:generateDebugResValues :CordovaLib:generateDebugResources :CordovaLib:packageDebugResources :CordovaLib:compileDebugAidl :CordovaLib:generateDebugBuildConfig :CordovaLib:mergeDebugShaders :CordovaLib:compileDebugShaders :CordovaLib:generateDebugAssets :CordovaLib:mergeDebugAssets :CordovaLib:processDebugManifest :CordovaLib:processDebugResources :CordovaLib:generateDebugSources :CordovaLib:incrementalDebugJavaCompilationSafeguard :CordovaLib:compileDebugJavaWithJavac :CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. :CordovaLib:processDebugJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForDebug :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug :CordovaLib:mergeDebugJniLibFolders :CordovaLib:transformNative_libsWithMergeJniLibsForDebug :CordovaLib:transformNative_libsWithSyncJniLibsForDebug :CordovaLib:bundleDebug :CordovaLib:preReleaseBuild UP-TO-DATE :CordovaLib:compileReleaseNdk UP-TO-DATE :CordovaLib:copyReleaseLint UP-TO-DATE :CordovaLib:mergeReleaseProguardFiles :CordovaLib:packageReleaseRenderscript UP-TO-DATE :CordovaLib:checkReleaseManifest :CordovaLib:prepareReleaseDependencies :CordovaLib:compileReleaseRenderscript :CordovaLib:generateReleaseResValues :CordovaLib:generateReleaseResources :CordovaLib:packageReleaseResources :CordovaLib:compileReleaseAidl :CordovaLib:generateReleaseBuildConfig :CordovaLib:mergeReleaseShaders :CordovaLib:compileReleaseShaders :CordovaLib:generateReleaseAssets :CordovaLib:mergeReleaseAssets :CordovaLib:processReleaseManifest :CordovaLib:processReleaseResources :CordovaLib:generateReleaseSources :CordovaLib:incrementalReleaseJavaCompilationSafeguard :CordovaLib:compileReleaseJavaWithJavac :CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. :CordovaLib:processReleaseJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForRelease :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease :CordovaLib:mergeReleaseJniLibFolders :CordovaLib:transformNative_libsWithMergeJniLibsForRelease :CordovaLib:transformNative_libsWithSyncJniLibsForRelease :CordovaLib:bundleRelease :prepareComAndroidSupportAnimatedVectorDrawable2500Library :prepareComAndroidSupportAppcompatV72500Library :prepareComAndroidSupportRecyclerviewV72500Library :prepareComAndroidSupportSupportCompat2500Library :prepareComAndroidSupportSupportCoreUi2500Library :prepareComAndroidSupportSupportV132340Library :prepareComAndroidSupportSupportV42340Library :prepareComAndroidSupportSupportVectorDrawable2500Library :prepareComFacebookAndroidAudienceNetworkSdk4211Library :prepareComGoogleAndroidExoplayerExoplayerR203Library :prepareComGoogleAndroidGmsPlayServicesAds1020Library :prepareComGoogleAndroidGmsPlayServicesAdsLite1020Library :prepareComGoogleAndroidGmsPlayServicesAnalytics1020Library :prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1020Library :prepareComGoogleAndroidGmsPlayServicesBase1020Library :prepareComGoogleAndroidGmsPlayServicesBasement1020Library :prepareComGoogleAndroidGmsPlayServicesClearcut1020Library :prepareComGoogleAndroidGmsPlayServicesGass1020Library :prepareComGoogleAndroidGmsPlayServicesGcm1020Library :prepareComGoogleAndroidGmsPlayServicesIid1020Library :prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1020Library :prepareComGoogleAndroidGmsPlayServicesTasks1020Library :prepareProjectCordovaLibUnspecifiedReleaseLibrary :prepareReleaseDependencies :compileReleaseAidl :compileReleaseRenderscript :generateReleaseBuildConfig :mergeReleaseShaders :compileReleaseShaders :generateReleaseAssets :mergeReleaseAssets :generateReleaseResValues :generateReleaseResources :mergeReleaseResources :processReleaseManifest :processReleaseResources :generateReleaseSources :incrementalReleaseJavaCompilationSafeguard :compileReleaseJavaWithJavac :compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. :compileReleaseNdk UP-TO-DATE :compileReleaseSources :prePackageMarkerForRelease :transformClassesWithDexForRelease FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':transformClassesWithDexForRelease'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 18.756 secs Error: /project/gradlew: Command failed with exit code 1 Error output: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':transformClassesWithDexForRelease'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:877:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
Can you help out? Plus is there a previous version number of this plugin that you know, that might work? Till the time it is fixed.
@SidMehta Can you try removing line <framework src="com.android.support:support-v4:+" />
from plugins/cordova-plugin-facebookads/plugin.xml
?
@jonas-m- Actually I am using the build.phonegap.com to build the app for android. So I can only get the plugin from the repository.
@SidMehta And after that.. rebuild your platform, like so: cordova platform remove android && cordova platform add android
@SidMehta Then you might try forking my repo and modifying it, if that's not too much of a hassle :) I haven't yet dug into the plugin that deep, but the support v4 lib seems un-needed, though the author should confirm that first
Sure @jonas-m- :) Let me try and get back if I am able to get it to work using the build service :)
@jonas-m- I knew it. That because facebook not serve ads for my fb account anymore (btw I'm a owner of those app). Then I try with another person account for received pre-approved ads, also need to add this person as developer. Your fixed just work great for now!
@SidMehta Oh, I found this problem too but in another error message. It only happen on another person PC, not mine.
@princekero This error you posted is caused by the new version of FB AudNet com.facebook.android:audience-network-sdk:4.22.+
. I've already fixed this in my repo, you can re-download the plugin
@jonas-m- Getting the same error after removing <framework src="com.android.support:support-v4:+" />
@SidMehta I solved my error, just done what @jonas-m- posted.
I have these lines...
<framework src="com.android.support:support-v4:+" />
<framework src="com.google.android.gms:play-services-ads:+"/>
<framework src="com.facebook.android:audience-network-sdk:4.21.+"/>
Thanks @princekero . I am also now able to build the app. But for me, onAdLoaded event just doesn't trigger. Neither does the onAdFailLoad event triggers. Are you able to see the ads?
Got it to work :) Thanks a lot @jonas-m- @princekero @floatinghotpot :) You guys rock!
i cant solve this issue can you tell me where exactly you add these lines , plugin.xml inside facebookads plugin folder???? what else i have to change ??? can you make it easy clear steps because im very confused?
@hodaifa82 in config.xml find your original plugin line which should be
<plugin name="cordova-plugin-facebookads" spec="4.7.4"
right?
You need to change this line to
<plugin name="cordova-plugin-facebookads" spec="https://github.com/jonas-m-/cordova-plugin-facebookads.git" />
You also need to install git program (e.g. https://git-for-windows.github.io if you work on windows) to be able direct download from github. Then clear all the platform, plugin folder and add platform/build again. Done!
what i did because im using intelxdk insted downloading from cordova-plugin-facebookads i download from https://github.com/jonas-m-/cordova-plugin-facebookads.git and the plugin added correctly im able to see the new 3lines , but the link didnt download the audience network pulug in but the and build failed ??? im having this message Required by: :android:unspecified > com.facebook.android:audience-network-sdk:4.21.1
@jonas-m-
framework src="com.facebook.android:audience-network-sdk:4.21.+"
this line makes build fails ???? any suggesions?
@hodaifa82 Can you please post the full build log somewhere and paste a link in here?
@hodaifa82 Looks like you are missing the jcenter
repository. Your platforms/android/build.gradle
file should contain:
buildscript {
repositories {
mavenCentral()
jcenter()
}
...
}
jcenter is added by default since newer versions of cordova, so you might consider updating cordova & cordova Android platform
ah ok thanks i will try to do it
im using version 6.2
@jonas-m- may be the problem is the config,xml file is giving the same old line even after downloading your plugin???????plugin name="cordova-plugin-facebookads" spec="4.7.4" do you suggest to change it ?
@jonas-m-
Hey, thanks for the effort. It started to work for Android but now the build fails for iOS
/src/platforms/ios/XYZ/Plugins/cordova-plugin-facebookads/FacebookAdPlugin.m:9:9: fatal error: 'FBAudienceNetwork/FBAudienceNetwork.h' file not found
#import <FBAudienceNetwork/FBAudienceNetwork.h>
^
1 error generated.
Any ideas how to fix it?
@mrakowski0 What are you using to build iOS? Because it seems that the FBAudienceNetwork
pod wasn't downloaded from CocoaPods
@jonas-m- I'm using ionic/cordova. If I use the plugin from this repository then the build just works for both platforms, if I use your fork then Android fatal error is fixed but iOS build fails.
ionic platform remove ios
ionic platform add ios
ionic build ios --debug
platforms/ios/MyProject.xcworkspace
in XCode (IMPORTANT: not MyProject.xcodeproj
)Also, make sure your Cordova iOS platform version is >= 4.3.0, because CocoaPods support was introduced in 4.3. Like so:
$ cordova platform list
Installed platforms:
android 6.1.2
ios 4.3.1
@princekero regarding to deviceHash: 'copy_your_hash_id_from_console_here' can i use the default on the code given or i have to put my own ? how to get testing one?
@hodaifa82 I can use testing:true mode on any mobile phone. I didn't see any point to use hash_id for the test. You can received real test ads with testing:false by the way.
ok, this works now if actual plugin is changed with this:
<plugin name="cordova-plugin-facebookads" spec="https://github.com/jonas-m-/cordova-plugin-facebookads.git" />
But now there is new problem with native ads.
I am seeing a top left green box no matter where i place my ad. I have even added something like this FacebookAds.setNativeAdClickArea('209755156184604_209757376184382', 10, 100, 251, 90);
but nothing works.
Any idea anyone? what is missing?
im trying more than 2 weeks after i install @jonas-m- update the error message disappears but no actions im not receiving any ads ?????!!!!!!
@hodaifa82 What is the FB error code & message you are getting for not serving the ad? I had problems with 2000 Server Error
on iOS, which.. resolved by itself somehow..
And also got 1001 No Fill
when testing on a real Android device. The solution: deploy a signed, release version of the app to an emulator with FB test mode disabled (serving real ads). That did the trick - the ad was displayed: I was able to get ad request & apply for approval
@jonas-m- im using test mode on real android device no hash key no thing just the code given in test app , im testing on real device does the problem because im using test mode not real data?
i have no error messages , just no ad showing after click
Hi @jonas-m- . Your fork builds well and shows the ads correctly, but for one issue. The clickable area is not updating and just a small top left corner of the app is clickable. I think the issue is same as it's faced by @anmolagar . Do you know what or where the issue can be? Thanks :)
@SidMehta Well.. my fork only updated the facebook audience SDK dependency & made use of Gradle (and CocoaPods, on iOS) dependency management features available in newer cordova platform version.
So my guess would be that the problem lies in the native code of this plugin, which handles native ad positioning. For that, you could launch your from from within Android Studio (if you're having problems with Android platform), look for clues in logcat. If nothing's there - try to debug the issue, place a few breakpoints in the code of the plugin (FacebookAdPlugin.java
) to see how it behaves & where it breaks down - perhaps the native code needs to be updated against the updated FbAudNet SDK
@SidMehta @princekero @jonas-m- what cordova version you used? 6.2 5,4 6.5???????????????????
@hodaifa82 PhoneGap cli-6.5.0
This error was happen for a while with unknow reason. It never happen before, everything was fine when I just simply create banner.
Now, every time I created new Phonegap app with your plugin, follow the same steps. Facebook ads never show even in testing mode.