ratson / cordova-plugin-admob-free

New development has been moved to "admob-plus-cordova", https://github.com/admob-plus/admob-plus/tree/master/packages/cordova
https://github.com/admob-plus/admob-plus
MIT License
499 stars 214 forks source link

plugin conflicts: ionic 3 ios can't find sourcemaps and banner not clickable(workaround) #283

Open lolaswift opened 5 years ago

lolaswift commented 5 years ago

Anyone's facing the same issues?

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/plugins/cordova-plugin-admob-free/www/admob.js.map

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/polyfills/promise-7.0.4.min.js.map

Banner shows but not clickable. Interstitial works perfectly.

$ ionic info ✔ Gathering environment info - done!

Ionic:

ionic (Ionic CLI) : 4.1.2 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.0

Cordova:

cordova (Cordova CLI) : 8.0.0 Cordova Platforms : android 6.3.0, ios 4.5.5 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.4, (and 18 other plugins)

System:

ios-deploy : 1.9.2 ios-sim : 5.0.6 NodeJS : v8.11.1 (/usr/local/bin/node) npm : 6.4.1 OS : macOS Sierra Xcode : Xcode 9.2 Build version 9C40b

### update:

Took me quite some hours to pinpoint the issue and to find the workaround. To help those facing the same problems save time. This is how I fixed it.

In my case, the latest admob free plugin has conflicts with the latest cordova googlemaps plugin. I found my workaround of downgrading versions to: cordova-plugin-googlemaps 2.4.1 admob free 0.17.2 cordova-android platform 6.3.0(with lines appended in build.gradle: // SUB-PROJECT DEPENDENCIES END compile "com.google.android.gms:play-services-analytics:+" compile "com.google.android.gms:play-services-base:+" compile "com.google.android.gms:play-services-ads:+" compile "com.google.gms:google-services:+" compile "com.google.android.gms:play-services-tagmanager:+" ) To get rid of the "not found .....promise-7.0.4.js.map " error, just comment the source map line in promise-7.0.4.js of the googlemaps plugin.

jordanpurinton commented 5 years ago

Experiencing this same issue only on iOS

lolaswift commented 5 years ago

@jordanpurinton Thanks for confirming it Jordan. I tried downgrading to version 0.17.2, still the same issue. However, I have another ionic 3 project which also uses 0.17.2 and admob banner works perfectly on both ios and android. But that project was created with an older ionic CLI version (3.xx, can't remember). Do you have any findings?

jordanpurinton commented 5 years ago

Nothing quite yet, unfortunately. It's too bad, because this is basically the last step I need to finish before wrapping up our initial release.

lolaswift commented 5 years ago

@jordanpurinton promise-7.0.4.min.js.map error had something to do with the google maps plugin in my case. both googlemaps plugin and admob free installed promise-7.0.4.min.js.map. Some conflicts happened during the build process. I tried to duplicate one of my old project which has googlemap plugin 2.3.6 and admob free 0.17.2 and replace the src file with my new project. The errors were gone. I was pretty happy but not for long, because I needed to reinstall the googlemaps plugin 2.3.6 to use a different apikey and that failed.

lolaswift commented 5 years ago

@jordanpurinton I just update the issue description. It turned out to be plugin conflicts in my case.

jordanpurinton commented 5 years ago

Damn, so it sounds like we're just playing the wait and see game until the plugin author responds? Because I use Google Maps as well, so that would make sense as to why we're having the same error.

It's nice that you found a work around, but I wish we could find a solution that requires less hacking 😉

ratson commented 5 years ago

@jordanpurinton You don't need to wait, you could always PR a fix.

jordanpurinton commented 5 years ago

I mean, I'd love to, I just can't afford the time to do so. I've noticed in the repo there have been reports of this issue in the past, did you ever find a viable workaround, @ratson ?

t-roymyers commented 5 years ago

I have the same issue as well and also use the googlemaps.