Failed to get app auth token / Failed to get request token


#1

I tried to Log in with Twitter using TwitterLoginButton, but I got error.
Previously Log in with Twitter has no error.

This problem occurs when it is running on emulator, not real device.

com.twitter.sdk.android:twitter-core:3.1.1

Thank you.

E/Twitter: Failed to get app auth token (Appears in first try)
E/Twitter: Failed to get request token
D/Twitter: onActivityResult called with 140 1
E/Twitter: Authorization completed with an error
com.twitter.sdk.android.core.TwitterAuthException: Failed to get request token
at com.twitter.sdk.android.core.identity.OAuthController$1.failure(OAuthController.java:94)
at com.twitter.sdk.android.core.internal.oauth.OAuth1aService$1.failure(OAuth1aService.java:191)
at com.twitter.sdk.android.core.Callback.onFailure(Callback.java:48)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$2.run(ExecutorCallAdapterFactory.java:79)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)


#2

I recovered from this problem after restarting emulator.