Sometimes, this method is called before the app is in foreground resulting in crash because of A12 foreground limitations, so we try to catch the exception