Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

AEM Mobile app break and exits while Login success.


Level 2


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(                                                                       at android.view.WindowManagerGlobal.addView(                                                                       at android.view.WindowManagerImpl.addView(                                                                       at                                                                       at com.testapp.aemm.auth.WebViewAuthenticationFragment.finishAuthentication(                                                                       at com.testapp.aemm.auth.WebViewAuthenticationFragment.access$000(                                                                       at com.testapp.aemm.auth.WebViewAuthenticationFragment$1.shouldOverrideUrlLoading(                                                                       at android.webkit.WebViewClient.shouldOverrideUrlLoading(                                                                       at                                                                       at org.chromium.android_webview.AwContentsClient.shouldIgnoreNavigation(                                                                       at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(                                                                       at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)                                                                       at org.chromium.base.SystemMessageHandler.handleMessage(                                                                       at android.os.Handler.dispatchMessage(                                                                       at android.os.Looper.loop(                                                                       at                                                                       at java.lang.reflect.Method.invoke(Native Method)                                                                       at$                                                                       at 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,

0 Replies