Ionic 2+ ERR_UNKNOWN_URL_SCHEME

Hi there

I am trying the Auth0 integration but am having some technical issues, could you please point me in the right direction as to how I could move forward.

I am basically building an Ionic 2+ app and am trying to authenticate using Auth0. The authentication is for Azure and I am using your docs : https://manage.auth0.com/#/clients/qyWNXnyHsFX3BgSiPIQzA88JER0Qvw4z/quickstart.

Currently I are testing via physical device and emulator:
1). I get the app to open the inappbrowser
2). Takes me to the microsoft login page
Then I get an error saying “safari cannot open the page because the address is invalid” I have checked that the callback url to match the docs as well as replacing the package id (YOUR_PACKAGE_ID://dhameergovindeoh.auth0.com/cordova/YOUR_PACKAGE_ID/callback)
I have attached a couple screenshots of the process

Any assistance will greatly be appreciated
Thanks

![alt text

![alt text][1]

Ok turns out I had to reinstall the urlscheme plugin…
:frowning:

You got this? I’m have same problem.

Hi, same here.

@dhameer.govind how did you exactly re-install the urlscheme plugin to make it work? I tried to remove it and add it again, but same problem…

Thanks in advance

EDIT: actually, for me it’s working on iPhone simulator, but not on both Android emulator and Android device

![unknown url scheme][1]

Hey guys, make sure YOUR_PACKAGE_ID is in lowercase. The cordova url scheme plugin requires that and will create the ERR_UNKNOWN_URL_SCHEME error above.

Al

@admin16
Hi! I have the same issue when I was trying to login into auth0 client on both android emulator and android device.
![alt text][1]

At the same moment I can perform login into auth0 client on iOS emulator.

As a start point I get ionic2 sample auth0 application.
@admin16
PS Also I could not make login page opened on android after I made steps from tutorial. I had to install plugin ionic cordova plugin add cordova-plugin-inappbrowser, then page opens. But I cant login with google because of restrictions of in-app browsers. And because of this auth0 ionic2 sample application doesn’t work on android. Don’t know how to solve this… Maybe someone can help?

When I have had this exception (disconnect between the browser process and processing the Intent on the ionic/app side), it has been because of having inappbrowser plugin installed. I am pretty sure you don’t want inappbrowser. In my package.json, I have the following which are probably pertinent.
“cordova-plugin-safariviewcontroller”: “^1.4.7”
“cordova-plugin-customurlscheme”: “^4.3.0”
“cordova-android”: “^6.2.3”
“cordova-browser”: “^4.1.0”

Does anyone have this resolved? Even the sample app doesn’t work properly. The same unknown URL scheme error appears. GitHub - auth0-samples/auth0-cordova-samples: Integrate Auth0 with Cordova apps

Same problem here, need a solution.

same problem …

Hi I had the same error (ERR_UNKNOWN_URL_SCHEME), my error was when add ionic cordova plugin “cordova-plugin-customurlscheme” the guide puts:

# replace YOUR_PACKAGE_ID with your app identifier
ionic cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME={YOUR_PACKAGE_ID} --variable ANDROID_SCHEME={YOUR_PACKAGE_ID} --variable ANDROID_HOST=aseapp.auth0.com --variable ANDROID_PATHPREFIX=/cordova/{YOUR_PACKAGE_ID}/callback

I had put this:

ionic cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME={com.ionicframework.myapp1000} --variable ANDROID_SCHEME={com.ionicframework.myapp1000} --variable ANDROID_HOST=aseapp.auth0.com --variable ANDROID_PATHPREFIX=/cordova/{com.ionicframework.myapp1000}/callback

The solution is quit the { }

ionic cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=com.ionicframework.myapp1000 --variable ANDROID_SCHEME=com.ionicframework.myapp1000 --variable ANDROID_HOST=aseapp.auth0.com --variable ANDROID_PATHPREFIX=/cordova/com.ionicframework.myapp1000/callback

I spent hours discovering this, I hope it works for you.

I have this problem now as well… Tried everything above without luck

1 Like