Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

dab246
Copy link
Member

@dab246 dab246 commented May 21, 2024

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.
  • Keychain cannot access when app unlocked
  • Reuse token in keychain has expired

Resolved

  • IOS: Work fine
  • Android: Still work fine
Screen_recording_20240607_114903.online-video-cutter.com.mp4

Copy link

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

@tddang-linagora
Copy link
Contributor

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

@dab246
Copy link
Member Author

dab246 commented May 31, 2024

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.

@hoangdat
Copy link
Member

hoangdat commented May 31, 2024

  • 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
RPReplay_Final1717153452.MP4

@dab246
Copy link
Member Author

dab246 commented Jun 4, 2024

  • 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.
  • 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.

@hoangdat
Copy link
Member

hoangdat commented Jun 5, 2024

Blocker:

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

@dab246
Copy link
Member Author

dab246 commented Jun 6, 2024

Blocker:

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

Done.

@dab246 dab246 force-pushed the fixbug/tf-2871-notification-almost-in-default-notification-when-use-oidc-in-ios branch from e8fa1a1 to eaba4b8 Compare June 6, 2024 19:07
@dab246 dab246 force-pushed the fixbug/tf-2871-notification-almost-in-default-notification-when-use-oidc-in-ios branch from 38f9e74 to cf885c8 Compare June 7, 2024 03:32
@hoangdat
Copy link
Member

  • rebase to refactor

reviewers:

  • Android
  • iOS
  • web

@dab246 dab246 force-pushed the fixbug/tf-2871-notification-almost-in-default-notification-when-use-oidc-in-ios branch from cf885c8 to a77118e Compare June 13, 2024 04:45
@dab246 dab246 changed the base branch from master to refactor June 13, 2024 04:45
@dab246
Copy link
Member Author

dab246 commented Jun 13, 2024

  • rebase to refactor

reviewers:

  • Android
  • iOS
  • web

Rebase to the refactor branch is complete

@hoangdat hoangdat self-assigned this Jun 17, 2024
@hoangdat
Copy link
Member

hoangdat commented Jun 17, 2024

  • 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

@dab246 dab246 changed the base branch from refactor to sprint_25_flutter_3_22_2 July 15, 2024 04:26
@dab246 dab246 force-pushed the fixbug/tf-2871-notification-almost-in-default-notification-when-use-oidc-in-ios branch from 47184e6 to 6ab6507 Compare July 15, 2024 09:50
@dab246 dab246 force-pushed the fixbug/tf-2871-notification-almost-in-default-notification-when-use-oidc-in-ios branch from 6ab6507 to 0302541 Compare July 16, 2024 02:07
@dab246 dab246 force-pushed the fixbug/tf-2871-notification-almost-in-default-notification-when-use-oidc-in-ios branch from 0302541 to af1df58 Compare July 16, 2024 02:40
@dab246 dab246 force-pushed the fixbug/tf-2871-notification-almost-in-default-notification-when-use-oidc-in-ios branch from fcaec8f to 20c1f1c Compare July 17, 2024 03:17
@dab246 dab246 requested a review from hoangdat July 17, 2024 03:18
@hoangdat hoangdat merged commit a943235 into sprint_25_flutter_3_22_2 Jul 17, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants