tylerbenson / vyllage

https://www.vyllage.com
4 stars 0 forks source link

Facebook connect throws Exception #1222

Closed UnspeakableHorror closed 8 years ago

UnspeakableHorror commented 8 years ago

com.sun.xml.internal.ws.encoding.soap.SerializationException @ JdkSerializationRedisSerializer line: 52

org.springframework.core.serializer.support.SerializationFailedException: Failed to serialize object using DefaultSerializer; nested exception is java.io.NotSerializableException: org.springframework.social.facebook.api.CoverPhoto

And

org.springframework.http.converter.HttpMessageNotReadableException: Could not read document: Numeric value (2505397589) out of range of int
 at [Source: java.io.ByteArrayInputStream@22b246bf; line: 1, column: 1562] 
through reference chain: org.springframework.social.facebook.api.User["video_upload_limits"]->org.springframework.social.facebook.api.VideoUploadLimits["size"]);
 nested exception is com.fasterxml.jackson.databind.JsonMappingException: Numeric value (2505397589) out of range of int
 at [Source: java.io.ByteArrayInputStream@22b246bf; line: 1, column: 1562] 
through reference chain: org.springframework.social.facebook.api.User["video_upload_limits"]-> org.springframework.social.facebook.api.VideoUploadLimits["size"])
UnspeakableHorror commented 8 years ago

The good news is that is not our code, the bad news is that is not our code... It doesn't even reach the controller, I think Facebook changed something, that's why it fails and then we get the NotSerializableException.

Edit: found it, Facebook changed the limits.

http://stackoverflow.com/questions/34125425/spring-social-facebook-login-error-numeric-value-out-of-range-of-int

We are using spring-social-facebook 2.0.3 though, it should have been fixed there according to the accepted answer :/

UnspeakableHorror commented 8 years ago

Hmm, I think it's using the wrong library version, it's a long not an int.

UnspeakableHorror commented 8 years ago

Jackson insists it's an int...