I've started to receive crash logs through crashlytics after updating Facebook SDK from 3.5.3 to 3.9 in my app about an EXEC_BAD_ACCESS crash in FBAccessTokenData.m line 126
The crash doesn't reference the part in my app where this is getting called, unfortunately, and I've been unable to reproduce it, so I can't pinpoint where exactly in my app is causing this.
If is of any use, all crashes have been in iPhones running iOs 7.
Crash Log:
line 126:
if (accessToken == nil || [accessToken stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceCharacterSet]].length == 0) {
in
+ (FBAccessTokenData *) createTokenFromString:(NSString *)accessToken
permissions:(NSArray *)permissions
expirationDate:(NSDate *)expirationDate
loginType:(FBSessionLoginType)loginType
refreshDate:(NSDate *)refreshDate
permissionsRefreshDate:(NSDate *)permissionsRefreshDate
{
if (accessToken == nil || [accessToken stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceCharacterSet]].length == 0) {
return nil;
}
if (expirationDate == nil) {
expirationDate = [NSDate distantFuture];
}
if (refreshDate == nil) {
refreshDate = [NSDate date];
}
if (permissionsRefreshDate == nil) {
permissionsRefreshDate = [NSDate distantPast];
}
FBAccessTokenData* fbAccessToken = [[FBAccessTokenData alloc] initWithToken:accessToken
permissions:permissions
expirationDate:expirationDate
loginType:loginType
refreshDate:refreshDate
permissionsRefreshDate:permissionsRefreshDate];
return [fbAccessToken autorelease];
}
We've looked in to this issue and it appears to be a bug in the Facebook iOS SDK.
Reverting the pod by using the following podspec line has stopped us seeing this.
pod 'Facebook-iOS-SDK', '~>3.8.0'
This has been fixed in version 3.11.1 of the SDK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With