Hello everyone,
OIDC seems not to be working on Samsung devices in Android Capture app v2.4.3. After the configuration of OIDC in a clone of the Android Capture app v2.4.3 as described in the wiki, and rebuilding the app, the OIDC button fails to respond when clicked on a Samsung device. Further investigation in logcat
and flipper
revealed the error below is thrown whenever the OIDC button is clicked:
2021-11-10 11:04:36.919 3523-3523/com.dhis2.debug E/LoginPresenter$openIdLogin - 231: android.content.ActivityNotFoundException
at net.openid.appauth.AuthorizationService.prepareAuthorizationRequestIntent(AuthorizationService.java:372)
at net.openid.appauth.AuthorizationService.getAuthorizationRequestIntent(AuthorizationService.java:267)
at net.openid.appauth.AuthorizationService.getAuthorizationRequestIntent(AuthorizationService.java:296)
at org.hisp.dhis.android.core.user.openid.OpenIDConnectHandlerImpl$logIn$1.apply(OpenIDConnectHandlerImpl.kt:54)
at org.hisp.dhis.android.core.user.openid.OpenIDConnectHandlerImpl$logIn$1.apply(OpenIDConnectHandlerImpl.kt:45)
at io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:57)
at io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:64)
at io.reactivex.internal.operators.single.SingleCreate$Emitter.onSuccess(SingleCreate.java:67)
at org.hisp.dhis.android.core.user.openid.OpenIDConnectRequestHelper$discoverAuthConfig$1$1.onFetchConfigurationCompleted(OpenIDConnectRequestHelper.kt:55)
at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.onPostExecute(AuthorizationServiceConfiguration.java:364)
at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.onPostExecute(AuthorizationServiceConfiguration.java:305)
at android.os.AsyncTask.finish(AsyncTask.java:771)
at android.os.AsyncTask.access$900(AsyncTask.java:199)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8506)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
This was tested on Samsung Tab A, Samsung Galaxy A71, Motorola E4 Plus and Android emulator, however it only works on the Android emulator and the Motorola device while Samsung devices trigger the error above.
We tried setting Chrome as the default browser on the Samsung devices, however this doesn’t seem to improve the experience. Further digging around revealed that a similar issue was reported awhile back on the Openid AppAuth Android library.
Any ideas on how to get around this?
Thank you.