-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[FBSDKAppEventsDeviceInfo encodedDeviceInfo] block in main thread #2103
Comments
same problem.have you resolved it? |
@wwc625 No, the official didn't reply, have you solved it? |
We have the same problem!
|
same problem here :( |
@pmanuelli Have you solved the Hang problem? |
Hello @linziyiwj. No, we haven't. But we are going to try updating to the 15.1 version of the SDK. Maybe the issue is solved there. |
Hello @pmanuelli The upgrade content of the official sdk does not mention the relevant optimization. Have you made any improvement after the upgrade |
@grestuccia1 Have you solved the Hang problem? |
@linziyiwj Have you solved the Hang problem? |
Hello. No, we are on version 15.1.0 and the issue persists... |
@kabigon1991 No, the Hang problem still exists |
Did anyone figure out the root cause? we know it's a deadlock, but why exactly? is it related to a network request? |
@alansteiman |
@linziyiwj we have not solved the issue, we downgraded to previous SDK version for now 😕 |
@alansteiman |
@linziyiwj very very old. |
@alansteiman Really too old version |
ហាយ |
|
Any updates? |
Any solutions? |
Many of our users have recently reported app hangs on launch, and we found that this issue is the root cause. |
YES, we adopted the same hook method two weeks ago, so far, the same lag does not appear online |
Any solutions? |
@gonsee how to make the work around ? |
@MahaGhanem Something like this @class FBSKDAppEventsDeviceInfo
@interface FBSKDAppEventsDeviceInfo (Workaround)
@end @import Foundation;
@import FBSDKCoreKit;
@import ObjectiveC.runtime;
@implementation FBSDKAppEventsDeviceInfo (Workaround)
+ (void)load
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Class class = [self class];
SEL originalSelector = @selector(encodedDeviceInfo);
SEL swizzledSelector = @selector(xxx_swizzled_encodedDeviceInfo);
Method originalMethod = class_getInstanceMethod(class, originalSelector);
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
IMP originalImp = method_getImplementation(originalMethod);
IMP swizzledImp = method_getImplementation(swizzledMethod);
class_replaceMethod(class,
swizzledSelector,
originalImp,
method_getTypeEncoding(originalMethod));
class_replaceMethod(class,
originalSelector,
swizzledImp,
method_getTypeEncoding(swizzledMethod));
});
}
- (nullable NSString *)xxx_swizzled_encodedDeviceInfo
{
return nil;
}
@end |
Same problem here. Suddenly after something I do not know why (our guess updating pods), magic happened, our application started to hang on main thread after 2-3 seconds on app open. Somehow, after some kill&open actions, app may start to work without hanging on main thread. Since it is so hard to regenerate the issue, we started building&running again on same device. It showed me the exact screen as @su855297 pointed out before me on May 3. I tried to swizzle as @gonsee pointed out, however I cannot manage to do it. @gonsee , The errors are like this; Thanks. |
@onursahindur I can't figure out what is the problem on your code, but the original issue may have been fixed according to this commit log. 6563a8c |
@gonsee Thank you for your response, I really appreciate. |
@onursahindur We are currently on 15.1.0. |
Checklist before submitting a bug report
Xcode version
13.4
Facebook iOS SDK version
14.1.0
Dependency Manager
CocoaPods
SDK Framework
Core
Goals
We want to solve the block of the main thread
Expected results
There will be no block of main thread
deadlock between thread 1 and thread 8
Actual results
It gets stuck in the main thread for a long time
Steps to reproduce
Unfortunately I have not been able to reproduce this block yet.
It is only reported in Xcode hangs.
Hope to recover as soon as possible
Code samples & details
No response
The text was updated successfully, but these errors were encountered: