The app Facebook has violated its self-enforced StrictMode policy I am using Red Mi Note running on MIUI5. Recently, I am getting this error:


  The app Facebook (process.com.facebook.katana) has violated its self-enforced StrictMode Policy.


What does it mean? How can I resolve the issue? It becomes frustrating when the error comes as it continues to pop-up and doesn't hide on pressing OK.



(Click the image to see its larger variant)

The Error message doesn't have any specific time to occur even the error is not app specific. It occurs randomly on different situations.
In the dex provided by Facebook app, on com.facebook.katana/app_secondary_program_dex folder, we find a lot of references to the StrictMode.

So, for short, if a programmer use StrictMode, he has a reason. Basically while forking a busy process (read: animation, reading data, dictionary values for data, open a new fragment or activity on main thread), instead of crashing app there must be put (show) a message to user to inform about waiting or terminating app. 

In the particular case of Facebook app, there's /facebook/strictmode/setter/Policy$All and also errorreporting/StrictModeException. So the message comes after raising an exception. We can just assume an activity take too long or force running in main thread.

The key word is in MessengerApp. We may think about Facebook and Messenger app as separate apps, but the truth is Facebook has embeded FbandroidMessengerAppModule functions calls in it's core and also performs some logical checking as for example:


IsMessageBroadcastEnabled
IsMessageBroadcastGkEnabled
IsMessengerAppIconBadgingEnabled
IsMessengerAppIconBadgingGkEnabled
IsMessengerBlockingEnabled
IsMessengerFlatBufferEnabled
IsMessengerLoggedOutAppIconBadgingEnabled
IsMessengerPhotoEditDefaultModeDrawing
IsMessengerPhotoEditDefaultModeDrawingGk
IsMessengerSonyAppIconBadgingEnabled
IsMessengerSyncEnabled
IsMessengerThreadShortcutsEnabled


Without access to debug console, I can't predict what cause that kind of message (is it about reading values from stored DB, or are some DB files corrupted, user switched from a WiFi connection to internet connection while parsing some data ?), but my advice is to make sure Facebook app and Messenger for FB are clean installed and updated to the latest version. 

Sometime a game app can embed Facebook SDK to share data and try to access data without user FB permissions set on that game (app), or is written badly so it can raise some exception (I think this indeed your problem).