Auth0 in ionic throws error of 'isAvailable'

I have followed steps as per documentation, to integrate auth0 in my ionic application. https://auth0.com/docs/quickstart/native/ionic4/01-login#cannot-read-property-isavailable-of-undefined

I am getting error of ‘isAvailable’ of undefined in my android app, where as it is suuposed to be a problem only in web app

. Could someone help me with this?

Good morning,

I found the same issue here: https://github.com/auth0/auth0-cordova/issues/41

It seems the error message may be due to the unavailability of the cordova-plugin-safariviewcontroller . Please make sure that you followed all the necessary steps to install that plugin.

Also, it looks like another user reported the same issue here: https://stackoverflow.com/questions/44011066/ionic-auth0-error-cannot-read-property-isavailable-of-undefined/44015653#44015653

One user commented:

ionic serve does not load cordova plugins.

Auth0 uses auth0-cordova plugin which in turn requires:

cordova-plugin-safariviewcontroller
cordova-plugin-customurlscheme
All these require you to run the ionic app in your device or emulator if you want to test the login functionality.

Please let me know if this helps you.

Thank you @karen1 for your reply. I really appreciate. I have already installed these plugins as mentioned in the docs: https://auth0.com/docs/quickstart/native/ionic4/01-login

Interestingly, it is not throwing this error everytime in my android app. But like once in ten times, after building it, it throws this error randomly. I am not able to rectify the problem. I have to uninstall the app, build it again and install it, and then it works fine. But it is really annoying and time consuming to repeat the process.

I hope this information helps you to dig into the problem.
Thanks again for your time!