Live data from Hacker News

App suddenly crashing on startup due to FBSDKRestrictiveDataFilterManager.m

github.com

71–80 of 446 posts

Re: App suddenly crashing on startup due to FBSDKRestrictiveDataFilterManager.m

#71
post #20

Workaround for users: Enable airplane mode and disable WiFi, or block facebook domains Workaround for developers: Go to Facebook Developer page > Analytics and disable automatic Events.[0] Apparently this doesn't solve the issue for everyone. Issue in Facebook's tracker: https://developers.facebook.com/status/issues/17391881029111... [0] https://github.com/facebook/facebook-ios-sdk/issues/1427#iss...

Do you know which domains one would need to block?

    facebook.com
    fbcdn.com
    fbcdn.net
    fbsbx.com
    fb.com
    instagram.com
WhatsApp can work without these, but maybe a smaller subset would suffice. NextDNS[0] for iOS can be used for the blocking.

[0] https://nextdns.io/

Re: App suddenly crashing on startup due to FBSDKRestrictiveDataFilterManager.m

#72
post #23

Given how protective Apple is about the experience of apps on the App Store and this happening the second time, I'm surprised they have not come up with a way to prevent this from happening. Also, a monolithic SDK should not exist in this day and age.

#DefundFacebook

Re: App suddenly crashing on startup due to FBSDKRestrictiveDataFilterManager.m

#73
post #58

Can confirm that blocking Facebook on my iPhone makes these crashes go away. All in all I might leave that block up permanently as nothing going to those addresses does me any good

How do you do that? At OS level with a setting? Networking changes?

I use an app called AdBlock https://apps.apple.com/app/apple-store/id691121579?pt=425087...

It creates a local VPN that sets up a local filtering DNS. I just added the following domains to the block list:

   facebook.com
    fbcdn.com
    fbcdn.net
    fbsbx.com
    fb.com

Re: App suddenly crashing on startup due to FBSDKRestrictiveDataFilterManager.m

#75
post #70
post #63

How is Apple not addressing this? This seems like a pretty glaring hole in their tightly controlled environment. If the SDK is injecting code, shouldn’t that be an explicit permission?

It's "inside" the application and the code is injected at build time, by the sounds of it.

Thanks for clearing that up. I wonder if developers actually know they are signing up for this when blindly dropping in the SDK, just to support FB login.

I’m surprised most popular apps haven’t learnt their lesson since this happened last month as well.

Re: App suddenly crashing on startup due to FBSDKRestrictiveDataFilterManager.m

#77
post #32

The risk of crashes increase the more third-party SDKs you include. Especially if they use an external service or API which is the case here.

* Especially if the 3rd party SDK contacts the external service on launch without any user interaction.

Re: App suddenly crashing on startup due to FBSDKRestrictiveDataFilterManager.m

#78
post #64

Waze, a google owned app for the past 4 years, crashes because of the FB app. WhatsApp, a Facebook owned app, will not give you read access to your own chat database - it’s encrypted. But they have an arrangement with Google where it’s will back up unencrypted to your Google account (though, Google won’t let you retrieve it ... only the WhatsApp app can) Everything about this duopoly, their cooperation and lack of co…

> WhatsApp, a Facebook owned app, will not give you read access to your own chat database - it’s encrypted.

On android? On iOS you can get a tarball of all your chats.

Re: App suddenly crashing on startup due to FBSDKRestrictiveDataFilterManager.m

#79

How is it that a third party SDK is consistently causing apps to completely crash rather than, for example, displaying an error message? Is this a failure that cannot be caught? Sorry, just trying to understand. The dependency relationship just seems to be extreme.

My guess in this particular instance is that it seems like the Facebook SDK is fetching some sort of remote serialized configuration, calling “count” on what it expects to be an array, and instead is calling it on NSNull (an object representing “null”) which is throwing an exception. There are some intricacies on iOS surrounding null values and serialization, and as a developer it is important to understand that you…

This is exactly what happens. Basically a null value is converted into an NSNull object and calling count on it will of course throw an exception... because there is no count method in that class...

It makes me wonder what all those engineers at FB are actually doing... ? Every time I tried to integrate or look into the FB SDK for simple functionality it was a total clusterfuck.

Re: App suddenly crashing on startup due to FBSDKRestrictiveDataFilterManager.m

#80

Earlier quoted context omitted.

My guess in this particular instance is that it seems like the Facebook SDK is fetching some sort of remote serialized configuration, calling “count” on what it expects to be an array, and instead is calling it on NSNull (an object representing “null”) which is throwing an exception. There are some intricacies on iOS surrounding null values and serialization, and as a developer it is important to understand that you…

Could also be a string that’s no longer there Source: have had that issue before Also maybe it’s time for them to start rewriting things in Swift, where this would be much less likely to happen

True enough. Swift Codable with optional properties handles this automatically.
Post reply on HN