You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
When I want to navigate in my IONIC 1 app (using angularjs), I get this error:
Failed to load webpage with error: unsupported URL
During debug mode, I saw this error comes from didFailNavigation function in CDVWKWebViewEngine+CodePush.m file:
CDVViewController* vc = (CDVViewController*)self.viewController;
NSString* message = [NSString stringWithFormat:@"Failed to load webpage with error: %@", [error localizedDescription]]; <-- HERE
Display local images failure
I get also this error to display local images. I think it's always a malformed URL issue... Caused by CORS ? I don't know...
Possible track
I think this problem is in relation with cordova-plugin-ionic-webview.
Indeed, this plugin uses WKWebView on iOS and I could see there are many issues between cordova-plugin-code-push and WKWebView... But I'm not sure it comes from it...
Please note all works fine on Android. Therefore I think these issues caused by WKWebView on iOS.
Does this reproduce on a debug build or release build? debug and release build. Note works fine when I add livereload option to launch my app using this following command line : ionic cordova run ios. Please note also works fine on a browser using this following command line : ionic serve.
livereload : spin up dev server to live-reload www files
Does this reproduce on a simulator, or only on a physical device? ios simulator from xcode
SOLVED :
Sorry for this inconvenience, I think my problem is caused by cordova-plugin-ionic-webview rather than cordova-plugin-code-push.
Add this in .config() in app.js worked for me:
// fix "Failed to load webpage with error: unsupported URL"
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|sms|tel|geo|ftp|mailto|file|ghttps?|ms-appx-web|ms-appx|x-wmapp0|ionic):/);
// sanitize the images to open ionic://localhost/ on iOS
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|content|blob|ms-appx|ms-appx-web|x-wmapp0|ionic):|data:image\//);
Necessary to add ionic keyword because it's the default scheme used on iOS as it's mentioned in this this part
The text was updated successfully, but these errors were encountered:
JordanProtin
changed the title
iOS : Failed to load webpage with error: unsupported URL
iOS : Failed to load webpage with error: unsupported URL & Failed to display local images
Aug 21, 2019
Description
Navigation failure
When I want to navigate in my IONIC 1 app (using angularjs), I get this error:
During debug mode, I saw this error comes from
didFailNavigation
function in CDVWKWebViewEngine+CodePush.m file:Display local images failure
I get also this error to display local images. I think it's always a malformed URL issue... Caused by CORS ? I don't know...
Possible track
I think this problem is in relation with cordova-plugin-ionic-webview.
Indeed, this plugin uses WKWebView on iOS and I could see there are many issues between cordova-plugin-code-push and WKWebView... But I'm not sure it comes from it...
Please note all works fine on Android. Therefore I think these issues caused by WKWebView on iOS.
Reproduction
My nav link:
When I tap on this link to display another template, I get this error:
My local image:
Image is not displayed on my view...
Additional Information
cordova-plugin-ionic-webview: ^4.1.1
livereload
option to launch my app using this following command line :ionic cordova run ios
. Please note also works fine on a browser using this following command line :ionic serve
.SOLVED :
Sorry for this inconvenience, I think my problem is caused by cordova-plugin-ionic-webview rather than cordova-plugin-code-push.
Add this in .config() in app.js worked for me:
The text was updated successfully, but these errors were encountered: