cordova-plugin-wkwebview-engine icon indicating copy to clipboard operation
cordova-plugin-wkwebview-engine copied to clipboard

Http failure response for (unknown url): 0 Unknown Error

Open gerokeller opened this issue 7 years ago • 1 comments

Hi,

I'm trying to make an http post request with the @angular/[email protected] client.

The server is configured like this:

Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE

The specific resource that I'm trying to access doesn't support POST though, so it errors with 405 Method Not Allowed. Instead of receiving a HttpErrorResponse with a status of 405, I'm getting this:

{
  "headers": {
    "normalizedNames": {},
    "lazyUpdate": null,
    "headers": {}
  },
  "status": 0,
  "statusText": "Unknown Error",
  "url": null,
  "ok": false,
  "name": "HttpErrorResponse",
  "message": "Http failure response for (unknown url): 0 Unknown Error",
  "error": {
    "isTrusted": true
  }
}

This only happens on iOS with WKWebView enabled.

Is this expected behaviour? Shouldn't the status at least be 405? Why is url null?

gerokeller avatar Nov 21 '17 18:11 gerokeller

Have you found any solution ? I am facing same issue more than 3 days spending to resolve it

Piraban avatar Jan 17 '18 17:01 Piraban