Ich habe eine Ionic 3-Anwendung, die die gleiche API wie meine früheren ionischen Anwendungen verwendet.Antwort mit Status 0 für URL: null
Anmeldung Ich habe jetzt die folgende Störung erhalte:
Response with status: 0 for URL: null
ich mich umsah habe und jeder hält an Server Ende mit einem CORS Problem Bezug genommen wird, kann dies nicht der Fall sein, wie meine API gearbeitet bisher und noch immer auf bestehenden Anwendungen.
Hier ist mein Login:
login(credentials) {
return new Promise((resolve, reject) => {
this.http.post(this.global.base() + 'login', JSON.stringify(credentials), { headers: this.contentHeader })
.subscribe(res => {
resolve(res.json());
}, (err) => {
reject(err);
});
});
}
Meine xml config (für Darstellung getrimmt):
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
<plugin name="cordova-sms-plugin" spec="^0.1.11" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<engine name="ios" spec="~4.4.0" />
Meine index.html:
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#4e8ef7">
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
Mein Setup:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.14.0
ionic (Ionic CLI) : 3.14.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 3.0.1
Cordova Platforms : ios 4.4.0
Ionic Framework : ionic-angular 3.7.1
System:
ios-deploy : 1.9.2
Node : v7.7.1
npm : 4.1.2
OS : macOS Sierra
Xcode : Xcode 9.0.1 Build version 9A1004
Misc:
backend : legacy
Kann mir jemand in die richtige Richtung zeigen?