# TypeError: Cannot read property 'isAvailable'

**URL:** <https://community.auth0.com/t/typeerror-cannot-read-property-isavailable/12674>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [June 29, 2018, 1:43am UTC](https://community.auth0.com/t/typeerror-cannot-read-property-isavailable/12674 "2018-06-29T01:43:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam.toonisi](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@sam.toonisi](https://community.auth0.com/u/sam.toonisi)\
**Post date:** [June 29, 2018, 1:43am UTC](https://community.auth0.com/t/typeerror-cannot-read-property-isavailable/12674/1 "2018-06-29T01:43:00Z")

</div>

I have made a test app to use auth0 on Ionic. Whenever I run ‘auth.login()’, I get the following error:

> Blockquote  
> TypeError: Cannot read property ‘isAvailable’ of undefined  
> at Function.Browser.isAvailable (vendor.js:sourcemap:149943)  
> at getAgent (vendor.js:sourcemap:149922)  
> at CordovaAuth.authorize (vendor.js:sourcemap:87291)  
> at AuthProvider.webpackJsonp.131.AuthProvider.login (main.js:sourcemap:68)  
> at Object.eval [as handleEvent] (HomePage.html:17)  
> at handleEvent (vendor.js:sourcemap:13963)  
> at callWithDebugContext (vendor.js:sourcemap:15472)  
> at Object.debugHandleEvent [as handleEvent] (vendor.js:sourcemap:15059)  
> at dispatchEvent (vendor.js:sourcemap:10378)  
> at vendor.js:sourcemap:11003  
> Blockquote

I’ve checked plugins and dependencies and followed the ionic auth0 documentation, yet I cant get it to work.  
I hope someone can help me with it.

MyCode:  
[ioauthapp2](https://github.com/samtoonisi/ioauthapp2)

---

<div class="post-metadata">

**Author:** ![mauricio](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mauricio/32/17809_2.png) [@mauricio](https://community.auth0.com/u/mauricio)\
**Post date:** [June 29, 2018, 1:59pm UTC](https://community.auth0.com/t/typeerror-cannot-read-property-isavailable/12674/2 "2018-06-29T13:59:49Z")

</div>

According to [this answer](https://stackoverflow.com/a/44015653) in StackOverflow:

> `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.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 25, 2019, 2:24pm UTC](https://community.auth0.com/t/typeerror-cannot-read-property-isavailable/12674/3 "2019-07-25T14:24:57Z")

</div>


