title: Cordova 8.0.0 Ajax error
body: <p>I know, that there are more topics about this and I got through them, but nothing worked, so that is why I am writing the new one:</p>
  
  <p>I am trying to create AJAX read request on Android platform (but iOS is planed too).
  Every try ends up with some error.</p>
  
  <p>What I have done:</p>
  
  <p><strong>1)</strong> I have cordova whitelist plugin installed (comes with cordova installation)</p>
  
  <p><strong>2)</strong> I have various definitions in config.xml, last definition of each type (access, allow-intent, allow navigation) is set to * for testing purposes</p>
  
  <p><strong>3)</strong> I have (I think) all allow access definitions in \platforms\android\app\src\main\AndroidManifest.xml</p>
  
  <p><strong>4)</strong> I have tried various html meta tags</p>
  
  <p><strong>5)</strong> I have tried removig and re-adding android platform</p>
  
  <p><strong>6)</strong> I have tried to restart mobile device</p>
  
  <p><strong>7)</strong> I have tried mobile data, wifi, even both of them</p>
  
  <p><strong>8)</strong> ajax request is over http, not https</p>
  
  <p><strong>9)</strong> ajax request is in linked testAjax.js in <code>$(document).ready(...)</code></p>
  
  <p>About theese meta tags:</p>
  
  <pre><code> &lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' *"&gt;
  </code></pre>
  
  <p>gets
  <a href="https://i.stack.imgur.com/OuY6e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OuY6e.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;!-- This policy allows everything (eg CSS, AJAX, object, frame, media, etc) except that 
      * CSS only from the same origin and inline styles,
      * scripts only from the same origin and inline styles, and eval()
  --&gt;
  &lt;meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'"&gt;
  </code></pre>
  
  <p>gets the same as above.</p>
  
  <pre><code>&lt;!-- Good default declaration:
      * gap: is required only on iOS (when using UIWebView) and is needed for JS-&gt;native communication
      * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
      * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
          * Enable inline JS: add 'unsafe-inline' to default-src
          * Enable eval(): add 'unsafe-eval' to default-src
  --&gt;
  &lt;meta http-equiv="Content-Security-Policy" content="default-src 'unsafe-inline' 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *"&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/5a7gG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5a7gG.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' http://mytestdomain.com data: gap: https://ssl.gstatic.com 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; connect-src *"&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/2LMXE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2LMXE.png" alt="enter image description here"></a></p>
  
  <p>I tried quite a few more, but there is always one of theese 3 errors</p>
  
  <p>Also, here is my config.xml:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;widget id="com.TG.app" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
      &lt;name&gt;TG&lt;/name&gt;
      &lt;description&gt;
          A sample Apache Cordova application that responds to the deviceready event.
      &lt;/description&gt;
      &lt;author email="dev@cordova.apache.org" href="http://cordova.io"&gt;
          Apache Cordova Team
      &lt;/author&gt;
      &lt;content src="index.html" /&gt;
      &lt;access origin="http://mytestdomain.com" /&gt;
      &lt;access origin="http://mytestdomain.com/*" /&gt;
      &lt;access origin="*" /&gt;
      &lt;allow-intent href="http://*/*" /&gt;
      &lt;allow-intent href="https://*/*" /&gt;
      &lt;allow-intent href="tel:*" /&gt;
      &lt;allow-intent href="sms:*" /&gt;
      &lt;allow-intent href="mailto:*" /&gt;
      &lt;allow-intent href="geo:*" /&gt;
      &lt;allow-intent href="gap:*" /&gt;
      &lt;allow-intent href="*" /&gt;
      &lt;allow-navigation href="http://*/*" /&gt;
      &lt;allow-navigation href="https://*/*" /&gt;
      &lt;allow-navigation href="data:*" /&gt;
      &lt;allow-navigation href="http://mytestdomain.com" /&gt;
      &lt;allow-navigation href="*" /&gt;
      &lt;platform name="android"&gt;
          &lt;allow-intent href="market:*" /&gt;
      &lt;/platform&gt;
      &lt;platform name="ios"&gt;
          &lt;allow-intent href="itms:*" /&gt;
          &lt;allow-intent href="itms-apps:*" /&gt;
      &lt;/platform&gt;
      &lt;plugin name="cordova-plugin-googlemaps" spec="^2.2.5"&gt;
          &lt;variable name="API_KEY_FOR_ANDROID" value="mykey" /&gt;
          &lt;variable name="API_KEY_FOR_IOS" value="mykey" /&gt;
          &lt;variable name="PLAY_SERVICES_VERSION" value="11.8.0" /&gt;
          &lt;variable name="ANDROID_SUPPORT_V4_VERSION" value="24.1.0" /&gt;
      &lt;/plugin&gt;
      &lt;preference name="Orientation" value="portrait" /&gt;
      &lt;plugin name="cordova-plugin-whitelist" spec="^1.3.3" /&gt;
      &lt;engine name="browser" spec="^5.0.3" /&gt;
      &lt;engine name="android" spec="^7.0.0" /&gt;
  &lt;/widget&gt;
  </code></pre>
  
  <p>In Android manifest I have</p>
  
  <pre><code>    &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
  </code></pre>
  
  <p>So any idea, what is wrong here and how to make it working? (Even if everything will be open, security is not a question here, I just need to make it work in any way)</p>
  
  <p>Thanks in advance :) </p>