Bug 1741283 - Session was timed out due to inactivity. Please log in again. message when logout button used
Summary: Session was timed out due to inactivity. Please log in again. message when lo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.11.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.11.0
Assignee: Martin Hradil
QA Contact: Parthvi Vala
Red Hat CloudForms Documentation
URL:
Whiteboard: testathon
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-14 16:35 UTC by Brant Evans
Modified: 2019-12-13 14:57 UTC (History)
10 users (show)

Fixed In Version: 5.11.0.21
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-13 14:57:12 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:
dmetzger: mirror+


Attachments (Terms of Use)
Screenshot showing the error when a normal logout has been performed. (24.79 KB, image/png)
2019-08-14 16:35 UTC, Brant Evans
no flags Details

Description Brant Evans 2019-08-14 16:35:15 UTC
Created attachment 1603841 [details]
Screenshot showing the error when a normal logout has been performed.

Description of problem:

intermittently getting "Session was timed out due to inactivity. Please log in again." error on the login screen when logging out and also when logging out and logging in quickly

Version-Release number of selected component (if applicable):
5.11.0.18.20190806180636_1dd6378

How reproducible:
frequently

Steps to Reproduce:
1. Login to the OPS UI
2. Navigate to a few different pages
3. Select Username > Logout

Actual results:
The error about session timeout is displayed

Expected results:
No timeout error is displayed

Additional info:

Comment 2 Dave Johnson 2019-08-14 20:03:20 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 9 CFME Bot 2019-08-21 10:20:26 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/32b4b1593752025d563d425617c16fb60865c813
commit 32b4b1593752025d563d425617c16fb60865c813
Author:     Martin Hradil <mhradil>
AuthorDate: Tue Aug 20 07:10:20 2019 -0400
Commit:     Martin Hradil <mhradil>
CommitDate: Tue Aug 20 07:10:20 2019 -0400

    Prevent login redirect with ?timeout during logout

    When logging out via the Logout button,
    when there are multiple HTTP requests happening,
    the logout can cause API requests to fail with a 401 before the browser redirects to the login screen,
    causing the response handler to call redirectLogin, to redirec to the login screen with a "session timed out" message.

    We should not be claiming a timeout *during* logout, adding a check for that.

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1741283

 app/assets/javascripts/miq_application.js | 4 +
 app/assets/javascripts/miq_global.js | 1 +
 app/views/layouts/_user_options.html.haml | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

Comment 10 CFME Bot 2019-08-21 20:27:31 UTC
New commit detected on ManageIQ/manageiq-ui-classic/ivanchuk:

https://github.com/ManageIQ/manageiq-ui-classic/commit/8b17db500718e2c81ce760c5567b6e3e709ace77
commit 8b17db500718e2c81ce760c5567b6e3e709ace77
Author:     Milan Zázrivec <mzazrivec>
AuthorDate: Wed Aug 21 06:08:01 2019 -0400
Commit:     Milan Zázrivec <mzazrivec>
CommitDate: Wed Aug 21 06:08:01 2019 -0400

    Merge pull request #6065 from himdel/bz1741283-logout

    Prevent login redirect with ?timeout during logout

    (cherry picked from commit 86fafd124d25addda12d715b5d7d8ec9f53614e5)

    https://bugzilla.redhat.com/show_bug.cgi?id=1741283

 app/assets/javascripts/miq_application.js | 4 +
 app/assets/javascripts/miq_global.js | 1 +
 app/views/layouts/_user_options.html.haml | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

Comment 11 Parthvi Vala 2019-08-30 08:02:33 UTC
Hi, I am not able to reproduce it on 5.11.0.18, can you help me reproduce it first?

Comment 12 Martin Hradil 2019-09-02 12:14:48 UTC
Parthvi, the most likely places this can happen is places which do a http request for data, and wait for the response before issuing a follow-up request.
On those, "all" you have to do is click the Logout button before the second wave of requests gets triggered. (Or even after, but then you'd rely on server reordering the requests.)

You *may* have luck using the browser's inspector to emulate a slow network.
It may also help to have many entities in the DB. (A form loading a list of cloud tenants will be slower when there's thousands of those, making it easier to trigger the issue.)


(I was not able to reproduce this without code changes, so if there's a way, Brant will have to share it.)

Comment 13 Parthvi Vala 2019-09-03 08:03:31 UTC
Hi Brant, can you help me reproduce this BZ?

Thanks for the help Martin, I'll see if I can reproduce it.

Comment 14 Parthvi Vala 2019-09-03 11:02:25 UTC
FIXED. Verified on 5.11.0.22.

To reproduce this BZ, I added multiple providers in the appliance and logged in, and before all the widgets loaded on the dashboard(before the spinner disappeared) logged out of the appliance.

I was able to reproduce this on 5.11.0.18 and verify it in 5.11.0.22.


Note You need to log in before you can comment on or make changes to this bug.