facebook / facebook-ios-sdk

Used to integrate the Facebook Platform with your iOS & tvOS apps.
https://developers.facebook.com/docs/ios
Other
7.8k stars 3.56k forks source link

Suddenly FBSDKRestrictiveDataFilterManager.m - Line 71 started to crash #1373

Closed chuganzy closed 4 years ago

chuganzy commented 4 years ago

Checklist

Crash

It suddenly started to crash from 14:44 PST 5/6/2020. Assuming that something is going wrong in Facebook API server.

for (NSString *eventName in restrictiveParams.allKeys) {
    if (restrictiveParams[eventName][@"is_deprecated_event"]) { // <- here crashes
        [deprecatedEventSet addObject:eventName];
    }
    if (restrictiveParams[eventName][@"restrictive_param"]) {
        FBSDKRestrictiveEventFilter *restrictiveEventFilter = [[FBSDKRestrictiveEventFilter alloc] initWithEventName:eventName
                                                                                                        eventParams:restrictiveParams[eventName][@"restrictive_param"]];
        [eventFilterArray addObject:restrictiveEventFilter];
    }
}

Environment

FBSDKCoreKit (5.11.0)

Goals

Solve the crashing issue

Expected Results

Solve the crashing issue

Actual Results

Crashing

Steps to Reproduce

N/A

Code Samples & Details

N/A

jstheoriginal commented 4 years ago

Started crashing for us at 4:43pm as well (~40 minutes ago).

GLJeffery commented 4 years ago

We are also experiencing this at 4:46 EST

jstheoriginal commented 4 years ago

Possibly something was turned on remotely for the new 7.0.0 release that just got published?

narlei commented 4 years ago

Here too, started some hours ago.

For me, I can only see in crashalytics:

Fatal Exception: NSInvalidArgumentException
-[__NSCFBoolean objectForKeyedSubscript:]: unrecognized selector sent to instance 0x200729d00
-[NSOrderedSet initWithSet:copyItems:]
xdoug7 commented 4 years ago

Same here, started 6:42 (UTC-3)

kevinmbeaulieu commented 4 years ago

We're seeing this on version 5.15.1, if that helps

Abeansits commented 4 years ago

When you guys revert, is that an immediate rollout or is it phased? @tianqibt

kevinmbeaulieu commented 4 years ago

@tianqibt I'm still able to repro the crash. Has the revert been deployed?

narlei commented 4 years ago
Screen Shot 2020-05-06 at 19 41 19

No more crashes here too. Thanks for solve fast.

GLJeffery commented 4 years ago

@tianqibt I'm still able to repro the crash. Has the revert been deployed?

If you don't mind, what were your replication steps? It feels like it's not 100% crash rate but just some users.

marksvend commented 4 years ago

Our crash is happening to 40% of new app starts. It has not dropped yet.

hberberoglu commented 4 years ago

We are also experiencing this. It started ~1 hour ago.

kevinmbeaulieu commented 4 years ago

~I literally just ran our app in the iOS simulator and it crashed on launch. Didn't do any special setup. And I seem to be getting the crash 100% of the time in my simulator~ Update (3:50PM PST): Not seeing the crash in the simulator anymore

mmdock commented 4 years ago
Screen Shot 2020-05-06 at 3 44 20 PM

Looks like it stopped for us based on Crashlytics, but keeping an eye on other crash numbers and gonna try the build manually soon.

marksvend commented 4 years ago

This is still a major problem for us. 47% of app starts are still crashing.

john-mejia commented 4 years ago

This seems to still be happening, and I notice a lot of my other production apps (not owned by me)

mgray88 commented 4 years ago

We're still seeing issues in Sentry, and I'm reproducing this in the simulator

chrismcs commented 4 years ago

Still a major issue for us as well - we're reproducing 100% crash on launch for our production apps

paulbruneau commented 4 years ago

Our rate has dropped as reported by New Relic. Not down to zero yet.

scelis commented 4 years ago

Our app is definitely still crashing on launch as well.

marksvend commented 4 years ago

It appears the cause is this configuration the Facebook SDK is receiving from the mothership for restrictiveParams:

"restrictive_data_filter_params" = "{\"is_health_app\":false}";

The value is expected to be a dictionary, not a BOOL.

Abeansits commented 4 years ago

@tianqibt can you speak more to how your rollback strategy works? When can we expect a 100% rollout?

PatrickDanino commented 4 years ago

This raises a number of questions beyond this particular incident:

prachigauriar commented 4 years ago

Grubhub is seeing a significant number of crashes on launch still. Multiple relaunches seems to solve the problem.

patrickweekes commented 4 years ago

The crash is still reproducible for us in the simulator when we launch the app: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean objectForKeyedSubscript:]: unrecognized selector sent to instance 0x7fff8061ea20'

malonehedges commented 4 years ago

We're still seeing a lot of crashes on our app as well

ripalsanghani commented 4 years ago

We're also experiencing a high level of crashes

RealBug commented 4 years ago

Same for us 😢

mmdock commented 4 years ago

UPDATE: even though I am not seeing new crashes in Crashlytics, strangely still seeing this crash occur on simulator and when i build to my device. I wonder if Crashlytics went down because of the number of crash reports they are receiving from this

AndrewYab commented 4 years ago

We're still receiving a huge number of app crashes upon launch.... This is so bad for our users.... The only way to pass this, is to re-load the app multiple times, but that is not realistic. Also, new acquired users will not put the effort and time to open up the app multiple times. Please solve this swiftly.

luoser commented 4 years ago

nooo this sdk rules aha

jschwab923 commented 4 years ago

Just another voice in the mix to say it's still occurring for my app. West coast and mountain areas confirmed still crashing, possibly working in Central?

