3 Replies Latest reply on Feb 15, 2017 1:21 PM by kerrishotts

    Another vicim of ajax 404 issue



      • I am quite new to PhoneGap.
      • I use PG desktop app (Mac) and PhoneGap cloud build.
      • I do not have the whole Cordova suit installed locally. But since I am not building the app locally I am guessing I don't need it
      • I came across the same issue reported by several other people in the discussion board. I tried all of them without success
        • Many responses in discussion forums suggest to install the whitelist plugin. In my case that is not possible because I use the cloud build


      The issue:

      I am trying to make an external AJAX request from my index.html page and getting HTTP 404 error. The symptoms are similar to what is described in Ajax readyState 4 status 404 statustext error , but in my case it doesn't work in either cases. Please don't assume that the URL is incorrect. It works if I use regular browser (served by PG app)


      Note that the URL is external (an internet site) and the protocol is HTTPS


      My configuration (relevant)

      In config.xml

      <plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" />

      <access origin="*" />

      <allow-intent href="*" />

      <allow-navigation href="*" />

      <gap:plugin name="cordova-plugin-whitelist" source="npm" />


      In index.html

      <meta http-equiv="Content-Security-Policy" content="default-src * gap: ws: https://ssl.gstatic.com;img-src * data: content:;style-src * 'unsafe-inline' data: blob:;script-src * 'unsafe-inline' 'unsafe-eval' data: blob:;">


      Honestly, I spend last two days trying out different options. Any help would be greatly appreciated.




      [Mod note]: From dup Ajax 404 issue :


      In addition to what I have mentioned in that post,

      • I am testing it using PhoneGap app on IoS platform
      • I verified that it is not an issue with the server certificate(for HTTPS). The same issue happens even if the protocol is HTTP.


      Message was edited by: Kerri Shotts