tmail-flutter icon indicating copy to clipboard operation
tmail-flutter copied to clipboard

TF-2871 Notification almost in default notification when use OIDC in iOS

Open dab246 opened this issue 1 year ago • 14 comments

Issue

#2871 #2900

Root causes

  • Missing tokenEndpoint & scopes in keychain to call refresh new token
  • Convert ISO8601 date in swift code incorrect
  • Incorrect checking of the time expiration condition AuthenticationSSO.isExpiredTime() in swift code
  • RefreshToken returning null when retrieving a new token
  • Time returned is of type miliseconds the conversion is wrong.

Resolved

  • IOS: Work fine
  • Android: Still work fine

https://github.com/linagora/tmail-flutter/assets/80730648/9380046c-75be-4b5c-89e3-7f73af39b835

dab246 avatar May 21 '24 01:05 dab246

This PR has been deployed to https://linagora.github.io/tmail-flutter/2876.

github-actions[bot] avatar May 21 '24 02:05 github-actions[bot]

signal-2024-05-31-144840_002 Screenshot 2024-05-31 at 14 48 09 Screenshot 2024-05-31 at 14 49 55

Might want to check more on this PR

tddang-linagora avatar May 31 '24 09:05 tddang-linagora

signal-2024-05-31-144840_002 Screenshot 2024-05-31 at 14 48 09 Screenshot 2024-05-31 at 14 49 55

Might want to check more on this PR

Please provide clear steps. Note, you should LOGOUT the old app and delete the app before installing the new app so that the keychain is up to date. If possible please videotape the steps for further investigation.

  • Note: I ran the test again on my phone (iPhone 13 Pro max - iOS 17.4.1) and it is working fine.

dab246 avatar May 31 '24 09:05 dab246

  • [ ] It works fine in my device too (IP 11 Promax - 17.5) in short time, but after 1 hour and more, notifications all is default.
  • [ ] but can not work well when click to notification, app can not open well, take a long time in loading screen

https://github.com/linagora/tmail-flutter/assets/6462404/cbdd1f73-e302-4cee-8cc7-2126333222d7

hoangdat avatar May 31 '24 11:05 hoangdat

  • [x] It works fine in my device too (IP 11 Promax - 17.5) in short time, but after 1 hour and more, notifications all is default.

Root cause

  • Due to incorrect checking of the time expiration condition AuthenticationSSO.isExpiredTime() in swift code
  • Due to refreshToken returning null when retrieving a new token
  • Due the time returned is of type miliseconds, the conversion is wrong.
  • [x] but can not work well when click to notification, app can not open well, take a long time in loading screen

Root cause

  • Only happens when the app is in terminated state
  • Because waiting for the result of the notificationInteractionChannel.invokeMethod('getInitialNotificationInfo') method has not been successful. Leading to endless loading. The cause of this wait is that notificationInteractionChannel.invokeMethod('getInitialNotificationInfo') is called before notificationInteractionChannel.setMethodCallHandler() is called.

dab246 avatar Jun 04 '24 09:06 dab246

Blocker:

  • [ ] Cannot open email correctly when click on notification in app terminated

hoangdat avatar Jun 05 '24 02:06 hoangdat

Blocker:

  • [x] Cannot open email correctly when click on notification in app terminated

Done.

dab246 avatar Jun 06 '24 09:06 dab246

  • rebase to refactor

reviewers:

  • [ ] Android
  • [ ] iOS
  • [ ] web

hoangdat avatar Jun 13 '24 03:06 hoangdat

  • rebase to refactor

reviewers:

  • [ ] Android
  • [ ] iOS
  • [ ] web

Rebase to the refactor branch is complete

dab246 avatar Jun 13 '24 04:06 dab246

  • [x] iOS
    • click noti when app in terminated -> long time in loading in app or can not open email
    • click noti when app in background -> ok
  • [ ] Android: app still logout

hoangdat avatar Jun 17 '24 07:06 hoangdat

  • [x] export log failed for iOS

hoangdat avatar Jun 19 '24 14:06 hoangdat

  • [x] iOS - Open email when app is terminated for long time (>8h) OK

tddang-linagora avatar Jun 20 '24 02:06 tddang-linagora

  • [ ] still have this error in today build image

hoangdat avatar Jun 25 '24 08:06 hoangdat

  • [x] iOS

    • click noti when app in terminated -> long time in loading in app or can not open email
    • click noti when app in background -> ok

Fixed

dab246 avatar Jul 02 '24 07:07 dab246

  • it looks like: real time update is not work well

hoangdat avatar Jul 08 '24 10:07 hoangdat

  • it looks like: real time update is not work well

Tested. Still work fine. Please check again.

dab246 avatar Jul 09 '24 10:07 dab246