Ionic app (android) callback problem during login

Hi guys,
we are experiencing a stucking problem.
We are using Auth0, Capacitor and Ionic5 Angular.
In the Android app the post login callback doesn’t work.
We get this error:

D/Capacitor: Sending plugin error: {"save":false,"callbackId":"82790226","pluginId":"Browser","methodName":"close","success":false,"error":{"message":"not implemented","code":"UNIMPLEMENTED"}}
E/Capacitor/Console: File: http://localhost:8100/vendor.js - Line 43878 - Msg: Error: not implemented
E/Capacitor: JavaScript Error: {"type":"js.error","error":{"message":"Uncaught Error: not implemented","url":"http://localhost:8100/polyfills.js","line":2817,"col":29,"errorObject":"{\"code\":\"UNIMPLEMENTED\"}"}}
E/Capacitor/Console: File: http://localhost:8100/polyfills.js - Line 2817 - Msg: Uncaught Error: not implemented

It seems we have a problem with a plugin but we aren’t able to find it
Thanks in advance

Hey there!

I’m not an Ionic guy but maybe will be able to help if you provide me with a link to the docs / quickstart from us you’re trying to follow

Hi Konrad. Thanks a lot for your time.
We are trying to implement this

Thank you! Let me implement it myself and debug it and I will get back to you soon!

1 Like

Hi @konrad.sopala . we go further.
Now we’ve got a problem on the Auth0 callback.
From Android side, seems do not accept the App ID.
The error is:
Login:1 Failed to launch ‘io.rexulta.ionic.angular://re2n-dev.eu.auth0.com/capacitor/io.rexulta.ionic.angular/tabs/dashboard?code=dJZXix10LhWSNY0u&state=ZEJvWWYtWWd3emU1eWU2TC5zNHZjTWdmdXFaT284aXEuOXRpd0RKR3B0Mg%3D%3D’ because the scheme does not have a registered handler .

Hi @a.tremigliozzi ,
i am stuck in the same problem as you. How do manage to go further this error?

thanks in advance

Hi, we think we found the reason of the problem.
When you try to login the system redirect to browser (the capacitor browser). In Android, capacitor has a bug: browser cannot be closed.
We are trying to find a workaround but it’s very hard
Some reference:

Hi @a.tremigliozzi. May i ask how you did tackle this problem? Because i’m facing a similar issue where the capacitor browser won’t close/redirect back to the app.

hey there!

ionic 5, capacitor3, latest android sdk and studio (Aug 17th 2021)

we get a very similar error but the current behaviour is a little different
on login the browser opens after entering valid credentials
the browser goes back to the app where the routing reloads the view but its in a wrong state and in the logcat I found the following error "E/Capacitor: JavaScript Error: {“type”:“js.error”,“error”:{“message”:“Uncaught Error: not implemented”,“url”:"http://localhost/polyfills.js",“line”:331,“col”:15,“errorObject”:"{“code”:“UNIMPLEMENTED”}"}}"

Hi @radiobird and @osk40
unfortunately we didn’t managed yet.
See this as answer: Login problem - #3 by thomasvidas - Capacitor - Ionic Forum

As stated in that issue this is not something that Capacitor supports nor do we plan on supporting it since this is the way the Android/Google recommends for all apps.

If you cannot use the way we provide, you can use the cordova-plugin-inappbrowser package GitHub - apache/cordova-plugin-inappbrowser: Apache Cordova Plugin inappbrowser

1 Like

Thanks for sharing that with the rest of community!

There is an issue with using the cordova inappbrowser. Google is not allowing authentication.