{"id":28891,"date":"2020-05-07T15:51:07","date_gmt":"2020-05-07T19:51:07","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=28891"},"modified":"2020-05-14T15:06:42","modified_gmt":"2020-05-14T19:06:42","slug":"facebook-sdk-causes-crashes","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2020\/05\/07\/facebook-sdk-causes-crashes\/","title":{"rendered":"Facebook SDK Causes Crashes"},"content":{"rendered":"<p><a href=\"https:\/\/www.macrumors.com\/2020\/05\/06\/facebook-sdk-issue-causing-some-ios-apps-to-crash\/\">Juli Clover<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=23097459\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/www.macrumors.com\/2020\/05\/06\/facebook-sdk-issue-causing-some-ios-apps-to-crash\/\"><p>Multiple iPhone and iPad users are seeing their apps crashing at launch as of this afternoon, and the issue appears to be caused by a faulty Facebook SDK that the apps are using.<\/p>\n<p>[&#8230;]<\/p>\n<p>Multiple developers <a href=\"https:\/\/github.com\/facebook\/facebook-ios-sdk\/issues\/1374\">on GitHub<\/a> have attributed the problem to a Facebook software development kit used by the apps for sign-in purposes. Apps are failing to open even when users do not use the Facebook login options included.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/crashlytics\/status\/1258419727095025669\">Crashlytics<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/crashlytics\/status\/1258419727095025669\">\n<p>Due to a major increase in crashes across the iOS ecosystem caused by an issue with a popular iOS SDK, iOS crash processing in Crashlytics was disabled at 11:00 PM UTC.<\/p>\n<\/blockquote>\n\n<p>So many crashes that it brought down the crash reporter.<\/p>\n\n<p><a href=\"https:\/\/twitter.com\/sandofsky\/status\/1258288056399847425\">Ben Sandofsky<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/sandofsky\/status\/1258288056399847425\">\n<p>To stop crashes from the Facebook SDK, some devs tried commenting out any code that calls Facebook. Nothing worked.<\/p>\n<p>It turns out that by just including the SDK with your app, Facebook  runs hidden code on launch. (FBSDKApplicationDelegate.m)<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/rambo.codes\/posts\/2020-05-07-the-big-facebook-crash\">Guilherme Rambo<\/a> (<a href=\"https:\/\/twitter.com\/_inside\/status\/1258379810113499137\">tweet<\/a>):<\/p>\n<blockquote cite=\"https:\/\/rambo.codes\/posts\/2020-05-07-the-big-facebook-crash\"><p>The issue was caused by some bad data being sent by Facebook&rsquo;s server to their SDK, which caused code in the SDK to crash, which in turn brought down the app that was running the SDK. Since this happened during the initialization of the SDK &mdash; something that occurs right after launching the app &mdash; the apps simply became unusable. You can <a href=\"https:\/\/github.com\/facebook\/facebook-ios-sdk\/issues\/1373\">read more about it here<\/a>.<\/p>\n<p>I did find a workaround that allowed me to order dinner though. Since the crash was caused by data sent by Facebook&rsquo;s servers, I blocked the <code>facebook.com<\/code> domain (and all of its subdomains) on my network using <a href=\"https:\/\/pi-hole.net\">Pi-Hole<\/a>.<\/p>\n<p>[&#8230;]<\/p>\n<p>The other solution would be some form of sandboxing that isolates this type of SDK from the main app code. Apple&rsquo;s operating systems already have and use XPC extensively &mdash; and iOS supports extensions &mdash; but it still doesn&rsquo;t expose such functionality to developers.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/anildash.com\/2020\/05\/07\/when-everything-crashes\/\">Anil Dash<\/a>:<\/p>\n<blockquote cite=\"https:\/\/anildash.com\/2020\/05\/07\/when-everything-crashes\/\"><p>The flagship mobile apps from Google, Spotify, Apple, NYT, Venmo, Walmart and many other huge companies all broke for about 30 minutes.<\/p>\n<p>[&#8230;]<\/p>\n<p>Done right, open source is magic. It gives coders super powers to build things they could never do alone. But it can also be a strategy that makes huge parts of our online experience dependent on a few companies, and vulnerable to their choices. The failure that millions of people experience today was just (&ldquo;just&rdquo;) some apps crashing for a little while. A few weeks ago, it was Zoom using a Facebook library that sent data in ways they didn&rsquo;t disclose. We don&rsquo;t have a cultural fluency in how to talk about the interconnectedness of all the tech around us.<\/p><\/blockquote>\n\n<p>Apple and Google use the Facebook SDK?<\/p>\n\n<p><a href=\"https:\/\/daringfireball.net\/linked\/2020\/05\/06\/facebook-sdk-crasher\">John Gruber<\/a>:<\/p>\n<blockquote cite=\"https:\/\/daringfireball.net\/linked\/2020\/05\/06\/facebook-sdk-crasher\">\n<p>Facebook themselves are no dummies. None of their iOS apps ever break because of a bug from Google or Adobe, because they&rsquo;re not foolish enough to bake in a dependency they don&rsquo;t control.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/03\/26\/zoom-attention-tracking-and-facebook\/\">Zoom Attention Tracking and Facebook<\/a><\/li>\n<\/ul>\n\n<p id=\"facebook-sdk-causes-crashes-update-2020-05-14\">Update (2020-05-14): <a href=\"https:\/\/twitter.com\/ethanhuang13\/status\/1258964907246026755\">ethanhuang13<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/ethanhuang13\/status\/1258964907246026755\">\n<p>FacebookAuth is for iOS app developers who need to support Facebook login but don't want to use the official SDK.&#x1F612;<\/p>\n<p>Single closure API. ~100 loc of implementation.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Juli Clover (Hacker News): Multiple iPhone and iPad users are seeing their apps crashing at launch as of this afternoon, and the issue appears to be caused by a faulty Facebook SDK that the apps are using. [&#8230;] Multiple developers on GitHub have attributed the problem to a Facebook software development kit used by the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2020-05-07T19:51:10Z","apple_news_api_id":"98e1fcbd-f741-4a1f-bc38-79c193d5da46","apple_news_api_modified_at":"2020-05-14T19:06:45Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AmOH8vfdBSh-8OHnBk9XaRg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[131,25,31,26,507,54,71],"class_list":["post-28891","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bug","tag-facebook","tag-ios","tag-iosapp","tag-json","tag-objective-c","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/28891","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=28891"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/28891\/revisions"}],"predecessor-version":[{"id":28937,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/28891\/revisions\/28937"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=28891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=28891"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=28891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}