Closed sentrashi closed 2 years ago
Thanks for filing this, @sentrashi. To have a better understanding of what's happening here, could you provide an MCVE or detailed steps in reproducing this issue?
Hey @sentrashi. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Sorry, can't provide steps or MCVE - Its very rare crash.
IPhone X Sign with Email and Password return nil user, each other IPhone version work good
Hi @sentrashi, we can't investigate the issue further without enough information. Could you provide the detailed steps in reproducing the issue? Thanks.
Hi! I also have few crashes in AppsFlyer, and they think they're related to Firebase. Here is the message from them
Hi,
After checking with our R&D team, it seems this issue is not on our side, it might be an issue with one of the third-party libraries you mentioned, as the error starts from [NSOperation init] when we simply use [super init] and it leads to NSObject.__old_unswizzled_keyPathsForValuesAffectingValue. We have found a similar issue to yours in the issues of firebase-ios-SDK, which is related to FirebaseMessaging that you use, the initial stack trace looks identical to yours.
It looks like the issue might stem from Firebase and I can only suggest you contact their support or open an issue with them on their GitHub page if this issue keeps happening.
If you have any additional questions - I'll be happy to answer them. Best Regards, Dima | Mobile/SDK Support Engineer
Here is their crash:
Recently got following crash Library
Crash
Crashed: com.appsflyer.serial EXC_BREAKPOINT 0x00000001e63deba0 0 libswiftCore.dylib specialized assertionFailure(:_:file:line:flags:) + 360 1 libswiftCore.dylib assertionFailure(:_:file:line:flags:) + 32 2 libswiftFoundation.dylib @objc static NSObject.old_unswizzled_keyPathsForValuesAffectingValue(forKey:) + 84 3 libswiftFoundation.dylib static KVOKeyPathBridgeMachinery.keyPathsForValuesAffectingValue(forKey:) + 272 4 libswiftFoundation.dylib @objc static __KVOKeyPathBridgeMachinery.keyPathsForValuesAffectingValue(forKey:) + 88 5 Foundation -[NSKeyValueUnnestedProperty _givenPropertiesBeingInitialized:getAffectingProperties:] + 196 6 Foundation -[NSKeyValueUnnestedProperty _initWithContainerClass:key:propertiesBeingInitialized:] + 148 7 Foundation NSKeyValuePropertyForIsaAndKeyPathInner.llvm.8205242823520915647 + 288 8 Foundation NSKeyValuePropertyForIsaAndKeyPath + 140 9 Foundation _NSKeyValueCreateImplicitObservationInfo + 224 10 Foundation -[NSOperation init] + 372 11 Markirovka -[AFSDKOperation initWithOperationId:userObject:executionBlock:] + 108 12 Markirovka +[AFSDKOperation Id:userObject:executionBlock:] + 100 13 Markirovka 37-[AppsFlyerLib willResolveSKRules:]_block_invoke + 1132 14 libdispatch.dylib _dispatch_client_callout + 16 15 libdispatch.dylib _dispatch_once_callout + 28 16 Markirovka -[AppsFlyerLib willResolveSKRules:] + 400 17 Markirovka 30-[AppsFlyerLib setAppleAppID:]_block_invoke + 40 18 libdispatch.dylib _dispatch_call_block_and_release + 24 19 libdispatch.dylib _dispatch_client_callout + 16 20 libdispatch.dylib _dispatch_lane_serial_drain$VARIANT$mp + 592 21 libdispatch.dylib _dispatch_lane_invoke$VARIANT$mp + 428 22 libdispatch.dylib _dispatch_workloop_worker_thread + 596 23 libsystem_pthread.dylib _pthread_wqthread + 304 24 libsystem_pthread.dylib start_wqthread + 4
Crash descritpion crash_info_entry_0 Fatal error: Should never be reached: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang_overlay_Foundation_Device/swiftlang-1001.2.63.13/swift/stdlib/public/SDK/Foundation/NSObject.swift, line 46
Event summary iOS 12.5.5 iPhone 5s Nov 23, 2021, 2:11:18 PM
And here is all KVO info from app
What was called
Pods->GooleUtilities [[GULAppDelegateSwizzler sharedApplication] addObserver:self forKeyPath:kGULAppDelegateKeyPath options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil]; _isObserving = YES;
firebasemessaging [userNotificationCenter addObserver:self forKeyPath:NSStringFromSelector(@selector(delegate)) options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:UserNotificationObserverContext];
svgkit [selfaddObserver:selfforKeyPath:@"DOMTree.viewport"options:NSKeyValueObservingOptionOldcontext:nil];
our code
and code for it
extensionUITableView {
func register
func dequeue<Cell>(_ reusableCell: Cell.Type) -> Cell? where Cell: UITableViewCell {
returndequeueReusableCell(withIdentifier: reusableCell.identifier) as? Cell
}
What wasn’t called, but present in pods
GTMSessionFetcher
NSNotificationCenter *nc = [NSNotificationCenterdefaultCenter]; [nc addObserver:self selector:@selector(reconnectFetchersForBackgroundSessionsOnAppLaunch:) name:UIApplicationDidFinishLaunchingNotification object:nil];
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc addObserver:self selector:@selector(reconnectFetchersForBackgroundSessionsOnAppLaunch:) name:NSApplicationDidFinishLaunchingNotification object:nil];
[self uploadFetchersForBackgroundSessions];
}
amplitude (void) addObservers { NSNotificationCenter *center = [NSNotificationCenterdefaultCenter]; [center addObserver:self selector:@selector(enterForeground) name:UIApplicationWillEnterForegroundNotification object:nil]; [center addObserver:self selector:@selector(enterBackground) name:UIApplicationDidEnterBackgroundNotification object:nil]; }
firebase messaging [center addObserver:self selector:@selector(defaultFCMTokenWasRefreshed:) name:kFIRMessagingRegistrationTokenRefreshNotification object:nil];
google toolboxForMac [userDefaults_addObserver:self forKeyPath:kVerboseLoggingKey options:NSKeyValueObservingOptionInitial context:nil];
googleUtilities->GULSceneDelegateSwizzzler [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleSceneWillConnectToNotification:) name:UISceneWillConnectNotification object:nil]; }
GMTSessionfetcher
NSNotificationCenter *nc = [NSNotificationCenterdefaultCenter]; [nc addObserver:self selector:@selector(reconnectFetchersForBackgroundSessionsOnAppLaunch:) name:UIApplicationDidFinishLaunchingNotification object:nil];
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc addObserver:self selector:@selector(reconnectFetchersForBackgroundSessionsOnAppLaunch:) name:NSApplicationDidFinishLaunchingNotification object:nil];
mindbox internalfuncsetupObservers() { didEnterBackgroundApplication = NotificationCenter.default.addObserver( forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: nil) { [weakself] (_) in
self?.invalidate()
}
didBecomeActiveApplication = NotificationCenter.default.addObserver(
forName: UIApplication.didBecomeActiveNotification,
object: nil,
queue: nil) { [weakself] (_) in
if self?.timer == nil {
self?.setupTimer()
}
}
}
Realm, RealmSwift a lot of them
SDWebImage [config addObserver:selfforKeyPath:NSStringFromSelector(@selector(maxMemoryCost)) options:0context:SDMemoryCacheContext]; [config addObserver:selfforKeyPath:NSStringFromSelector(@selector(maxMemoryCount)) options:0context:SDMemoryCacheContext];
SBGKit [_imageaddObserver:selfforKeyPath:@"size"options:NSKeyValueObservingOptionNewcontext:(bridgevoid _Nullable)(internalContextPointerBecauseApplesDemandsIt)]; [selfaddObserver:selfforKeyPath:@"image"options:NSKeyValueObservingOptionNewcontext:(__bridgevoid _Nullable)(internalContextPointerBecauseApplesDemandsIt)]; [selfaddObserver:selfforKeyPath:@"tileRatio"options:NSKeyValueObservingOptionNewcontext:(bridgevoid _Nullable)(internalContextPointerBecauseApplesDemandsIt)]; [selfaddObserver:selfforKeyPath:@"showBorder"options:NSKeyValueObservingOptionNewcontext:(__bridgevoid _Nullable)(internalContextPointerBecauseApplesDemandsIt)]; [selfaddObserver:selfforKeyPath:@"layer"options:NSKeyValueObservingOptionNewcontext:(__bridgevoid _Nullable)(internalContextPointerBecauseApplesDemandsIt)]; [self.layeraddObserver:selfforKeyPath:@"transform"options:NSKeyValueObservingOptionNewcontext:(__bridgevoid _Nullable)(internalContextPointerBecauseApplesDemandsIt)]; [[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(didReceiveMemoryWarningOrBackgroundNotification:) name:UIApplicationDidReceiveMemoryWarningNotificationobject:nil]; [[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(didReceiveMemoryWarningOrBackgroundNotification:) name:UIApplicationDidEnterBackgroundNotificationobject:nil]; [selfaddObserver:selfforKeyPath:@"DOMTree.viewport"options:NSKeyValueObservingOptionOldcontext:nil];
our code scrollView?.addObserver(self, forKeyPath: "contentOffset", options: [.new, .old], context: nil) windowAppearanceObserver = NotificationCenter.default.addObserver( forName: UIWindow.didBecomeKeyNotification, object: nil, queue: .main) { [weak ...
Thanks for the info, @sentrashi. We'll try and investigate this, but for the meantime, can you try using our latest SDK version (8.10.0) to check if that resolves the issue?
Hey @sentrashi. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@sentrashi if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Step 0: Are you in the right place?
firebase
tag.[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
Crashed: com.apple.main-thread 0 libswiftCore.dylib 0x204ba0 specialized assertionFailure(:_:file:line:flags:) + 360 1 libswiftCore.dylib 0x282bc assertionFailure(:_:file:line:flags:) + 32 2 libswiftFoundation.dylib 0xa3d10 @objc static NSObject.old_unswizzled_keyPathsForValuesAffectingValue(forKey:) + 84 3 libswiftFoundation.dylib 0xa436c static KVOKeyPathBridgeMachinery.keyPathsForValuesAffectingValue(forKey:) + 272 4 libswiftFoundation.dylib 0xa4864 @objc static KVOKeyPathBridgeMachinery.keyPathsForValuesAffectingValue(forKey:) + 88 5 Foundation 0x9d58 -[NSKeyValueUnnestedProperty _givenPropertiesBeingInitialized:getAffectingProperties:] + 196 6 Foundation 0x9a5c -[NSKeyValueUnnestedProperty _initWithContainerClass:key:propertiesBeingInitialized:] + 148 7 Foundation 0xfcb9c NSKeyValuePropertyForIsaAndKeyPathInner.llvm.8205242823520915647 + 288 8 Foundation 0xfd374 NSKeyValuePropertyForIsaAndKeyPath + 140 9 Foundation 0xfbbe0 _NSKeyValueCreateImplicitObservationInfo + 224 10 Foundation 0x1d174 -[NSOperation init] + 372 11 FirebaseMessaging 0x21218 -[FIRMessagingTokenOperation initWithAction:forAuthorizedEntity:scope:options:checkinPreferences:instanceID:] + 55 (FIRMessagingTokenOperation.m:55) 12 FirebaseMessaging 0x1bce4 -[FIRMessagingTokenFetchOperation initWithAuthorizedEntity:scope:options:checkinPreferences:instanceID:] + 52 (FIRMessagingTokenFetchOperation.m:52) 13 FirebaseMessaging 0x1ffe4 -[FIRMessagingTokenManager createFetchOperationWithAuthorizedEntity:scope:options:instanceID:] + 534 (FIRMessagingTokenManager.m:534) 14 FirebaseMessaging 0x1eb08 -[FIRMessagingTokenManager fetchNewTokenWithAuthorizedEntity:scope:instanceID:options:handler:] + 267 (FIRMessagingTokenManager.m:267) 15 FirebaseMessaging 0x1e960 __76-[FIRMessagingTokenManager tokenWithAuthorizedEntity:scope:options:handler:]_block_invoke_2.102 + 248 (FIRMessagingTokenManager.m:248) 16 FirebaseInstallations 0x7c80 49-[FIRInstallations installationIDWithCompletion:]_block_invoke + 210 (FIRInstallations.m:210) 17 FBLPromises 0xdae0 __56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.48 + 273 (FBLPromise.m:273) 18 libdispatch.dylib 0x5fa38 _dispatch_call_block_and_release + 24 19 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16 20 libdispatch.dylib 0xde50 _dispatch_main_queue_callback_4CF$VARIANT$mp + 628 21 CoreFoundation 0xaab20 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12 22 CoreFoundation 0xa5a58 __CFRunLoopRun + 1924 23 CoreFoundation 0xa4fb4 CFRunLoopRunSpecific + 436 24 GraphicsServices 0xa79c GSEventRunModal + 104 25 UIKitCore 0x8bcc38 UIApplicationMain + 212 26 Markirovka 0x153c0 main + 27 (AppDelegate.swift:27) 27 libdyld.dylib 0x18e0 start + 4
Device Model:iPhone X Orientation: Portrait RAM free: 55.64 MB Disk free: 2.43 GB Operating System Version:15.1.0 Orientation: Portrait Jailbroken:No Crash Date:Nov 23, 2021, 10:14:47 PM App version:4.19.0 (119)
Steps to reproduce:
What happened? How can we make the problem occur? This could be a description, log/console output, etc.
If you have a downloadable sample project that reproduces the bug you're reporting, you will likely receive a faster response on your issue.
Relevant Code: