1
votes

I just update my Visual studio 2015 with the last Cordova Tools. I update Cordova to 5.4.0 and try with cordova-android 4.1.1 and 5.0.0

My error is when I try to make a post request to my webService (CORS):

http://ws.MyService.be/PostBug.axd

Here's the response on my Android device:

Request URL:http://ws.MyService.be/PostBug.axd
Request Method:POST
Status Code:404 Not Found (from cache)
Response Headers
Client-Via:shouldInterceptRequest
Request Headers
Provisional headers are shown
Accept:application/json, text/plain, */*
Cache-Control:no-store, no-cache, must-revalidate
Content-Type:application/json
Origin:file://
User-Agent:Mozilla/5.0 (Linux; Android 5.0; SM-G900F Build/LRX21T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/46.0.2490.76 Mobile Safari/537.36

In config.xml:

<access origin="*" />
<allow-navigation href="http://*.infotec.be/*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />

In index.html:

<meta http-equiv="Content-Security-Policy" content="default-src 'self' http://ws.MyService.be http://www.infotec.be https://push.ionic.io data: gap: maps.googleapis.com maps.gstatic.com https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *;script-src 'self' 'unsafe-eval' 'unsafe-inline';">

cordova-plugin-whitelist is installed version 1.0.0

I don't have any idea about how to fix this. I just try to make a

cordova platform update [email protected]

But even with android 4.1.1 I get this error The code and the service didn't change, only version of cordova and all change. And Visual studio updated

Edit:

I have access with postman on the service.

I just update to cordova-plugin-whitelist 1.1.1-dev.

After rebuild my app, I have now net::ERR_CACHE_MISS on all http request and all are (failed) status ... No HTTP response (body or header)

1
Can you hit the service by some other means? Does your server need cache refreshed? I wonder if this has more to do with server cache, then your Cordova updates.Steve Kennedy
@SteveKennedy I update my answer. I have access to service via postman and the service get post data to insert it into Database. So there are no cacheJerome2606
@Jerome2606 I have the same issue. Downgraded to Crodova 5.3.3 does not seems to solve this one. Did you downgraded Cordova Android as well?oak

1 Answers

1
votes

Cordova 5.4 has numerous problems and incompatibilities with visual studio and Windows. I recommend rolling back to 5.3 until the Cordova community releases a version that works with Windows scenarios.

We normally rev the default version of Cordova that we target in visual studio when we ship updates, but we will be skipping 5.4 because of the issues.

(Disclosure: I work on the tools for Apache Cordova in visual studio at Microsoft)