diff --git a/core/lib/utils/app_logger.dart b/core/lib/utils/app_logger.dart index 12d84a0106..35ca521c8d 100644 --- a/core/lib/utils/app_logger.dart +++ b/core/lib/utils/app_logger.dart @@ -43,12 +43,11 @@ Future log(String? value, {Level level = Level.info}) async { } } - final message = '[TwakeMail] $logsStr'; // ignore: avoid_print - print(message); + print('[TwakeMail] $logsStr'); if (LogTracking().enableTraceLog) { - await LogTracking().addLog(message: message); + await LogTracking().addLog(message: logsStr); } } diff --git a/core/lib/utils/html/html_utils.dart b/core/lib/utils/html/html_utils.dart index 828e3ac15c..63a212074f 100644 --- a/core/lib/utils/html/html_utils.dart +++ b/core/lib/utils/html/html_utils.dart @@ -30,7 +30,6 @@ class HtmlUtils { static const unregisterDropListener = ( script: ''' - console.log("unregisterDropListener"); const editor = document.querySelector(".note-editable"); const newEditor = editor.cloneNode(true); editor.parentNode.replaceChild(newEditor, editor);''', @@ -76,12 +75,12 @@ class HtmlUtils { required String base64Data, required String mimeType }) { + log('HtmlUtils::convertBase64ToImageResourceData:'); mimeType = validateHtmlImageResourceMimeType(mimeType); if (!base64Data.endsWith('==')) { base64Data.append('=='); } final imageResource = 'data:$mimeType;base64,$base64Data'; - log('HtmlUtils::convertBase64ToImageResourceData:imageResource: $imageResource'); return imageResource; } diff --git a/lib/features/base/base_controller.dart b/lib/features/base/base_controller.dart index eacf5b8cb3..67d209e55b 100644 --- a/lib/features/base/base_controller.dart +++ b/lib/features/base/base_controller.dart @@ -153,7 +153,9 @@ abstract class BaseController extends GetxController return null; } - void handleErrorViewState(Object error, StackTrace stackTrace) {} + void handleErrorViewState(Object error, StackTrace stackTrace) { + logError('BaseController::handleErrorViewState: $error | $stackTrace'); + } void handleExceptionAction({Failure? failure, Exception? exception}) { logError('BaseController::handleExceptionAction():failure: $failure | exception: $exception'); @@ -167,15 +169,17 @@ abstract class BaseController extends GetxController } if (!authorizationInterceptors.isAppRunning) { + logError('BaseController::handleExceptionAction:isAppRunning = false'); return; } if (exception is BadCredentialsException || exception is ConnectionError) { + logError('BaseController::handleExceptionAction: exception is BadCredentialsException or ConnectionError'); clearDataAndGoToLoginPage(); } } void handleFailureViewState(Failure failure) async { - logError('BaseController::handleFailureViewState(): ${failure.runtimeType}'); + logError('BaseController::handleFailureViewState(): $failure'); if (failure is LogoutOidcFailure) { if (_isFcmEnabled) { _getStoredFirebaseRegistrationFromCache(); @@ -189,7 +193,7 @@ abstract class BaseController extends GetxController } void handleSuccessViewState(Success success) async { - log('BaseController::handleSuccessViewState(): ${success.runtimeType}'); + log('BaseController::handleSuccessViewState(): $success'); if (success is LogoutOidcSuccess) { if (_isFcmEnabled) { _getStoredFirebaseRegistrationFromCache(); @@ -203,24 +207,8 @@ abstract class BaseController extends GetxController } } - void startFpsMeter() { - FpsManager().start(); - fpsCallback = (fpsInfo) { - log('BaseController::startFpsMeter(): $fpsInfo'); - }; - if (fpsCallback != null) { - FpsManager().addFpsCallback(fpsCallback!); - } - } - - void stopFpsMeter() { - FpsManager().stop(); - if (fpsCallback != null) { - FpsManager().removeFpsCallback(fpsCallback!); - } - } - void injectAutoCompleteBindings(Session? session, AccountId? accountId) { + log('BaseController::injectAutoCompleteBindings:'); try { ContactAutoCompleteBindings().dependencies(); requireCapability(session!, accountId!, [tmailContactCapabilityIdentifier]); @@ -231,6 +219,7 @@ abstract class BaseController extends GetxController } void injectMdnBindings(Session? session, AccountId? accountId) { + log('BaseController::injectMdnBindings:'); try { requireCapability(session!, accountId!, [CapabilityIdentifier.jmapMdn]); MdnInteractorBindings().dependencies(); @@ -240,6 +229,7 @@ abstract class BaseController extends GetxController } void injectForwardBindings(Session? session, AccountId? accountId) { + log('BaseController::injectForwardBindings:'); try { requireCapability(session!, accountId!, [capabilityForward]); ForwardingInteractorsBindings().dependencies(); @@ -249,6 +239,7 @@ abstract class BaseController extends GetxController } void injectRuleFilterBindings(Session? session, AccountId? accountId) { + log('BaseController::injectRuleFilterBindings:'); try { requireCapability(session!, accountId!, [capabilityRuleFilter]); EmailRulesInteractorBindings().dependencies(); @@ -258,6 +249,7 @@ abstract class BaseController extends GetxController } Future injectFCMBindings(Session? session, AccountId? accountId) async { + log('BaseController::injectFCMBindings:'); try { requireCapability(session!, accountId!, [FirebaseCapability.fcmIdentifier]); log('BaseController::injectFCMBindings: fcmAvailable = ${AppConfig.fcmAvailable}'); @@ -289,6 +281,7 @@ abstract class BaseController extends GetxController FirebaseCapability.fcmIdentifier.isSupported(session, accountId) && AppConfig.fcmAvailable; void goToLogin() { + log('BaseController::goToLogin:currentRoute = ${Get.currentRoute}'); if (Get.currentRoute != AppRoutes.login) { pushAndPopAll( AppRoutes.login, @@ -300,6 +293,7 @@ abstract class BaseController extends GetxController } void logout(Session? session, AccountId? accountId) async { + log('BaseController::logout:accountId = $accountId'); if (session == null || accountId == null) { await clearDataAndGoToLoginPage(); return; @@ -317,6 +311,7 @@ abstract class BaseController extends GetxController } void _destroyFirebaseRegistration(FirebaseRegistrationId firebaseRegistrationId) async { + log('BaseController::_destroyFirebaseRegistration:firebaseRegistrationId = $firebaseRegistrationId'); _destroyFirebaseRegistrationInteractor = getBinding(); if (_destroyFirebaseRegistrationInteractor != null) { consumeState(_destroyFirebaseRegistrationInteractor!.execute(firebaseRegistrationId)); @@ -326,6 +321,7 @@ abstract class BaseController extends GetxController } void _getStoredFirebaseRegistrationFromCache() async { + log('BaseController::_getStoredFirebaseRegistrationFromCache:'); _getStoredFirebaseRegistrationInteractor = getBinding(); if (_getStoredFirebaseRegistrationInteractor != null) { consumeState(_getStoredFirebaseRegistrationInteractor!.execute()); @@ -341,6 +337,7 @@ abstract class BaseController extends GetxController } Future clearAllData() async { + log('BaseController::clearAllData:'); if (isAuthenticatedWithOidc) { await _clearOidcAuthData(); } else { @@ -349,6 +346,7 @@ abstract class BaseController extends GetxController } Future _clearBasicAuthData() async { + log('BaseController::_clearBasicAuthData:'); await Future.wait([ deleteCredentialInteractor.execute(), cachingManager.clearAll(), @@ -363,6 +361,7 @@ abstract class BaseController extends GetxController } Future _clearOidcAuthData() async { + log('BaseController::_clearOidcAuthData:'); await Future.wait([ deleteAuthorityOidcInteractor.execute(), cachingManager.clearAll(), diff --git a/lib/features/base/reloadable/reloadable_controller.dart b/lib/features/base/reloadable/reloadable_controller.dart index 71ecafff7d..282c0f9c22 100644 --- a/lib/features/base/reloadable/reloadable_controller.dart +++ b/lib/features/base/reloadable/reloadable_controller.dart @@ -30,10 +30,10 @@ abstract class ReloadableController extends BaseController { @override void handleFailureViewState(Failure failure) { + logError('ReloadableController::handleFailureViewState(): failure: $failure'); if (failure is GetCredentialFailure || failure is GetStoredTokenOidcFailure || failure is GetAuthenticatedAccountFailure) { - log('ReloadableController::handleFailureViewState(): failure: $failure'); goToLogin(); } else if (failure is GetSessionFailure) { _handleGetSessionFailure(failure.exception); @@ -44,6 +44,7 @@ abstract class ReloadableController extends BaseController { @override void handleSuccessViewState(Success success) { + log('ReloadableController::handleSuccessViewState:'); if (success is GetCredentialViewState) { _handleGetCredentialSuccess(success); } else if (success is GetSessionSuccess) { @@ -59,14 +60,17 @@ abstract class ReloadableController extends BaseController { * trigger reload by getting Credential again then setting up Interceptor and retrieving session * */ void reload() { + log('ReloadableController::reload:'); getAuthenticatedAccountAction(); } void getAuthenticatedAccountAction() { + log('ReloadableController::getAuthenticatedAccountAction:'); consumeState(_getAuthenticatedAccountInteractor.execute()); } void _setUpInterceptors(GetCredentialViewState credentialViewState) { + log('ReloadableController::_setUpInterceptors:'); dynamicUrlInterceptors.setJmapUrl(credentialViewState.baseUrl.origin); dynamicUrlInterceptors.changeBaseUrl(credentialViewState.baseUrl.origin); authorizationInterceptors.setBasicAuthorization( @@ -80,15 +84,18 @@ abstract class ReloadableController extends BaseController { } void _handleGetCredentialSuccess(GetCredentialViewState credentialViewState) { + log('ReloadableController::_handleGetCredentialSuccess:'); _setUpInterceptors(credentialViewState); getSessionAction(); } void getSessionAction() { + log('ReloadableController::getSessionAction:'); consumeState(_getSessionInteractor.execute()); } void _handleGetSessionFailure(dynamic exception) { + logError('ReloadableController::_handleGetSessionFailure:exception = $exception'); if (currentContext != null && currentOverlayContext != null && exception !is BadCredentialsException) { appToast.showToastErrorMessage( currentOverlayContext!, @@ -99,6 +106,7 @@ abstract class ReloadableController extends BaseController { } void _handleGetSessionSuccess(GetSessionSuccess success) { + log('ReloadableController::_handleGetSessionSuccess:'); final session = success.session; final personalAccount = session.personalAccount; final apiUrl = session.getQualifiedApiUrl(baseUrl: dynamicUrlInterceptors.jmapUrl); @@ -114,11 +122,13 @@ abstract class ReloadableController extends BaseController { void handleReloaded(Session session) {} void _handleGetStoredTokenOIDCSuccess(GetStoredTokenOidcSuccess tokenOidcSuccess) { + log('ReloadableController::_handleGetStoredTokenOIDCSuccess:'); _setUpInterceptorsOidc(tokenOidcSuccess); getSessionAction(); } void _setUpInterceptorsOidc(GetStoredTokenOidcSuccess tokenOidcSuccess) { + log('ReloadableController::_setUpInterceptorsOidc:'); dynamicUrlInterceptors.setJmapUrl(tokenOidcSuccess.baseUrl.toString()); dynamicUrlInterceptors.changeBaseUrl(tokenOidcSuccess.baseUrl.toString()); authorizationInterceptors.setTokenAndAuthorityOidc( @@ -139,6 +149,7 @@ abstract class ReloadableController extends BaseController { } void updateAuthenticationAccount(Session session, AccountId accountId, UserName userName) { + log('ReloadableController::updateAuthenticationAccount:'); final apiUrl = session.getQualifiedApiUrl(baseUrl: dynamicUrlInterceptors.jmapUrl); if (apiUrl.isNotEmpty) { consumeState(_updateAuthenticationAccountInteractor.execute(accountId, apiUrl, userName)); diff --git a/lib/features/caching/caching_manager.dart b/lib/features/caching/caching_manager.dart index 0fb76098c3..c102cc93f6 100644 --- a/lib/features/caching/caching_manager.dart +++ b/lib/features/caching/caching_manager.dart @@ -63,6 +63,7 @@ class CachingManager { ); Future clearAll() async { + log('CachingManager::clearAll:'); await Future.wait([ _stateCacheClient.clearAllData(), _mailboxCacheClient.clearAllData(), @@ -85,6 +86,7 @@ class CachingManager { } Future clearData() async { + log('CachingManager::clearData:'); await Future.wait([ _stateCacheClient.clearAllData(), _mailboxCacheClient.clearAllData(), @@ -103,6 +105,7 @@ class CachingManager { } Future clearEmailCacheAndStateCacheByTupleKey(AccountId accountId, Session session) { + log('CachingManager::clearEmailCacheAndStateCacheByTupleKey:'); return Future.wait([ _stateCacheClient.deleteItem(StateType.email.getTupleKeyStored(accountId, session.username)), _emailCacheClient.clearAllData(), @@ -110,6 +113,7 @@ class CachingManager { } Future clearEmailCacheAndAllStateCache() { + log('CachingManager::clearEmailCacheAndAllStateCache:'); return Future.wait([ _stateCacheClient.clearAllData(), _emailCacheClient.clearAllData(), @@ -122,14 +126,17 @@ class CachingManager { } Future getLatestVersion() { + log('CachingManager::getLatestVersion:'); return _hiveCacheVersionClient.getLatestVersion(); } Future closeHive() async { + log('CachingManager::closeHive:'); return await HiveCacheConfig.instance.closeHive(); } Future clearAllFileInStorage() async { + log('CachingManager::clearAllFileInStorage:'); await Future.wait([ _fileUtils.removeFolder(CachingConstants.newEmailsContentFolderName), _fileUtils.removeFolder(CachingConstants.openedEmailContentFolderName), @@ -137,6 +144,7 @@ class CachingManager { } Future clearLoginRecentData() async { + log('CachingManager::clearLoginRecentData:'); await Future.wait([ _recentLoginUrlCacheClient.clearAllData(), _recentLoginUsernameCacheClient.clearAllData(), diff --git a/lib/features/composer/presentation/composer_controller.dart b/lib/features/composer/presentation/composer_controller.dart index 1ae8c76274..c8183f1cf5 100644 --- a/lib/features/composer/presentation/composer_controller.dart +++ b/lib/features/composer/presentation/composer_controller.dart @@ -1108,7 +1108,6 @@ class ComposerController extends BaseController with DragDropFileMixin { }) async { final newEmailBody = await _getContentInEditor(); final oldEmailBody = _initTextEditor ?? ''; - log('ComposerController::_validateEmailChange: newEmailBody = $newEmailBody | oldEmailBody = $oldEmailBody'); final isEmailBodyChanged = !oldEmailBody.trim().isSame(newEmailBody.trim()); final newEmailSubject = subjectEmail.value ?? ''; diff --git a/lib/features/email/data/local/html_analyzer.dart b/lib/features/email/data/local/html_analyzer.dart index 904c320a05..ba34a6cf25 100644 --- a/lib/features/email/data/local/html_analyzer.dart +++ b/lib/features/email/data/local/html_analyzer.dart @@ -139,13 +139,12 @@ class HtmlAnalyzer { } Future removeCollapsedExpandedSignatureEffect({required String emailContent}) async { - log('HtmlAnalyzer::removeCollapsedExpandedSignatureEffect: BEFORE = $emailContent'); + log('HtmlAnalyzer::removeCollapsedExpandedSignatureEffect'); final document = parse(emailContent); final signatureElements = document.querySelectorAll('div.tmail-signature'); await Future.wait(signatureElements.map((signatureTag) async { final signatureChildren = signatureTag.children; for (var child in signatureChildren) { - log('HtmlAnalyzer::removeCollapsedExpandedSignatureEffect: CHILD = ${child.outerHtml}'); if (child.attributes['class']?.contains('tmail-signature-button') == true) { child.remove(); } else if (child.attributes['class']?.contains('tmail-signature-content') == true) { @@ -154,7 +153,6 @@ class HtmlAnalyzer { } })); final newContent = document.body?.innerHtml ?? emailContent; - log('HtmlAnalyzer::removeCollapsedExpandedSignatureEffect: AFTER = $newContent'); return newContent; } } \ No newline at end of file diff --git a/lib/features/login/data/extensions/list_account_cache_extensions.dart b/lib/features/login/data/extensions/list_account_cache_extensions.dart index fa31cc2f4f..771b5396c1 100644 --- a/lib/features/login/data/extensions/list_account_cache_extensions.dart +++ b/lib/features/login/data/extensions/list_account_cache_extensions.dart @@ -7,10 +7,10 @@ extension ListAccountCacheExtension on List { List unselected() => map((account) => account.unselected()).toList(); List removeDuplicated() { + log('ListAccountCacheExtension::removeDuplicated:BEFORE: $this'); final listAccountId = map((account) => account.accountId).whereNotNull().toSet(); - log('ListAccountCacheExtension::removeDuplicated:listAccountId: $listAccountId'); retainWhere((account) => listAccountId.remove(account.accountId)); - log('ListAccountCacheExtension::removeDuplicated:listAccount: $this'); + log('ListAccountCacheExtension::removeDuplicated:AFTER: $this'); return this; } diff --git a/lib/features/login/data/local/account_cache_manager.dart b/lib/features/login/data/local/account_cache_manager.dart index 3d3d6a43e4..fd027c6e3d 100644 --- a/lib/features/login/data/local/account_cache_manager.dart +++ b/lib/features/login/data/local/account_cache_manager.dart @@ -35,6 +35,7 @@ class AccountCacheManager { .removeDuplicated() .whereNot((account) => account.accountId == newAccountCache.accountId) .toList(); + log('AccountCacheManager::setCurrentAccount:newAllAccounts = $newAllAccounts'); if (newAllAccounts.isNotEmpty) { await _accountCacheClient.clearAllData(); await _accountCacheClient.updateMultipleItem(newAllAccounts.toMap()); diff --git a/lib/features/login/data/local/token_oidc_cache_manager.dart b/lib/features/login/data/local/token_oidc_cache_manager.dart index b65b1523ea..809fe1e699 100644 --- a/lib/features/login/data/local/token_oidc_cache_manager.dart +++ b/lib/features/login/data/local/token_oidc_cache_manager.dart @@ -21,15 +21,17 @@ class TokenOidcCacheManager { } Future persistOneTokenOidc(TokenOIDC tokenOIDC) async { - log('TokenOidcCacheManager::persistOneTokenOidc(): $tokenOIDC'); + log('TokenOidcCacheManager::persistOneTokenOidc(): TOKEN_ID_HASH = ${tokenOIDC.tokenIdHash}'); + log('TokenOidcCacheManager::persistOneTokenOidc(): EXPIRED_TIME = ${tokenOIDC.expiredTime}'); await _tokenOidcCacheClient.clearAllData(); - log('TokenOidcCacheManager::persistOneTokenOidc(): key: ${tokenOIDC.tokenId.uuid}'); - log('TokenOidcCacheManager::persistOneTokenOidc(): key\'s hash: ${tokenOIDC.tokenIdHash}'); - log('TokenOidcCacheManager::persistOneTokenOidc(): token: ${tokenOIDC.token}'); - await _tokenOidcCacheClient.insertItem(tokenOIDC.tokenIdHash, tokenOIDC.toTokenOidcCache()); + await _tokenOidcCacheClient.insertItem( + tokenOIDC.tokenIdHash, + tokenOIDC.toTokenOidcCache()); + log('TokenOidcCacheManager::persistOneTokenOidc: SUCCESS'); } Future deleteTokenOidc() async { + log('TokenOidcCacheManager::deleteTokenOidc:'); await _tokenOidcCacheClient.clearAllData(); } } \ No newline at end of file diff --git a/lib/features/login/data/network/interceptors/authorization_interceptors.dart b/lib/features/login/data/network/interceptors/authorization_interceptors.dart index 34d21b5db6..4d2f51f777 100644 --- a/lib/features/login/data/network/interceptors/authorization_interceptors.dart +++ b/lib/features/login/data/network/interceptors/authorization_interceptors.dart @@ -76,13 +76,15 @@ class AuthorizationInterceptors extends QueuedInterceptorsWrapper { case AuthenticationType.none: break; } - log('AuthorizationInterceptors::onRequest(): URL = ${options.uri} | HEADER = ${options.headers} | DATA = ${options.data} | METHOD = ${options.method}'); + log('AuthorizationInterceptors::onRequest(): URL = ${options.uri} | HEADER = ${options.headers}'); super.onRequest(options, handler); } @override void onError(DioError err, ErrorInterceptorHandler handler) async { - logError('AuthorizationInterceptors::onError(): TOKEN = ${_token?.expiredTime} | DIO_ERROR = $err | METHOD = ${err.requestOptions.method}'); + logError('AuthorizationInterceptors::onError(): DIO_ERROR = $err'); + log('AuthorizationInterceptors::onError(): TOKEN_ID_HASH = ${_token?.tokenIdHash}'); + log('AuthorizationInterceptors::onError(): EXPIRED_TIME = ${_token?.expiredTime}'); try { final requestOptions = err.requestOptions; final extraInRequest = requestOptions.extra; @@ -92,7 +94,7 @@ class AuthorizationInterceptors extends QueuedInterceptorsWrapper { responseStatusCode: err.response?.statusCode, tokenOIDC: _token )) { - log('AuthorizationInterceptors::onError:_validateToRefreshToken'); + log('AuthorizationInterceptors::onError: Expired tokens begin to get new tokens'); final newTokenOidc = PlatformInfo.isIOS ? await _handleRefreshTokenOnIOSPlatform() : await _handleRefreshTokenOnOtherPlatform(); @@ -177,6 +179,7 @@ class AuthorizationInterceptors extends QueuedInterceptorsWrapper { required int? responseStatusCode, required TokenOIDC? tokenOIDC }) { + log('AuthorizationInterceptors::validateToRefreshToken'); return responseStatusCode == 401 && _isAuthenticationOidcValid() && _isTokenNotEmpty(tokenOIDC) @@ -188,6 +191,7 @@ class AuthorizationInterceptors extends QueuedInterceptorsWrapper { required String? authHeader, required TokenOIDC? tokenOIDC }) { + log('AuthorizationInterceptors::validateToRetryTheRequestWithNewToken:authHeader = $authHeader'); return authHeader != null && _isTokenNotEmpty(tokenOIDC) && !_isTokenExpired(tokenOIDC) @@ -210,8 +214,9 @@ class AuthorizationInterceptors extends QueuedInterceptorsWrapper { } Future _updateCurrentAccount({required TokenOIDC tokenOIDC}) async { + log('AuthorizationInterceptors::_updateCurrentAccount:'); final currentAccount = await _accountCacheManager.getCurrentAccount(); - + log('AuthorizationInterceptors::_updateCurrentAccount:currentAccount = $currentAccount'); await _accountCacheManager.deleteCurrentAccount(currentAccount.id); await _tokenOidcCacheManager.persistOneTokenOidc(tokenOIDC); @@ -224,6 +229,7 @@ class AuthorizationInterceptors extends QueuedInterceptorsWrapper { apiUrl: currentAccount.apiUrl, userName: currentAccount.userName ); + log('AuthorizationInterceptors::_updateCurrentAccount:personalAccount = $personalAccount'); await _accountCacheManager.setCurrentAccount(personalAccount); return personalAccount; @@ -251,6 +257,7 @@ class AuthorizationInterceptors extends QueuedInterceptorsWrapper { } Future _invokeRefreshTokenFromServer() async { + log('AuthorizationInterceptors::_invokeRefreshTokenFromServer:'); final newToken = await _authenticationClient.refreshingTokensOIDC( _configOIDC!.clientId, _configOIDC!.redirectUrl, @@ -258,13 +265,17 @@ class AuthorizationInterceptors extends QueuedInterceptorsWrapper { _configOIDC!.scopes, _token!.refreshToken ); - log('AuthorizationInterceptors::_invokeRefreshTokenFromServer:newToken: $newToken'); + log('AuthorizationInterceptors::_invokeRefreshTokenFromServer: NEW_TOKEN_ID_HASH = ${newToken.tokenIdHash}'); + log('AuthorizationInterceptors::_invokeRefreshTokenFromServer: NEW_TOKEN_EXPIRED_TIME = ${newToken.expiredTime}'); + log('AuthorizationInterceptors::_invokeRefreshTokenFromServer: NEW_TOKEN_REFRESH_TOKEN = ${newToken.refreshToken}'); + log('AuthorizationInterceptors::_invokeRefreshTokenFromServer: NEW_TOKEN_ACCESS_TOKEN = ${newToken.token}'); return newToken; } Future _handleRefreshTokenOnIOSPlatform() async { + log('AuthorizationInterceptors::_handleRefreshTokenOnIOSPlatform:'); final keychainToken = await _getTokenInKeychain(_token!); - + log('AuthorizationInterceptors::_handleRefreshTokenOnIOSPlatform:keychainToken = $keychainToken'); if (keychainToken == null) { final newToken = await _invokeRefreshTokenFromServer(); final newAccount = await _updateCurrentAccount(tokenOIDC: newToken); @@ -277,12 +288,14 @@ class AuthorizationInterceptors extends QueuedInterceptorsWrapper { } Future _handleRefreshTokenOnOtherPlatform() async { + log('AuthorizationInterceptors::_handleRefreshTokenOnOtherPlatform:'); final newToken = await _invokeRefreshTokenFromServer(); await _updateCurrentAccount(tokenOIDC: newToken); return newToken; } void clear() { + log('AuthorizationInterceptors::clear:'); _authorization = null; _token = null; _configOIDC = null; diff --git a/lib/features/login/presentation/login_controller.dart b/lib/features/login/presentation/login_controller.dart index 561ad3448e..68ba1f4ed3 100644 --- a/lib/features/login/presentation/login_controller.dart +++ b/lib/features/login/presentation/login_controller.dart @@ -173,7 +173,7 @@ class LoginController extends ReloadableController { @override void handleExceptionAction({Failure? failure, Exception? exception}) { - logError('LoginController::handleExceptionAction:exception: $exception | failure: ${failure.runtimeType}'); + logError('LoginController::handleExceptionAction:exception: $exception | failure: $failure'); if (failure is CheckOIDCIsAvailableFailure || failure is GetStoredOidcConfigurationFailure || failure is GetOIDCConfigurationFailure || diff --git a/lib/main/utils/ios_sharing_manager.dart b/lib/main/utils/ios_sharing_manager.dart index bb261bea1f..ee2a92df90 100644 --- a/lib/main/utils/ios_sharing_manager.dart +++ b/lib/main/utils/ios_sharing_manager.dart @@ -45,6 +45,7 @@ class IOSSharingManager { } Future saveKeyChainSharingSession(PersonalAccount personalAccount) async { + log('IOSSharingManager::saveKeyChainSharingSession:personalAccount = $personalAccount'); try { if (!_validateToSaveKeychain(personalAccount)) { logError('IOSSharingManager::saveKeyChainSharingSession: account is null');