Announcement Announcement Module
Collapse
No announcement yet.
LinkedIn connect unreliable. Random 401s Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • LinkedIn connect unreliable. Random 401s

    Hi,

    I'm using the LinkedIn Connect function and I'm seeing a kind of sometimes it works, sometimes it doesn't. This is what I seem to be getting at times

    PHP Code:
    [MSAWARN [2011-08-12 15:11:55,438RestTemplate.handleResponseError(478) | POST request for "https://api.linkedin.com/uas/oauth/accessToken" resulted in 401 (Unauthorized); invoking error handler
    [MSAERROR [2011-08-12 15:11:55,442MySimpleExceptionResolver.doResolveException(24) | org.springframework.web.client.HttpClientErrorException401 Unauthorized
    org
    .springframework.web.client.HttpClientErrorException401 Unauthorized
        at org
    .springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:75)
        
    at org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:486)
        
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:443)
        
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:415)
        
    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:391)
        
    at org.springframework.social.oauth1.OAuth1Template.exchangeForToken(OAuth1Template.java:195)
        
    at org.springframework.social.oauth1.OAuth1Template.exchangeForAccessToken(OAuth1Template.java:133)
        
    at org.springframework.social.connect.web.ConnectSupport.completeConnection(ConnectSupport.java:101)
        
    at org.springframework.social.connect.web.ConnectController.oauth1Callback(ConnectController.java:154
    And then it suddenly works normally. So, the 401 seems kind of false.

    Does Linkedin use some kind of timeout on your connect requests where in a development situation rapid connect, disconnect leads to exceptions?

    Kind regards,
    Marc

  • #2
    I'm also seeing this guy

    PHP Code:
    [MSAERROR [2011-08-12 15:42:28,510MySimpleExceptionResolver.doResolveException(24) | java.lang.NullPointerException
    java
    .lang.NullPointerException
        at org
    .springframework.social.oauth1.AuthorizedRequestToken.getValue(AuthorizedRequestToken.java:44)
        
    at org.springframework.social.oauth1.OAuth1Template.exchangeForAccessToken(OAuth1Template.java:129)
        
    at org.springframework.social.connect.web.ConnectSupport.completeConnection(ConnectSupport.java:101)
        
    at org.springframework.social.connect.web.ProviderSignInController.oauth1Callback(ProviderSignInController.java:146

    Comment


    • #3
      Somebody (ConnectController) is creating a new AuthorizedRequestToken from a null OAuthToken (request token) instance. Since the request token is retrieved from the session after the provider callback, is it possible your session expired in the meantime - or was otherwise not reassociated? We should handle this case more cleanly, but I'd be interested to know why the request token is dissappearing from user sessions in your environment.

      Comment


      • #4
        I seriously dont know. The code is the same as being used for Facebook and Twitter login, which work fine.

        Comment

        Working...
        X