ionic-team / cordova-plugin-ionic-webview

Web View plugin for Cordova, specialized for Ionic apps.
Apache License 2.0
485 stars 393 forks source link

Failed to load resource: Preflight response is not successful #83

Open JohnD0580 opened 6 years ago

JohnD0580 commented 6 years ago

XMLHttpRequest cannot load file:///var/containers/Bundle/Application/CCFD6532-EFE8-46B4-8583-92B73867EADA/My%20n%20Test.app/www/login-new-account.html. Preflight response is not successful

It works fine in the emulator in XCode but not on the iPhone device itself:

The file:///var/containers/Bundle/Application/CCFD6532-EFE8-46B4-8583-92B73867EADA prefix is added by Cordova itself, i read somewhere the removing the file:// helps but i have no idea where to do that. I don't use ionic by the way, i use Cordova with Framework7

Cordova version: 8.0.0

Cordova plugins: code-push 2.0.4 "CodePushAcquisition" cordova-plugin-code-push 1.11.7 "CodePush" cordova-plugin-compat 1.2.0 "Compat" cordova-plugin-device 2.0.1 "Device" cordova-plugin-dialogs 2.0.1 "Notification" cordova-plugin-file 4.3.3 "File" cordova-plugin-file-transfer 1.6.3 "File Transfer" cordova-plugin-inappbrowser 2.0.2 "InAppBrowser" cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova-plugin-x-socialsharing 5.3.2 "SocialSharing" cordova-plugin-zip 3.1.0 "cordova-plugin-zip" es6-promise-plugin 4.2.2 "Promise" pushwoosh-cordova-plugin 7.3 "Pushwoosh"

diegodotta commented 6 years ago

I'm tracking some similar errors in production. HttpRequest error not finding local files. Some files for the router and other main files. I checked that some cases the users aren't even seeing the problem, but few cases probably are preventing them to use.

95% of the cases are iOS.

Cordova: 6.5.0

cc.fovea.cordova.purchase 6.0.0 "Purchase" com.bunkerpalace.cordova.YoutubeVideoPlayer 1.0.5 "CordovaYoutubeVideoPlayer" cordova-android-support-gradle-release 1.2.0 "cordova-android-support-gradle-release" cordova-custom-config 3.3.0 "cordova-custom-config" cordova-plugin-app-event 1.2.0 "Application Events" cordova-plugin-appavailability 0.4.2 "AppAvailability" cordova-plugin-compat 1.2.0 "Compat" cordova-plugin-console 1.0.5 "Console" cordova-plugin-device 1.1.5 "Device" cordova-plugin-file 4.3.0 "File" cordova-plugin-google-analytics 1.6.0 "Google Universal Analytics Plugin" cordova-plugin-health 1.0.4 "Cordova Health" cordova-plugin-inappbrowser 1.5.0 "InAppBrowser" cordova-plugin-nativestorage 2.2.2 "NativeStorage" cordova-plugin-network-information 1.3.0 "Network Information" cordova-plugin-statusbar 2.2.3 "StatusBar" cordova-plugin-whitelist 1.3.0 "Whitelist" cordova-plugin-wkwebview-engine 1.1.6 "Cordova WKWebView Engine" cordova-plugin-x-socialsharing 5.1.6 "SocialSharing" es6-promise-plugin 4.1.0 "Promise" ionic-plugin-keyboard 2.2.1 "Keyboard" phonegap-plugin-push 1.10.5 "PushPlugin"