Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuth1 callback error #1

Open
klawel opened this issue Dec 2, 2013 · 4 comments
Open

OAuth1 callback error #1

klawel opened this issue Dec 2, 2013 · 4 comments

Comments

@klawel
Copy link

klawel commented Dec 2, 2013

Hi there,
do you still maintain this project? I tried to use spring-social-vimeo in the spring social showcase project. If I try to connect with my Vimeo account, an Exeption is thrown:
WARN : org.springframework.social.connect.web.ConnectController - Exception while handling OAuth1 callback (Could not read JSON: No content to map due to end-of-input
at [Source: org.apache.http.conn.EofSensorInputStream@ff4c09; line: 1, column: 1]; nested exception is com.fasterxml.jackson.data
bind.JsonMappingException: No content to map due to end-of-input
at [Source: org.apache.http.conn.EofSensorInputStream@ff4c09; line: 1, column: 1]). Redirecting to vimeo connection status page.

Can you help me find and/or resolve the problem?
Thanks
Klaus

@soldierkam
Copy link
Owner

Hi!
Could you post full stacktrace?
You can also checkout example app (https://github.com/soldierkam/spring-social-samples/tree/master/spring-social-quickstart-3.0.x). It seems to work (or at least connect and list liked videos). Please remember to put correct credentials to /src/main/webapp/WEB-INF/spring/properties.xml

@klawel
Copy link
Author

klawel commented Dec 3, 2013

Hi,
creating a connection with your example app worked for me.

This is the debug output for my app:

DEBUG http-8080-9 [e.http.impl.conn.DefaultClientConnection] - Sending request: GET /api/rest/v2?method=vimeo.people.getInfo&format=json HTTP/1.1
DEBUG http-8080-9 [org.apache.http.wire ] - >> "GET /api/rest/v2?method=vimeo.people.getInfo&format=json HTTP/1.1[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - >> "Accept: application/json, application/+json[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - >> "Authorization: OAuth oauth_version="1.0", oauth_nonce="
", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="", oauth_token="", oauth_timestamp="", oauth_signature=""[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - >> "Host: vimeo.com[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - >> "Connection: Keep-Alive[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - >> "User-Agent: Apache-HttpClient/4.2.3 (java 1.5)[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - >> "[\r][\n]"
DEBUG http-8080-9 [org.apache.http.headers ] - >> GET /api/rest/v2?method=vimeo.people.getInfo&format=json HTTP/1.1
DEBUG http-8080-9 [org.apache.http.headers ] - >> Accept: application/json, application/+json
DEBUG http-8080-9 [org.apache.http.headers ] - >> Authorization: OAuth oauth_version="1.0", oauth_nonce="
", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="", oauth_token="", oauth_timestamp="1386068498", oauth_signature=""
DEBUG http-8080-9 [org.apache.http.headers ] - >> Host: vimeo.com
DEBUG http-8080-9 [org.apache.http.headers ] - >> Connection: Keep-Alive
DEBUG http-8080-9 [org.apache.http.headers ] - >> User-Agent: Apache-HttpClient/4.2.3 (java 1.5)
DEBUG http-8080-9 [org.apache.http.wire ] - << "HTTP/1.1 200 OK[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "Date: Tue, 03 Dec 2013 11:01:37 GMT[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "Server: Apache[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "X-Powered-By: PHP/5.4.14[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "Expires: Mon, 02 Dec 2013 23:01:37 GMT[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "Cache-Control: no-store, no-cache, must-revalidate[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "Cache-Control: post-check=0, pre-check=0[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "X-RateLimit-Limit: 1500[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "X-RateLimit-Remaining: 1499[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "X-RateLimit-Reset: 1386068797[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "X-UA-Compatible: IE=edge[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "X-DNS-Prefetch-Control: on[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "Vary: Accept-Encoding[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "Content-Length: 1428[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "Connection: close[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "Content-Type: application/json[\r][\n]"
DEBUG http-8080-9 [org.apache.http.wire ] - << "[\r][\n]"
DEBUG http-8080-9 [e.http.impl.conn.DefaultClientConnection] - Receiving response: HTTP/1.1 200 OK
DEBUG http-8080-9 [org.apache.http.headers ] - << HTTP/1.1 200 OK
DEBUG http-8080-9 [org.apache.http.headers ] - << Date: Tue, 03 Dec 2013 11:01:37 GMT
DEBUG http-8080-9 [org.apache.http.headers ] - << Server: Apache
DEBUG http-8080-9 [org.apache.http.headers ] - << X-Powered-By: PHP/5.4.14
DEBUG http-8080-9 [org.apache.http.headers ] - << Expires: Mon, 02 Dec 2013 23:01:37 GMT
DEBUG http-8080-9 [org.apache.http.headers ] - << Cache-Control: no-store, no-cache, must-revalidate
DEBUG http-8080-9 [org.apache.http.headers ] - << Cache-Control: post-check=0, pre-check=0
DEBUG http-8080-9 [org.apache.http.headers ] - << X-RateLimit-Limit: 1500
DEBUG http-8080-9 [org.apache.http.headers ] - << X-RateLimit-Remaining: 1499
DEBUG http-8080-9 [org.apache.http.headers ] - << X-RateLimit-Reset: 1386068797
DEBUG http-8080-9 [org.apache.http.headers ] - << X-UA-Compatible: IE=edge
DEBUG http-8080-9 [org.apache.http.headers ] - << X-DNS-Prefetch-Control: on
DEBUG http-8080-9 [org.apache.http.headers ] - << Vary: Accept-Encoding
DEBUG http-8080-9 [org.apache.http.headers ] - << Content-Length: 1428
DEBUG http-8080-9 [org.apache.http.headers ] - << Connection: close
DEBUG http-8080-9 [org.apache.http.headers ] - << Content-Type: application/json
DEBUG http-8080-9 [org.apache.http.wire ] - << "{"generated_in":"0.0186","stat":"ok","person":{"created_on":"2013-12-02 09:38:26","id":"
","is_contact":"0","is_plus":"0","is_pro":"0","is_staff":"0","is_subscribed_to":"0","username":"user_","display_name":"","location":"","url":[""],"bio":"","number_of_contacts":"0","number_of_uploads":"0","number_of_likes":"0","number_of_videos":"0","number_of_videos_appears_in":"0","number_of_albums":"0","number_of_channels":"0","number_of_groups":"0","profileurl":"http://vimeo.com/user","videosurl":"http://vimeo.com/user_/videos","portraits":{"portrait":[]}}}[\n]"
DEBUG http-8080-9 [e.http.impl.conn.DefaultClientConnection] - Connection 0.0.0.0:51184<->74.123.133.112:443 closed
DEBUG http-8080-9 [impl.conn.PoolingClientConnectionManager] - Connection released: [id: 8][route: {s}->https://vimeo.com][total kept alive: 0; route allocated: 0 of 5; total allocated: 0 of 100]
WARN http-8080-9 [ork.social.connect.web.ConnectController] - Exception while handling OAuth1 callback (Could not read JSON: Can not construct instance of org.codehaus.jackson.JsonNode, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information
at [Source: org.apache.http.conn.EofSensorInputStream@325a3b; line: 1, column: 1]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of org.codehaus.jackson.JsonNode, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information
at [Source: org.apache.http.conn.EofSensorInputStream@325a3b; line: 1, column: 1]). Redirecting to vimeo connection status page.
DEBUG http-8080-9 [ty.web.access.ExceptionTranslationFilter] - Chain processed normally

I work on newer spring versions
org.springframework.social-version 1.1.0.BUILD-SNAPSHOT
org.springframework-version 3.2.3.RELEASE
org.springframework.security-version 3.1.4.RELEASE
Maybe this is the problem.

@soldierkam
Copy link
Owner

What is the version of jackson library?

@klawel
Copy link
Author

klawel commented Dec 4, 2013

I use the following versions of org.codehaus.jackson:

<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.13</version>
AND
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>

I tried to establish vimeo connection in spring-social-quickstart-3.0.x with 1.9.13 and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants