Only the original thread that created a view hierarchy can touch its views.
See original GitHub issueI 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:
- Created 6 years ago
- Comments:14 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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?
Hello @MoBo @Eqbalazar – From my testing, I can confirm this as an unintended change that occurred between versions
1.13.1
and1.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.