TwitterSession.<init> crash for rooted users

android

#1

Hi, I noticed a number of crashes that happen on rooted phones saying AuthToken must not be null. This happens when users want to tweet from our app. We’re not using twitter login or authentication in the app or fetching tweets, we use the SDK just for tweeting.

Here’s the complete stacktrace:

Fatal Exception: java.lang.IllegalArgumentException: AuthToken must not be null.
       at com.twitter.sdk.android.core.TwitterSession.<init>(TwitterSession.java:52)
       at com.twitter.sdk.android.tweetcomposer.TweetUploadService.onHandleIntent(TweetUploadService.java:74)
       at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
       at android.os.Handler.dispatchMessage(Handler.java:111)
       at android.os.Looper.loop(Looper.java:135)
       at android.os.HandlerThread.run(HandlerThread.java:61)

#2

Hey @sasa_sekulic,

If your users are going to Tweet, then you would need to do some sort of authentication so that the tweet can be setup to compose on their behalf. More information on how to set that up is here: https://docs.fabric.io/android/twitter/compose-tweets.html#compose-tweets

-Mike