rancher / dashboard

The Rancher UI

Home Page:https://rancher.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rancher UI reloads on initial load when not logged in

nwmac opened this issue · comments

When not logged in, load the Rancher URL.

The page will load, show the login screen and then shortly after will reload and show the login screen with the timed out message shown:

Screen Recording 2024-05-01 at 09 57 26

@rak-phillip narrowed this issue down to #10727.

It appears to be caused by https://github.com/rancher/dashboard/blob/master/shell/store/index.js#L1108-L1112.

When we go to the login page we call logout which is why we redirect to timed-out. I'll investigate why we call logout and see if that can be removed since we want to cause a page refresh on a real logout.

Is it possible to add a unit test for this scenario?

Is this also something that could have an impact on external providers?

Is it possible to add a unit test for this scenario?

It's possible to add tests but it depends on what you'd like to see. I don't think we can add a negative test for "flashing". is there something in particular you had in mind?

Something to note, we've been having the poor behavior where we've been redirecting to a timed-out login page for ages but it's gone unnoticed or we just didn't care about it. The recent change made the poor behavior more apparent.

Is this also something that could have an impact on external providers?

It affects the login page with or without providers. The presence of providers shouldn't really make a difference.

Maybe some API call intercepts are possible? To check no dupes or logout requests are done while not logged in?

If that's not possible I can move to done, some scenarios I believe would be covered by other E2E tasks #10984