legendstyler commented 4 years ago

We're seeing a significant number of crashes on launch from this issue as well. Opening multiple times fixes it temporarily, then it happens again!

paulbruneau commented 4 years ago

The crashes only get reported by crash sdks after the next launch also, right? So we should expect to see crash reports for some time

kleiberjp commented 4 years ago

We're seeing a lot of crashes at launch app.. here is the stack trace for the crashes reported

Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x1bce08164 __exceptionPreprocess 1 libobjc.A.dylib 0x1bcb1cc1c objc_exception_throw 2 CoreFoundation 0x1bcd067e0 -[NSOrderedSet initWithSet:copyItems:] 3 CoreFoundation 0x1bce0c85c __forwarding__ 4 CoreFoundation 0x1bce0eb60 _CF_forwarding_prep_0 5 Grability 0x105a3f74c +[FBSDKEventDeactivationManager updateDeactivatedEvents:] 6 Grability 0x105a6210c +[FBSDKServerConfigurationManager processLoadRequestResponse:error:appID:] 7 Grability 0x105a6195c __78+[FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:]_block_invoke 8 Grability 0x105a4e850 -[FBSDKGraphRequestMetadata invokeCompletionHandlerForConnection:withResults:error:] 9 Grability 0x105a4c12c __82-[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:]_block_invoke 10 Grability 0x105a4c020 -[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:] 11 Grability 0x105a4bc30 __64-[FBSDKGraphRequestConnection completeWithResults:networkError:]_block_invoke 12 CoreFoundation 0x1bcdda4e0 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ 13 CoreFoundation 0x1bccd7f98 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] 14 Grability 0x105a4b9f4 -[FBSDKGraphRequestConnection completeWithResults:networkError:] 15 Grability 0x105a4aea8 -[FBSDKGraphRequestConnection completeFBSDKURLSessionWithResponse:data:networkError:] 16 Grability 0x105a49090 __36-[FBSDKGraphRequestConnection start]_block_invoke_3

Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x1f788b180 __exceptionPreprocess 1 libobjc.A.dylib 0x1f6a639f8 objc_exception_throw 2 CoreFoundation 0x1f77a79bc -[NSOrderedSet initWithSet:copyItems:] 3 CoreFoundation 0x1f78909c8 __forwarding__ 4 CoreFoundation 0x1f789265c _CF_forwarding_prep_0 5 Grability 0x101dab990 +[FBSDKRestrictiveDataFilterManager updateFilters:] 6 Grability 0x101dae0f4 +[FBSDKServerConfigurationManager processLoadRequestResponse:error:appID:] 7 Grability 0x101dad95c __78+[FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:]_block_invoke 8 Grability 0x101d9a850 -[FBSDKGraphRequestMetadata invokeCompletionHandlerForConnection:withResults:error:] 9 Grability 0x101d9812c __82-[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:]_block_invoke 10 Grability 0x101d98020 -[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:] 11 Grability 0x101d97c30 __64-[FBSDKGraphRequestConnection completeWithResults:networkError:]_block_invoke 12 CoreFoundation 0x1f777454c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] 13 Grability 0x101d979f4 -[FBSDKGraphRequestConnection completeWithResults:networkError:] 14 Grability 0x101d96ea8 -[FBSDKGraphRequestConnection completeFBSDKURLSessionWithResponse:data:networkError:] 15 Grability 0x101d95090 __36-[FBSDKGraphRequestConnection start]_block_invoke_3

prizrak commented 4 years ago

It was the last straw. Will remove facebook sdk IMMEDIATELY.

RGG-jayoung commented 4 years ago

We are also seeing heightened crashes at app open. @tianqibt is there any sense of how long it takes for these changes to propagate?

msilva commented 4 years ago

The crashes only get reported by crash sdks after the next launch also, right? So we should expect to see crash reports for some time

But the timestamp will be logged when it actually happened, correct?

stevestreza commented 4 years ago

Firebase itself looks like it might just be overwhelmed with crash reports.

fireup commented 4 years ago

Even after I commented out the FBSDK setup code in AppDelegate, it still crashes.

jschwab923 commented 4 years ago

@fireup Are you using another SDK that hit's the FBSDK? That's what I'm seeing in my app. Branch SDK uses FBSDK.

kajensen commented 4 years ago

Move fast and break things

JeffLutzenberger commented 4 years ago

Same - not the kind of up and to the right you want to see

Screen Shot 2020-05-06 at 5 25 42 PM
SterlingChin commented 4 years ago

Just adding to the voices, but our app is crashing. Reports started coming in around the same time as everyone else.

Edit: We aren't getting notifications through new relic, or the app store. We only heard about this through our CS team.

yas375 commented 4 years ago

Just hit it with the simulator. My guess is some response from the server has been changed and it returns a bool where a dictionary is expected...

image
daniel-beard commented 4 years ago

Do you just not test changes before rolling them out? This is unacceptable.

EDIT: STILL CRASHING.

astarsoftware commented 4 years ago

It's crashing for us, but the crashes aren't showing in Firebase.

dive commented 4 years ago

Even after I commented out the FBSDK setup code in AppDelegate, it still crashes.

It does not matter. Their libraries are dynamic, and they abuse +load functions for classes with some business logic calls. So, +load will be called anyway on the application launch when dyld loads all linked frameworks.

ozanonurtek commented 4 years ago

I really don't understand why it is still crashing when we turn it off? Could you please explain, why there is a remote connection even we comment out the implementation? Linking binary framework just enough to break things down, why? What do you do in background? Sending or receiving some data even it's not been initialized?

Wapples commented 4 years ago

This is crashing Weedmaps on almost every load. Please provide an ETA for resolution as soon as possible.