Ionic http.request ERR_UNKNOWN_URL_SCHEME


I am developing a simple android app using Ionic Framework where at some point I’m using this.http.get('').

Testing locally with ionic serve everything works, but on device it fails to load.

On the debug log the message is net::ERR_UNKNOWN_URL_SCHEME and I believe its because the protocol is being changed from https:// to intent:// and I don’t know why.

My code is:


and the error is:

GET intent://



I suspect you might have a missing access origin setting in your config.xml???

Something like…

<access origin="*" />

Will allow everything - then you can restrict after that if required.


No, it is there.

I have also (re)installed cordova-plugin-whitelist and added the lines bellow to AndroidManifest.xml, but nothing seems to fix it.

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

Is it the expected behavior? Does the framework replaces http:// with intent://?


What “device” are you talking about? What platform?

Did you remote debug the problem on the device already?
Follow these instructions here to debug the problem in Safari dev tools:
Follow these instructions here to debug the problem in Chrome dev tools:
Look at the console and network tabs for errors.


I’m curious whether we’re dealing with the ordinary Angular Http or the native HTTP here.


@Sujan12, I’m testing in an Android device.
And, yes. I got the error net::ERR_UNKNOWN_URL_SCHEME debugging from chrome device inspector.

@rapropos, I’m using Angular http:

import { Http, Request, RequestMethod } from '@angular/http';


So you put in http://... and it then loads something starting with intent://... - that looks like Android being smart and opening the app connected to that domain.

Here is a way to handle this natively:

Maybe this gives you a new idea.