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

App shows blank page if closed within expiry time and opened later in the day (Keycloak only) #1041

Closed
vinayvenu opened this issue Sep 19, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@vinayvenu
Copy link
Member

To reproduce

In an environment with only Keycloak, open the app and login
Close the tab
Open after token expiry time (20 minutes)
Expected - App should take user to login page
Actual - Blank page with error below

GET
https://app.security.lfe.avniproject.org/web/userInfo
[HTTP/2 401 Unauthorized 55ms]

Unauthorized [httpClient.js:106:14](https://app.security.lfe.avniproject.org/static/js/common/utils/httpClient.js)
Error: Unauthorized
    t HttpError.js:50
    s fetch.js:64
    promise callback*s fetch.js:51
    e httpClient.js:105
    _ runtime.js:63
    _invoke runtime.js:282
    t runtime.js:116
    Babel 6
    value httpClient.js:112
    fetchUserInfo saga.js:19

Analysis

  • httpClient.js looks for TokenExpiredException. However, the exception was moved from an http 500 to http 401 recently, so this piece of code does not work.
@vinayvenu vinayvenu moved this to Ready in Avni Product Sep 19, 2023
@vinayvenu vinayvenu changed the title App does not show up if closed within expiry time (Keycloak only) App shows blank page if closed within expiry time and opened later in the day (Keycloak only) Sep 19, 2023
@vinayvenu vinayvenu added the bug Something isn't working label Sep 19, 2023
@vinayvenu vinayvenu moved this from Ready to In Progress in Avni Product Sep 19, 2023
@vinayvenu vinayvenu self-assigned this Sep 19, 2023
vinayvenu added a commit that referenced this issue Sep 19, 2023
@vinayvenu vinayvenu moved this from In Progress to Code Review Ready in Avni Product Sep 19, 2023
@1t5j0y 1t5j0y moved this from Code Review Ready to In Code Review in Avni Product Sep 19, 2023
@1t5j0y 1t5j0y moved this from In Code Review to QA Failed in Avni Product Sep 19, 2023
@1t5j0y 1t5j0y moved this from QA Failed to QA Ready in Avni Product Sep 19, 2023
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Sep 20, 2023
@AchalaBelokar
Copy link

AchalaBelokar commented Sep 20, 2023

  • After expiry timeout I click on refresh screen get blank and after that I need to clear out data then it will come
  • it is give me 401 error

Image

@AchalaBelokar AchalaBelokar moved this from In QA to QA Failed in Avni Product Sep 20, 2023
@vinayvenu vinayvenu moved this from QA Failed to In Progress in Avni Product Sep 21, 2023
@vinayvenu
Copy link
Member Author

@AchalaBelokar when I click on refresh, the app goes to the login screen. I do not have to clear data. Can you recheck?

@vinayvenu vinayvenu moved this from In Progress to Hold in Avni Product Sep 25, 2023
@mahalakshme
Copy link
Contributor

mahalakshme commented Sep 25, 2023

@vinayvenu @AchalaBelokar I dont know if it makes a difference. I kept the previously logged in tabs open. After around 30 minutes, in a new tab, type app.security.lfe.avniproject.org - blank page shows up - consistently happens - so moving this to Ready lane

@mahalakshme mahalakshme moved this from Hold to Ready in Avni Product Sep 25, 2023
@vinayvenu vinayvenu moved this from Ready to In Progress in Avni Product Sep 26, 2023
@vinayvenu vinayvenu self-assigned this Sep 26, 2023
vinayvenu added a commit that referenced this issue Sep 26, 2023
@vinayvenu vinayvenu moved this from In Progress to Code Review Ready in Avni Product Sep 26, 2023
@vinayvenu
Copy link
Member Author

This happens only on Chrome where error.message does not exist. Check moved to error.code === 401 instead of error.message === "Unauthorized"

@1t5j0y 1t5j0y moved this from Code Review Ready to In Code Review in Avni Product Sep 27, 2023
@1t5j0y 1t5j0y moved this from In Code Review to QA Ready in Avni Product Sep 27, 2023
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Sep 27, 2023
@AchalaBelokar AchalaBelokar moved this from In QA to QA Ready in Avni Product Sep 28, 2023
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Oct 3, 2023
@vinayvenu vinayvenu moved this from In QA to QA Ready in Avni Product Oct 5, 2023
@1t5j0y
Copy link
Contributor

1t5j0y commented Oct 5, 2023

Pending deployment to LFE security env to test.

@ashusvnath ashusvnath moved this from QA Ready to In QA in Avni Product Oct 9, 2023
@ashusvnath
Copy link

Deployed latest 5.0 webapp to LFE security environment.

@ashusvnath
Copy link

QA Observation:

  • Scenario 1:
    • User behaviour: User logs in and leaves tab/window unattended for 20 minutes.
    • App behaviour : User is logged out from app after configured time (20 minutes) and redirected to the login screen. Refresh also takes user to the login screen.
  • Scenario 2:
    • User behaviour: User logs in to app and closes the tab. Browses back to the app page after 20 minutes.
    • App behaviour : User is logged out from app after 20 minutes. The user is presented with a login screen. If older version of app is present locally, a white page is seen initially. On refreshing the page, user is taken to login screen.

@ashusvnath ashusvnath moved this from In QA to Done in Avni Product Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

5 participants