-
Notifications
You must be signed in to change notification settings - Fork 80
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
Many crash in TWTRAPIClient #29
Comments
We have the same issue. 1K crashes in one hour. I will be tracking this post and adding any updates from our side 👍 |
My findings: TWTRGuestAuthRequestSigner.m#L31 [mutableRequest setValue:session.guestToken forHTTPHeaderField:TWTRGuestTokenHeaderField]; ^ From the crash report we can tell that Chasing the TWTRAuthenticationProvider.m#L38 json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError]; Meaning Twitter changed the token it returns from The recommended fix would be something like this: - NSString *guestToken = sessionDictionary[TWTRGuestAuthOAuthTokenKey];
+ NSString *guestToken = nil;
+ id rawToken = sessionDictionary[TWTRGuestAuthOAuthTokenKey];
+ if ([rawToken isKindOfClass:NSNumber.class]) {
+ guestToken = [(NSNumber *)rawToken stringValue];
+ } else {
+ guestToken = (NSString *)rawToken;
+ } (assuming Twitter's API accepts their token as a string in later requests) We have not tried/confirmed the fix yet since we cannot reproduce the crash. |
I was able to reproduce this using a jailbroken device and modifying
I was able to replicate the crash in Xcode. It is exactly the same or at least very similar as I've been seeing in my logs. It is in fact due to |
Twitter seems to have fixed their mistake since our crashes have basically stopped. |
Same in my project. It's stoped about 10 hours ago. |
I cannot reproduced the issue, but I got +5k crash reports in this past few hours from our app.
Seems the crash is happened inside of TWTRAPIClient.
My code
Does anyone have same issue?
The text was updated successfully, but these errors were encountered: