auth0-samples / auth0-ionic2-samples

MIT License
28 stars 56 forks source link

I can not get this sample to work with android emulator/device #30

Open lexeek opened 7 years ago

lexeek commented 7 years ago

As a start point I've got this sample application.

I made steps from tutorial. I can login with ios, login page opens and everything work as expected. But I could not make login page opened on android emulator and device (both). In Chrome Inspector (android emulator) I see this error

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'open' of undefined TypeError: Cannot read property 'open' of undefined at WebView.open (file:///android_asset/www/build/main.js:116941:20) at file:///android_asset/www/build/main.js:65196:11 at file:///android_asset/www/build/main.js:116917:12 at Object.cordova.callbackFromNative (file:///android_asset/www/cordova.js:293:58)

image

Then after long 'googling' I decided to install cordova-plugin-inappbrowser, that led to 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? Could someone check this sample on android device and/or update documentation if something was missed?

DJSitte commented 7 years ago

I was having the same problem while running an emulator using API version 23. I was able to get it running in an emulator with API version 25. It also worked just fine when I ran it on a physical device.