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

Clicking on gateway list entry doesn't always redirect #1122

Closed
Elson9 opened this issue Aug 8, 2024 · 6 comments · Fixed by #1146, #1162 or #1178
Closed

Clicking on gateway list entry doesn't always redirect #1122

Elson9 opened this issue Aug 8, 2024 · 6 comments · Fixed by #1146, #1162 or #1178
Labels

Comments

@Elson9
Copy link
Contributor

Elson9 commented Aug 8, 2024

API Services Portal Issue

User Story

As an API Provider, I want to reliably select a Gateway and have it redirect to the detail page every time.

Test Case

ENV

  • [ x] DEV
  • [x ] TEST
  • [ x] PROD

TESTCASE

  • Go to detail page
  • Select a Gateway

EXPECTED

  • Rediects to detail page

ACTUAL

  • Sometimes doesn't redirect

ERROR

Notes

@Elson9 Elson9 added the jira label Aug 8, 2024
@timng-bcgov
Copy link

timng-bcgov commented Aug 12, 2024

I noticed that I only experience this issue the first time I select a Gateway from the list after I log in as a provider. Also, the toast pops up and I can see the URL/title metadata update briefly as well. Any subsequent navigation after refreshing the page or browsing elsewhere in the portal is OK.

@rustyjux
Copy link
Contributor

rustyjux commented Aug 13, 2024

This issue can occur in local env (docker compose) as well as dev. It is difficult to reproduce consistently.

I also observe what @timng-bcgov noted re: page title updating and then going back as it was. I didn't see the URL change but maybe my eyes are too slow.

My guess is either: A) some server side content is not readily available so the redirect fails, or B) there is a race condition where the router.push doesn't occur.

To address B) I tried adding an await on that in 6e1c3f5 and it seems to be working in detached local dev mode. I will validate with more testing in docker compose and in dev.

@rustyjux
Copy link
Contributor

Following the await change, I could not reproduce the bug in a handful of tests on dev and local docker.

I think we are good so I am going to close. If the bug continues to occur, I will set up a quick automated test to better validate any future fixes.

@rustyjux rustyjux reopened this Aug 19, 2024
@rustyjux
Copy link
Contributor

Still occurs in the current release in test (b902ab0)

@rustyjux
Copy link
Contributor

Still not resolved. The problem (which was attempted to resolve in #1146) ties back to NoGatewayRedirect pushing users back to list.

@Elson9 has suggested a 1 second setTimeout() or sleep() as a last resort.

I think if paired with some sorta visual loading something it might not be so bad. In general people shouldn't end up on a Gateways page without an active gw (except after logging back in).

What is not uncommon is people going from list --> detail so we really need to fix that.

A more polished solution for users logging in to a Gateways page (and being redirected away now) would be to add a query param to reactivate the last Gateway they were using.

@rustyjux
Copy link
Contributor

rustyjux commented Sep 12, 2024

It's back! Still need more work on this issue. If you rapidly go Gateways > Gateway detail > Gateway Services (or other subpage), the redirect back to Gateways occurs:
Recording 2024-09-12 at 15 57 00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment