Random LoginManager logIn Errors #286
Comments
Im having the exact same Issue and was just gonna post it. To verify that this was a bug I created a clean project and only added the facebook button and the necessary keys in info plist and it fails about 1 out of 4. |
having the same problem. |
same problem. Looks like error is FBSDKLoginErrorBadChallengeString. The strings differs in one symbol: This plus symbol causes the error. In FBSDKUtility.m line 65-67.
Resolution: challenge received can contain plus symbol, and URLDecode replaces it with space explicitly. Challenge expected and received are not equal - and that's the reason of error. @lostatseajoshua what can be the solution for this bug? Is it: don't send For anyone who wants to fix this issue manually (quick and dirty method), please check the PR: facebook/facebook-ios-sdk#922 |
Discussion: challengeReceived will never contain '+' symbol, reason: in FBSDKUtility.m line 65-67, URLDecode explicitly replaces '+' signs with ' '. Do the same for stored in keychain challengeExpected. Related to special symbol '+' in url encoded string.
Thanks a lot rinat , that solved the issue. |
This PR shows that the error is in the underlying ObjC SDK: facebook/facebook-ios-sdk#922 Closing this issue for now. Follow along with the mentioned PR for details. |
Summary: Original issue: facebookarchive/facebook-swift-sdk#286 Discussion: challengeReceived will never contain '+' symbol, reason: in FBSDKUtility.m line 65-67, URLDecode explicitly replaces '+' signs with ' '. Do the same for stored in keychain challengeExpected. Related to special symbol '+' in url encoded string. - [+] sign [contributor license agreement](https://developers.facebook.com/opensource/cla) - [+] describe the change (for example, what happens before the change, and after the change) Before the change: login fails with 308 error if challenge contains `+` sign. After the change: no random login failures. Pull Request resolved: #922 Reviewed By: dreamolight Differential Revision: D12852620 Pulled By: codytwinton fbshipit-source-id: 4ae370074b3f65cde64a4deaa0f983f9feee70db
I am still getting this error 1 out of 5 times, on checking I found the following |
Another example |
@kamrankhan07 I was experiencing the issue with 4.38. Updated to 4.39.1, still getting the same error, sporadically. What's "weirder" is that it seems that, if I perform the login more "slowly", I won't get the error. If I do it fast (natural pace), it will trigger the error almost every time. Let me know how you got this working (downgrade to 4.37?). Thanks! |
@bptstmlgt please check this link I was facing another issue stating something like "Software caused connection abort", on checking I found the above link, you can check the description there. I think your issue is most likely this one that I faced. I implemented suggestion A and it works 5/5 times now.
|
@kamrankhan07 I just did that indeed, right after my comment (clean build + derived data) and so far the issue is gone. Thanks for the quick answer! |
Same for me, using version 4.38.1. Any updates on this issue? Works like a charm without the hotfix. |
@ciprian-antal-3PG It was fixed again in 4.39.1 |
Random LoginManager logIn Errors. Code=308
Environment
10.0 (10A255)
4.2
Carthage
version0.31.1
Issue Details
I am getting sporadic
Error Domain=com.facebook.sdk.login Code=308 "(null)"
errors when trying to use the login manager like so:My initialization code in AppDelegate.swift
There is a similar issue here, however, the resolution of enabling keychain sharing in my app did not fix my problem. Retrying logging in eventually works.
The text was updated successfully, but these errors were encountered: