JungHyunChul / oauth-signpost

Automatically exported from code.google.com/p/oauth-signpost
0 stars 0 forks source link

retrieveRequestToken returns an error of 500 #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In which environment did the problem appear?
Android v2.2
signpost-core-1.2.1.1.jar
signpost-commonshttp4-1.2.1.1.jar

What steps will reproduce the problem?
1. Include libraries
2. Run Code below
3. Question what's going on...

What is the expected output? What do you see instead?

The token should be received, but I get the following error instead:

oauth.signpost.exception.OAuthCommunicationException: Communication with the 
service provider failed: Service provider responded in error: 500 (Internal 
Server Error)

Please post code (fully executable, no pseudo code) that reproduces the
issue.

 mConsumer = new CommonsHttpOAuthConsumer(
                Key,
                Secret);

        mProvider = new CommonsHttpOAuthProvider(
                "http://www.formspring.me/oauth/request_token",
                "http://www.formspring.me/oauth/access_token",
                "http://www.formspring.me/oauth/authorize");

        mSettings = this.getSharedPreferences(PREFS, Context.MODE_PRIVATE);

        Intent i = this.getIntent();
        if (i.getData() == null) {
            try {
                String authUrl = mProvider.retrieveRequestToken(mConsumer, CALLBACK_URI.toString());
                saveRequestInformation(mSettings, mConsumer.getToken(), mConsumer.getTokenSecret());
                this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authUrl)));
            } catch (OAuthMessageSignerException e) {
                e.printStackTrace();
            } catch (OAuthNotAuthorizedException e) {
                e.printStackTrace();
            } catch (OAuthExpectationFailedException e) {
                e.printStackTrace();
            } catch (OAuthCommunicationException e) {
                e.printStackTrace();
            }
        }
    }

Please provide any additional information below.

I was previously using signpost-core-1.1-SNAPSHOT with 
DefaultOAuthConsumer/Provider and the code above worked with no problems. I had 
to upgrade to CommonHttp to get a POST method working and unfortunately this 
now happens.

Thanks

Original issue reported on code.google.com by jobrienapps@gmail.com on 6 Sep 2010 at 5:39

GoogleCodeExporter commented 8 years ago
500 is a server side error, please report it against your service provider.

Original comment by m.kaepp...@gmail.com on 7 Sep 2010 at 6:53

GoogleCodeExporter commented 8 years ago
But you missed the point, the code worked fine with a earlier version of 
signpost, yet when upgrading it suddenly stops working.

That can't be a problem with the code or the server, and must be signpost?

Original comment by jobrienapps@gmail.com on 7 Sep 2010 at 9:25

GoogleCodeExporter commented 8 years ago
I get the same problem. The same android version and same signpost version.

Original comment by high...@gmail.com on 28 Jun 2011 at 1:16

GoogleCodeExporter commented 8 years ago
do you use avd?
if yes, you can restart avd, it is ok.

Original comment by jorden...@gmail.com on 3 Aug 2011 at 9:49