I migrated my Ionic v3 project to Ionic v4 (4.2.0). Everything works fine with ionic serve
, but when I run the app on an Android device I get the following error from polyfills.js on the console of the device:
Fetch API cannot load file:///android_asset/www/svg/md-arrow-down.svg. URL scheme “file” is not supported.
Am I missing something in the setup? Do I need to use the cordova-plugin-ionic-webview ?
Best regard,
Ralf
Hi did you see these topics?
opened 06:02PM - 21 May 18 UTC
closed 03:37PM - 12 Jul 18 UTC
triage
# Bug Report
**Ionic Info**
```
@ionic/cli-utils : 2.0.0-rc.6
ionic… (Ionic CLI) : 4.0.0-rc.6
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@angular-devkit/core : 0.6.0
@angular-devkit/schematics : 0.6.0
@angular/cli : 6.0.1
@ionic/schematics-angular : 1.0.0-rc.5
Cordova Platforms : android 7.1.0
Ionic Framework : @ionic/angular 4.0.0-alpha.7
```
**Describe the Bug**
The ionicons are not shown on Android when using Ionic 4 (and so Iconicons 4.x). In console you can see the error message: "Fetch API cannot load file:///android_asset/www/svg/md-arrow-forward.svg. URL scheme "file" is not supported."
**Steps to Reproduce / Related Code**
Just use the Ionic Conference App (Branch: core-update - https://github.com/ionic-team/ionic-conference-app) let it run on Android (ionic cordova run android)
**Expected Behavior**
THe icons should show
opened 04:01PM - 15 Oct 18 UTC
closed 09:48AM - 16 Oct 18 UTC
triage
Hello guys,
Ion icon svg folder is missing in android devices and by conseque… nce it does not show any ion icons.
After the build the svg folder can be found in the platform "www" but when remote debugging with the browser that svg folder does not appear and i get this error
> Fetch API cannot load file:///android_asset/www/svg/md-arrow-round-back.svg. URL scheme "file" is not supported.
<img width="838" alt="captura de ecra 2018-10-15 as 16 54 25" src="https://user-images.githubusercontent.com/4041944/46962493-360b0400-d09b-11e8-9e8a-41c8d341d56e.png">
Missing in sources:
<img width="271" alt="captura de ecra 2018-10-15 as 16 59 50" src="https://user-images.githubusercontent.com/4041944/46962741-cba69380-d09b-11e8-9fd4-92bbf6ae4b7a.png">
what's happening in here? Help ;)
This is only happening in android
> Ionic:
>
> ionic (Ionic CLI) : 4.2.1 (/usr/local/lib/node_modules/ionic)
> Ionic Framework : @ionic/angular 4.0.0-beta.7
> @angular-devkit/build-angular : 0.7.5
> @angular-devkit/schematics : 0.7.5
> @angular/cli : 6.1.5
> @ionic/angular-toolkit : not installed
>
> Cordova:
>
> cordova (Cordova CLI) : 7.1.0
> Cordova Platforms : android 6.3.0, ios 4.5.5
> Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, (and 5 other plugins)
>
> System:
>
> ios-deploy : 2.0.0
> NodeJS : v10.10.0 (/usr/local/Cellar/node/10.10.0/bin/node)
> npm : 6.4.1
> OS : macOS High Sierra
> Xcode : Xcode 9.4.1 Build version 9F2000
They seem to have the same problem.
cld
Yes, I think I read nearly every post regarding this problem. But almost every post is from last year and is referencing beta or RC versions.
I was wondering if no one else has these problems with the current version. The config of my project is taken from a fresh generated project with Ionic CLI. So I would expect that it must run “out of the box”. Not only in the simulation in the browser.
Using cordova-plugin-ionic-webview solved this for me.
1 Like
generate platform android with version >= 7.0.0
ionic cordova platform add android@7.0.0