In almost the exact same circumstances as we saw in May, a bug in the Facebook SDK is once again causing major third-party iOS apps like TikTok and Spotify to crash on launch. Third-party apps integrate with the Facebook SDK to enable things like account login, analytics, and ads platform integration.
Any issue that crops up in the logic of the underlying Facebook SDK will reflect in any apps that use it. Just like the May situation, improper handling of unexpected invalid data on Facebook part is resulting in the crashes.
The Facebook SDK is very popular and widely used in the iOS app ecosystem, which exacerbates the issue dramatically. If you’ve noticed your favorite apps crashing today, then this is probably why. Affected apps include Spotify, Pinterest, TikTok and many more.
Facebook has said it is investigating the problem and will likely fix the server-side issue within a couple of hours. As an individual user, there’s not much you can do apart from wait for the issue to be resolved. Some users have noted that they can launch apps in Airplane Mode successfully, but that’s little help as most apps require network access to function anyway. But if you have downloaded music to play offline in Spotify, for instance, this could be useful.
If Spotify is crashing on your iPhone you can avoid the crash bug by launching it with your phone in airplane mode and Wi-Fi turned off. As soon as you re-enable Wi-Fi or 4G then it’ll crash again due to the Facebook iOS SDK issue
— Tom Warren (@tomwarren) July 10, 2020
For a little more insight on what is happening behind the scenes, the Facebook SDK communicates back and forth with a data server. The client app code expects the data returned by the server to be in a particular format. But when the server suddenly starts sending data in a different format, the framework code is not prepared to handle the invalid response. So, the app code tries to access values that don’t exist — which leads to a fatal error and the app crashes.
There are approaches that Facebook can use to guard against issues like this. For instance, when data is not how it should be, the SDK could be programmed to no-op without bringing the entire app down with it. It’s likely that engineering work to do this is already underway, it just takes time to track down every case where defensive checks need to be added, especially in a codebase as large and as sprawling as Facebook’s.
FTC: We use income earning auto affiliate links. More.