diff --git a/app/init/global_event_handler.js b/app/init/global_event_handler.js index 10a191287..c9287958e 100644 --- a/app/init/global_event_handler.js +++ b/app/init/global_event_handler.js @@ -170,7 +170,11 @@ class GlobalEventHandler { resetMomentLocale(); // TODO: Handle when multi-server support is added - await CookieManager.clearAll(Platform.OS === 'ios'); + try { + await CookieManager.clearAll(Platform.OS === 'ios'); + } catch (error) { + // Nothing to clear + } PushNotifications.clearNotifications(); const cacheDir = RNFetchBlob.fs.dirs.CacheDir; const mainPath = cacheDir.split('/').slice(0, -1).join('/'); diff --git a/app/screens/login_options/login_options.js b/app/screens/login_options/login_options.js index d39b272fc..6373a5d93 100644 --- a/app/screens/login_options/login_options.js +++ b/app/screens/login_options/login_options.js @@ -50,7 +50,11 @@ export default class LoginOptions extends PureComponent { const {intl} = this.context; const screen = 'Login'; const title = intl.formatMessage({id: 'mobile.routes.login', defaultMessage: 'Login'}); - await CookieManager.clearAll(Platform.OS === 'ios'); + try { + await CookieManager.clearAll(Platform.OS === 'ios'); + } catch (error) { + // Nothing to clear + } goToScreen(screen, title); }); @@ -58,7 +62,11 @@ export default class LoginOptions extends PureComponent { const {intl} = this.context; const screen = 'SSO'; const title = intl.formatMessage({id: 'mobile.routes.sso', defaultMessage: 'Single Sign-On'}); - await CookieManager.clearAll(Platform.OS === 'ios'); + try { + await CookieManager.clearAll(Platform.OS === 'ios'); + } catch (error) { + // Nothing to clear + } goToScreen(screen, title, {ssoType}); };