Google denies app due to wrongly(?) labeling it as Cordova version < 3.5.1

Hi guys!

I’m building my first Cordova based app (Ionic Framework v1). The app has now been in beta at Google Play for a couple of weeks, receiving 4 updates, without problem.

After transferring the apps code to my new computer I haven’t been able to publish updates to the apps. The reason, according to Google, is that the apps Cordova version is below 3.5.1.

However - I can’t find ANY sign of my Cordova version being lower than 3.5.1.

When i run “cordova platform version android” in my Ionic project, I get the following result: Installed platforms: android 5.2.2
When I output Cordova version from Cordova device plugin, when the app is running on my phone, I get the same response: 5.2.2.

I’ve tried removing platforms/, running ionic platform add android again, rebuilding and submitting. Cordova on my computer still says the projects version is 5.2.2. Cordova device on the phone agrees…and Google still thinks the app is running Cordova < 3.5.1.

Has anyone else had these type of Cordova version problems with Google Play? How do I get around this so I can start pushing updates? Weeks of work is laying around unpublished and the answers I get from Google Play’s support look like they could have been written by a robot. (copy paste of some lame text that pretty much just says that my Cordova version is < 3.5.1)

Please, please help me out, Ionic Community!

Hmm, odd. Can you provide a list of the plugins that you use?

Also, have you tried emailing the app store back? You can get more information from them and provide more info. It could just be a mistake.

Thanks for your quick reply, @mhartington!

The project uses the following plugins:

cordova-plugin-actionsheet 2.2.2 "ActionSheet"
cordova-plugin-camera 2.2.0 "Camera"
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-facebook4 1.7.2 "Facebook Connect"
cordova-plugin-geolocation 2.2.0 "Geolocation"
cordova-plugin-googlemaps 1.3.9 "phonegap-googlemaps-plugin"
cordova-plugin-inappbrowser 1.4.1-dev "InAppBrowser"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-whitelist 1.2.2 "Whitelist"
cordova-plugin-x-socialsharing 5.1.2 "SocialSharing" 3.1.2 "Launch Navigator"

Rather many… Could it be that a plugin somehow uses another version of Cordova than the rest of the project?

I replied to Google Play two days ago and I’m still awaiting an answer. I’ll keep you guys updated on my correspondence with Google.

In the mean time I greatly appreciate any guess / tips I can get to try to resolve this issue.

Are you manually loading a cordova.js in your app?

Don’t expect a proper response from Google, their customer support is not the best.


Thanks for your reply Chris - it’s really important for us to be able to update this app that we’ve put so much work into. All help is more than welcome!

We double checked how we load cordova.js, and it appears to be the normal way. In the of our index.html there’s a cordova.js include. The file doesn’t exist in the www-folder, but it exists in the built www-folder (and therefore in the actual app) after being built.
I’ve double checked the content of the cordova.js file, and it says var PLATFORM_VERSION_BUILD_LABEL = '5.2.2'; on line 22.

These are all the includes done in the header:

    <script src="lib/ionic/js/ionic.bundle.js"></script>
    <script src=",geometry&amp;sensor=false"></script>
    <script src="lib/ngCordova/dist/ng-cordova.js"></script>
    <!-- cordova script (this will be a 404 during development) -->
    <script src="cordova.js"></script>

    <script src="js/tabSlideBox.js"></script>
    <script src="js/moment.min.js"></script>
    <script src="js/app.js"></script><link href="tabSlideBox.css" rel="stylesheet">
    <script src="tabSlideBox.js"></script>
    <script src="js/controllers.js"></script>
    <script src="js/services.js"></script>
    <script src="js/ion-place-autocomplete.js"></script>

That should be the correct way of including cordova.js in an Ionic project, right?

I found some interesting notes on Stackoverflow, from people with similar experiences!

They explain an instance of unused cordova.js files hidden “deep in subfolders”, eventually leading to Google’s automatic search for Cordova version failing. After a grep command I could find that the plugin used for Facebook authentication (phonegap-facebook-plugin) had a cordova.js file in it’s folder for platform browser…that for some reason also gets built into the Android version.

www/lib/phonegap-facebook-plugin/platforms/browser/platform_www/cordova.js:var PLATFORM_VERSION_BUILD_LABEL = '3.6.0';
platforms/android/build/intermediates/assets/debug/www/lib/phonegap-facebook-plugin/platforms/browser/www/cordova.js:var PLATFORM_VERSION_BUILD_LABEL = '3.6.0';

This says version 3.6.0, which is not lower than 3.5.1, but it might be the reason for why Google denies the app…it’s worth a try.

We’ve now removed it along with all the other platform browser files for the phonegap-facebook-plugin like this:
$ rm -rf www/lib/phonegap-facebook-plugin/platforms/browser/*

A new app is built, signed, aligned and sent to Google Play. I really hope they accept it this time. If it fails for the same weird reason, could any of you guys take a look at it? (after signing an NDA, the project is being developed for a third party) Would be most appreciated!

If anyone has any other ideas for why Google might be denying the app - please come with your ideas. All ideas that help us solve this problem are greatly appreciated!