question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Only the original thread that created a view hierarchy can touch its views.

See original GitHub issue

I am getting error after login , upgrade ADAL version from 1.12.0 to 1.13.2

12-18 09:54:24.153 9842-9930/? E/AndroidRuntime: FATAL EXCEPTION: AcquireTokenRequestHandlerThread
                                                 Process: com.companyname.appname, PID: 9842
                                                 android.view.ViewRootImpl$CalledFromWrongThreadException: 
												 Only the original thread that created a view hierarchy can touch its views.
                                                     at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:8197)
                                                     at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:1268)
                                                     at android.view.View.requestLayout(View.java:20084)
                                                     at android.view.View.requestLayout(View.java:20084)
                                                     at android.view.View.requestLayout(View.java:20084)
                                                     at android.view.View.requestLayout(View.java:20084)
                                                     at android.view.View.requestLayout(View.java:20084)
                                                     at android.view.View.requestLayout(View.java:20084)
                                                     at android.support.v4.widget.DrawerLayout.requestLayout(Unknown Source)
                                                     at android.view.View.requestLayout(View.java:20084)
                                                     at android.view.View.requestLayout(View.java:20084)
                                                     at android.support.v7.widget.av.requestLayout(Unknown Source)
                                                     at android.view.View.requestLayout(View.java:20084)
                                                     at android.view.View.requestLayout(View.java:20084)
                                                     at android.view.View.requestLayout(View.java:20084)
                                                     at android.widget.TextView.checkForRelayout(TextView.java:8382)
                                                     at android.widget.TextView.setText(TextView.java:5000)
                                                     at android.widget.TextView.setText(TextView.java:4827)
                                                     at android.widget.TextView.setText(TextView.java:4802)
                                                     at com.companyname.appname.MainActivity.A(Unknown Source)
                                                     at com.companyname.appname.MainActivity.d(Unknown Source)
                                                     at com.companyname.appname.MainActivity$6.a(Unknown Source)
                                                     at com.companyname.appname.MainActivity$6.onSuccess(Unknown Source)
                                                     at com.microsoft.aad.adal.AcquireTokenRequest$CallbackHandler$2.run(Unknown Source)
                                                     at android.os.Handler.handleCallback(Handler.java:739)
                                                     at android.os.Handler.dispatchMessage(Handler.java:95)
                                                     at android.os.Looper.loop(Looper.java:158)
                                                     at android.os.HandlerThread.run(HandlerThread.java:61)
12-18 09:54:24.158 2788-3090/? W/ActivityManager:   Force finishing activity com.companyname.appname/.MainActivity

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
MoBocommented, Jan 17, 2018

I have the same issue. AuthenticationCallback seem to invoked on a background thread in Version 1.13.3. In Version 1.3.0 the callback was executed on the main thread. Is this the expected behaviour in the new version?

1reaction
iambmeltcommented, Jan 17, 2018

Hello @MoBo @Eqbalazar – From my testing, I can confirm this as an unintended change that occurred between versions 1.13.1 and 1.13.2. I will consult with my team and see that a test case is added for future releases.

Reopening this issue, as it’s now confirmed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android "Only the original thread that created a view hierarchy ...
This is explicitly throwing an error. It says whichever thread created a view, only that can touch its views.
Read more >
Only the original thread that created a view ... - Tutorial Kart
An important point to be remembered while trying to do any operations with UI views is that, only UI thread that created a...
Read more >
Only the original thread that created a view ... - YouTube
... be remembered while trying to do any operations with UI views is that, only UI thread that created a view hierarchy can...
Read more >
Only the Original Thread That Created a View Hierarchy Can ...
Error : Only the Original Thread That Created a View Hierarchy Can Touch Its Views. Watch later. Share. Copy link.
Read more >
Android “Only the original thread that created a view hierarchy ...
Hi, you can run it on the main thread from inside the setNumColumns method. But it would be better to make the code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found