Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13697

Android Production Release APK Won't Load Web-hosted JS and CSS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • cordova-android-7.0.0
    • cordova-android-7.0.0
    • cordova-android
    • Cordova version 8.0.0, Tested on Nexus 6P, Android 8.1.0 and several GenyMotion Virtual Machines (Android v4.x - 7.x.)

    Description

      So when I test this locally from "cordova run android --device" everything works fine. But when I build a signed release and deploy on the Google Play Developer console, externally loaded JS and CSS files do not load (see screenshot).

      <link rel="stylesheet" href="https://app.winetracker.co/dist/application.min.20171213v2.css">
      <script src="https://app.winetracker.co/dist/thirdparties.min.20171213v2.js"></script>
      <script src="https://app.winetracker.co/dist/application.min.20171213v2.js"></script>

      Here's my config.xml file:

      <?xml version='1.0' encoding='utf-8'?>
      <widget id="com.winetrackerco.app" version="1.0.14" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
      <name>Winetracker.co</name>
      <description>
      The ultimate app for wine tasting.
      </description>
      <author email="tony@winetracker.co" href="http://www.winetracker.co">
      Winetracker.co
      </author>
      <content src="index-production.html" />
      <access origin="*" />
      <allow-navigation href="://.c9users.io/*" />
      <allow-navigation href="://.winetracker.co/*" />
      <allow-navigation href="https://.stripe.com/" />
      <allow-navigation href="https://.mxpnl.com/" />
      <allow-navigation href="https://winetrackerco.imgix.net/*" />
      <allow-intent href="http:///" />
      <allow-intent href="https:///" />
      <allow-intent href="tel:*" />
      <allow-intent href="sms:*" />
      <allow-intent href="mailto:*" />
      <allow-intent href="geo:*" />
      <access origin="*" />
      <platform name="android">
      <allow-intent href="market:*" />
      <icon density="ldpi" src="res/icon/android/ldpi.png" />
      <icon density="mdpi" src="res/icon/android/mdpi.png" />
      <icon density="hdpi" src="res/icon/android/hdpi.png" />
      <icon density="xhdpi" src="res/icon/android/xhdpi.png" />
      <icon density="xxhdpi" src="res/icon/android/xxhdpi.png" />
      <icon density="xxxhdpi" src="res/icon/android/xxxhdpi.png" />
      <splash density="land-hdpi" src="res/screen/android/land-hdpi.png" />
      <splash density="land-ldpi" src="res/screen/android/land-ldpi.png" />
      <splash density="land-mdpi" src="res/screen/android/land-mdpi.png" />
      <splash density="land-xhdpi" src="res/screen/android/land-xhdpi.png" />
      <splash density="port-hdpi" src="res/screen/android/port-hdpi.png" />
      <splash density="port-ldpi" src="res/screen/android/port-ldpi.png" />
      <splash density="port-mdpi" src="res/screen/android/port-mdpi.png" />
      <splash density="port-xhdpi" src="res/screen/android/port-xhdpi.png" />
      </platform>
      <platform name="ios">
      <allow-intent href="itms:*" />
      <allow-intent href="itms-apps:*" />
      <icon height="180" src="res/icon/ios/icon-60@3x.jpg" width="180" />
      <icon height="60" src="res/icon/ios/icon-60.jpg" width="60" />
      <icon height="120" src="res/icon/ios/icon-60@2x.jpg" width="120" />
      <icon height="76" src="res/icon/ios/icon-76.jpg" width="76" />
      <icon height="152" src="res/icon/ios/icon-76@2x.jpg" width="152" />
      <icon height="40" src="res/icon/ios/icon-40.jpg" width="40" />
      <icon height="80" src="res/icon/ios/icon-40@2x.jpg" width="80" />
      <icon height="57" src="res/icon/ios/icon.jpg" width="57" />
      <icon height="114" src="res/icon/ios/icon@2x.jpg" width="114" />
      <icon height="72" src="res/icon/ios/icon-72.jpg" width="72" />
      <icon height="144" src="res/icon/ios/icon-72@2x.jpg" width="144" />
      <icon height="167" src="res/icon/ios/icon-167.jpg" width="167" />
      <icon height="29" src="res/icon/ios/icon-small.jpg" width="29" />
      <icon height="58" src="res/icon/ios/icon-small@2x.jpg" width="58" />
      <icon height="50" src="res/icon/ios/icon-50.jpg" width="50" />
      <icon height="100" src="res/icon/ios/icon-50@2x.jpg" width="100" />
      <icon height="167" src="res/icon/ios/icon-83.5@2x.jpg" width="167" />
      <splash src="res/screen/ios/Default@2x~universal~anyany.png" />
      <splash src="res/screen/ios/Default@2x~universal~comany.png" />
      <splash src="res/screen/ios/Default@2x~universal~comcom.png" />
      <splash src="res/screen/ios/Default@3x~universal~anyany.png" />
      <splash src="res/screen/ios/Default@3x~universal~anycom.png" />
      <splash src="res/screen/ios/Default@3x~universal~comany.png" />
      </platform>
      <preference name="SplashScreenDelay" value="10000" />
      <preference name="SplashMaintainAspectRatio" value="true" />
      <preference name="StatusBarOverlaysWebView" value="false" />
      <preference name="StatusBarBackgroundColor" value="#302716" />
      <preference name="StatusBarStyle" value="lightcontent" />
      <preference name="AndroidPersistentFileLocation" value="Compatibility" />
      <preference name="DisallowOverscroll" value="true" />
      <preference name="AndroidLaunchMode" value="singleInstance" />
      <key>UILaunchStoryboardName</key>
      <string>CDVLaunchScreen</string>
      <universal-links>
      <ios-team-id value="XQ4PW98WDH" />
      <host name="app.winetracker.co" scheme="https">
      <path event="ul_openGroupTasting" url="/#!/broadcast/*" />
      </host>
      <host name="winetrackerco-tonejac.c9users.io" scheme="https">
      <path event="ul_openGroupTasting" url="/#!/broadcast/*" />
      </host>
      </universal-links>
      <edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
      <string>Winetracker.co needs access to your camera to upload the photo of your wine label.</string>
      </edit-config>
      <edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
      <string>Winetracker.co needs access to your Photo Library so you can select a photo of your wine label.</string>
      </edit-config>
      <plugin name="cordova-plugin-statusbar" spec="^2.3.0" />
      <plugin name="cordova-plugin-dialogs" spec="^1.3.4" />
      <plugin name="cordova-plugin-network-information" spec="^1.3.4" />
      <plugin name="cordova-plugin-camera" spec="^3.0.0">
      <variable name="CAMERA_USAGE_DESCRIPTION" value=" " />
      <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value=" " />
      </plugin>
      <plugin name="cordova-plugin-splashscreen" spec="^4.1.0" />
      <plugin name="cordova-plugin-ios-camera-permissions" spec="^1.2.0">
      <variable name="CAMERA_USAGE_DESCRIPTION" value="This app needs camera access" />
      <variable name="MICROPHONE_USAGE_DESCRIPTION" value="This app needs microphone access" />
      <variable name="PHOTOLIBRARY_ADD_USAGE_DESCRIPTION" value="This app needs write-access to photo library" />
      <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="This app needs read/write-access photo library access" />
      </plugin>
      <plugin name="cordova-plugin-file" spec="^5.0.0" />
      <plugin name="cordova-plugin-device" spec="^1.1.7" />
      <plugin name="cordova-plugin-x-socialsharing" spec="^5.2.1" />
      <plugin name="cordova-plugin-customurlscheme" spec="^4.3.0">
      <variable name="URL_SCHEME" value="winetrackerco" />
      <variable name="ANDROID_SCHEME" value=" " />
      <variable name="ANDROID_HOST" value=" " />
      <variable name="ANDROID_PATHPREFIX" value="/" />
      </plugin>
      <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
      <engine name="ios" spec="^4.5.4" />
      <engine name="android" spec="^7.0.0" />
      </widget>

      Am I missing something in my config.xml file? Is this a problem with Cordovoa 8.0.0? Do I need to do some additional configuration with AndroidManifest.xml?

      Please advise. I'm stumped.

      Attachments

        1. screenshots.jpg
          514 kB
          Tony Jacobson

        Activity

          People

            bowserj Joey Robert Bowser
            tonejac Tony Jacobson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified