Android 5.0 : Twitter Login always failed if I have Twitter app on the device

android

#1

This is happen on Android 5.0 (maybe happen on Android 5.1 too) device.
This is not happen on any my Android 6.0/7.0 devices.

When I call “TwitterAuthClient.authorize”, Twitter app return status code “Activity.RESULT_CANCELED” to our onActivityResult without any user action.
If we uninstall Twitter App, webview is successfully opened.

The exception come to failure() of com.twitter.sdk.android.core.Callback is

Authorization completed with an error
com.twitter.sdk.android.core.TwitterAuthException: Authorize failed.

I got followings on logcat

E/Vold: Failed to find mounted volume for /storage/sdcard1/Android/data/com.twitter.android/cache/

and

02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: obj == null
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] in call to CallVoidMethodV
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] from void android.animation.PropertyValuesHolder.nCallFloatMethod(java.lang.Object, long, float)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] “main” prio=5 tid=1 Runnable
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] | group=“main” sCount=0 dsCount=0 obj=0x750b4aa0 self=0xb5107800
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] | sysTid=4584 nice=0 cgrp=apps sched=0/0 handle=0xb6f88ec8
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] | state=R schedstat=( 1199779856 221524205 2080 ) utm=97 stm=22 core=3 HZ=100
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] | stack=0xbe14d000-0xbe14f000 stackSize=8MB
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] | held mutexes= “mutator lock”(shared held)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] native: #00 pc 00004640 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] native: #01 pc 00002e8d /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] native: #02 pc 0023f37f /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits >&, int, char const*, art::mirror::ArtMethod*, BacktraceMap*)+70)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] native: #03 pc 00224b23 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&, BacktraceMap*) const+154)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] native: #04 pc 000afb7d /system/lib/libart.so (art::JniAbort(char const*, char const*)+584)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] native: #05 pc 000b02b5 /system/lib/libart.so (art::JniAbortF(char const*, char const*, …)+60)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] native: #06 pc 0019a5a1 /system/lib/libart.so (art::JNI::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+580)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] native: #07 pc 0005d26b /system/lib/libandroid_runtime.so (???)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] native: #08 pc 000718e5 /system/framework/arm/boot.oat (Java_android_animation_PropertyValuesHolder_nCallFloatMethod__Ljava_lang_Object_2JF+132)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.animation.PropertyValuesHolder.nCallFloatMethod(Native method)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.animation.PropertyValuesHolder.access$400(PropertyValuesHolder.java:38)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.animation.PropertyValuesHolder$FloatPropertyValuesHolder.setAnimatedValue(PropertyValuesHolder.java:1296)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.animation.ObjectAnimator.animateValue(ObjectAnimator.java:952)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.animation.ValueAnimator.animationFrame(ValueAnimator.java:1207)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1248)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:659)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:682)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.view.Choreographer.doCallbacks(Choreographer.java:580)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.view.Choreographer.doFrame(Choreographer.java:549)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.os.Handler.handleCallback(Handler.java:739)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.os.Handler.dispatchMessage(Handler.java:95)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.os.Looper.loop(Looper.java:211)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at android.app.ActivityThread.main(ActivityThread.java:5335)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at java.lang.reflect.Method.invoke!(Native method)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at java.lang.reflect.Method.invoke(Method.java:372)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1016)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
02-13 07:36:54.807 4584-4584/? A/art: art/runtime/check_jni.cc:65]
02-13 07:36:54.822 4584-4584/? A/art: art/runtime/runtime.cc:290] Runtime aborting…
02-13 07:36:54.822 4584-4584/? A/art: art/runtime/runtime.cc:290] Aborting thread:
02-13 07:36:54.822 4584-4584/? A/art: art/runtime/runtime.cc:290] “main” prio=5 tid=1 Native
02-13 07:36:54.822 4584-4584/? A/art: art/runtime/runtime.cc:290] | group="" sCount=0 dsCount=0 obj=0x750b4aa0 self=0xb5107800
02-13 07:36:54.822 4584-4584/? A/art: art/runtime/runtime.cc:290] | sysTid=4584 nice=0 cgrp=apps sched=0/0 handle=0xb6f88ec8
02-13 07:36:54.822 4584-4584/? A/art: art/runtime/runtime.cc:290] | state=R schedstat=( 1214749075 221553424 2098 ) utm=99 stm=22 core=1 HZ=100
02-13 07:36:54.822 4584-4584/? A/art: art/runtime/runtime.cc:290] | stack=0xbe14d000-0xbe14f000 stackSize=8MB
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] | held mutexes= “abort lock” “mutator lock”(shared held)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #00 pc 00004640 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #01 pc 00002e8d /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #02 pc 0023f37f /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits >&, int, char const*, art::mirror::ArtMethod*, BacktraceMap*)+70)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #03 pc 00224b23 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&, BacktraceMap*) const+154)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #04 pc 00214da5 /system/lib/libart.so (art::AbortState::DumpThread(std::__1::basic_ostream<char, std::__1::char_traits >&, art::Thread*)+24)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #05 pc 00215055 /system/lib/libart.so (art::AbortState::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&)+436)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #06 pc 00215229 /system/lib/libart.so (art::Runtime::Abort()+72)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #07 pc 000a65bb /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #08 pc 000afd5b /system/lib/libart.so (art::JniAbort(char const*, char const*)+1062)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #09 pc 000b02b5 /system/lib/libart.so (art::JniAbortF(char const*, char const*, …)+60)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #10 pc 0019a5a1 /system/lib/libart.so (art::JNI::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+580)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #11 pc 0005d26b /system/lib/libandroid_runtime.so (???)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] native: #12 pc 000718e5 /system/framework/arm/boot.oat (Java_android_animation_PropertyValuesHolder_nCallFloatMethod__Ljava_lang_Object_2JF+132)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.animation.PropertyValuesHolder.nCallFloatMethod(Native method)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.animation.PropertyValuesHolder.access$400(PropertyValuesHolder.java:38)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.animation.PropertyValuesHolder$FloatPropertyValuesHolder.setAnimatedValue(PropertyValuesHolder.java:1296)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.animation.ObjectAnimator.animateValue(ObjectAnimator.java:952)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.animation.ValueAnimator.animationFrame(ValueAnimator.java:1207)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1248)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:659)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:682)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.view.Choreographer.doCallbacks(Choreographer.java:580)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.view.Choreographer.doFrame(Choreographer.java:549)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.os.Handler.handleCallback(Handler.java:739)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.os.Handler.dispatchMessage(Handler.java:95)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.os.Looper.loop(Looper.java:211)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at android.app.ActivityThread.main(ActivityThread.java:5335)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at java.lang.reflect.Method.invoke!(Native method)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at java.lang.reflect.Method.invoke(Method.java:372)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1016)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290] Dumping all threads without appropriate locks held: thread list lock mutator lock
02-13 07:36:54.823 4584-4584/? A/art: art/runtime/runtime.cc:290]

I think this is issue of Twitter app (6.33.0) itself.


#2

Seems like the same issue as this one:


#3

Thank you.
It’s same issue.


#4