Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6011237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:13:53+00:00 2026-05-23T02:13:53+00:00

I’m using Twitter4J library for OAuth authentication but I get Authentication Challenge is Null

  • 0

I’m using Twitter4J library for OAuth authentication but I get “Authentication Challenge is Null Exception” even before It opens the Twitter login page.

Here is the code.

    Twitter twitter = new TwitterFactory().getInstance();
    try
    {

        twitter.setOAuthConsumer(Startup.TWITTER_KEY, Startup.TWITTER_SECRET);

        String callbackURL = "twitter-client:///";

        RequestToken rToken = twitter.getOAuthRequestToken(callbackURL);

        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(rToken.getAuthenticationURL())));

    }
    catch(IllegalStateException e)
    {
    // access token is already available, or consumer key/secret is not set.
        if(!twitter.getAuthorization().isEnabled()){
            System.out.println("OAuth consumer key/secret is not set.");
            System.exit(-1);
        }
    }
    catch(Exception e)
    {
        Toast.makeText(Home.this, "Network Host not responding: "+e.getMessage(),Toast.LENGTH_SHORT).show();  //This exception. 
    }

Exception:

E/Home ( 4393): Received
authentication challenge is null
E/Home ( 4393): Received
authentication challenge is
nullRelevant discussions can be on the
Internet at: E/Home ( 4393):
http://www.google.co.jp/search?q=6c607809
or E/Home ( 4393):
http://www.google.co.jp/search?q=0f1d8134
E/Home ( 4393):
TwitterException{exceptionCode=[6c607809-0f1d8134
cab4c0ac-d492a113], statusCode=-1,
retryAfter=0, rateLimitStatus=null,
version=2.2.2} E/Home ( 4393): at
twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:204)
E/Home ( 4393): at
twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
E/Home ( 4393): at
twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:102)
E/Home ( 4393): at
twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:108)
E/Home ( 4393): at
twitter4j.TwitterBaseImpl.getOAuthRequestToken(TwitterBaseImpl.java:271)
E/Home ( 4393): at
com.sharj.trafik.view.Home.askOAuth(Home.java:157)
E/Home ( 4393): at
com.sharj.trafik.view.Home.access$0(Home.java:143)
E/Home ( 4393): at
com.sharj.trafik.view.Home$3.onClick(Home.java:110)
E/Home ( 4393): at
android.view.View.performClick(View.java:2485)
E/Home ( 4393): at
android.view.View$PerformClick.run(View.java:9080)
E/Home ( 4393): at
android.os.Handler.handleCallback(Handler.java:587)
E/Home ( 4393): at
android.os.Handler.dispatchMessage(Handler.java:92)
E/Home ( 4393): at
android.os.Looper.loop(Looper.java:130)
E/Home ( 4393): at
android.app.ActivityThread.main(ActivityThread.java:3683)
E/Home ( 4393): at
java.lang.reflect.Method.invokeNative(Native
Method) E/Home ( 4393): at
java.lang.reflect.Method.invoke(Method.java:507)
E/Home ( 4393): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/Home ( 4393): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/Home ( 4393): at
dalvik.system.NativeStart.main(Native
Method) E/Home ( 4393): Caused by:
java.io.IOException: Received
authentication challenge is null
E/Home ( 4393): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.processAuthHeader(HttpURLConnectionImpl.java:1153)
E/Home ( 4393): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.processResponseHeaders(HttpURLConnectionImpl.java:1095)
E/Home ( 4393): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.retrieveResponse(HttpURLConnectionImpl.java:1048)
E/Home ( 4393): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:726)
E/Home ( 4393): at
org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:121)
E/Home ( 4393): at
twitter4j.internal.http.HttpResponseImpl.(HttpResponseImpl.java:35)
E/Home ( 4393): at
twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:168)
E/Home ( 4393): … 18 more

It contains following links, but Google doesn’t have much on this.

http://www.google.co.jp/search?q=6c607809

http://www.google.co.jp/search?q=0f1d8134

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:13:54+00:00Added an answer on May 23, 2026 at 2:13 am

    I had the same problem. It turned out that if the time stamp on the oAuth call is incorrect, the server returns a 401 status error which on Android devices causes the “Received authentication challenge is null” exception to be thrown. All of the devices that were having this problem had incorrect times, and fixing the times fixed the problem.

    Perhaps this is your issue as well?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.