Hi,
we are trying to set up login using Generic provider(as mentioned in pdf file 'Setting up Generic Identity Provider') and on authentication, the app stops abruptly after the login is success.
In the below code, We are getting success value with authToken and passing to the method.
But during window redirect it fails.
if (success && authToken) { // login succeeded
window.location = appData.redirectUri + '?authToken=' + authToken; // APP Breaks
Below is the debugger log. I feel this issue is reated to latest app code changes.
03-10 14:38:52.774 32443-32443/com.testapp.aemm E/AndroidRuntime:
FATAL EXCEPTION: main Process: com.testapp.aemm, PID: 32443 android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application at android.view.ViewRootImpl.setView(ViewRootImpl.java:683) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:342) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94) at android.app.Dialog.show(Dialog.java:322) at com.testapp.aemm.auth.WebViewAuthenticationFragment.finishAuthentication(WebViewAuthenticationFragment.java:218) at com.testapp.aemm.auth.WebViewAuthenticationFragment.access$000(WebViewAuthenticationFragment.java:66) at com.testapp.aemm.auth.WebViewAuthenticationFragment$1.shouldOverrideUrlLoading(WebViewAuthenticationFragment.java:137) at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:73) at com.android.webview.chromium.WebViewContentsClientAdapter.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:353) at org.chromium.android_webview.AwContentsClient.shouldIgnoreNavigation(AwContentsClient.java:168) at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:269) at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:41) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6126) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 03-10 14:39:07.457 32443-32450/com.testapp.aemm W/art: Suspending all threads took: 11.635ms
Please let us know how to fix this issue.
Thanks in advance,