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

Click on ML icon while already in ML navigates to empty page #60644

Closed
joshdover opened this issue Mar 19, 2020 · 3 comments · Fixed by #60853
Closed

Click on ML icon while already in ML navigates to empty page #60644

joshdover opened this issue Mar 19, 2020 · 3 comments · Fixed by #60853
Assignees
Labels
bug Fixes for quality problems that affect the customer experience :ml v7.7.0

Comments

@joshdover
Copy link
Contributor

Kibana version: master

Browser version: Chrome 80

Browser OS version: macOS Catalina

Description of the problem including expected versus actual behavior:

In certain cases you can get into a broken state with ML's frontend routing

Steps to reproduce:

  1. Open ML app by click on ML icon in nav
  2. Click ML icon again
  3. Click on any of the ML tabs (eg "Anomaly Detection")
  4. ML app disappears, only blank screen shows

image

Errors in browser console (if relevant): No errors


This may be related to #53692 which a fix was made available in #56705.

I see that ML is still using a HashRouter. It is recommended to switch to the regular BrowserRouter and set up redirects when a hash is detected on the root route. That may help solve the problem.

@joshdover joshdover added bug Fixes for quality problems that affect the customer experience :ml labels Mar 19, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@jgowdyelastic
Copy link
Member

jgowdyelastic commented Mar 20, 2020

Clicking the ML sidebar icon while inside ML causes the trigging of onAppLeave but it doesn't actually leave the ML app.
We have clean up code in onAppLeave which is run and so the ML app is left in a broken state.
This is the behaviour that is being seen in this issue. Converting to BrowserRouter doesn't fix it.

@jgowdyelastic
Copy link
Member

jgowdyelastic commented Mar 21, 2020

I've been informed that using onAppLeave for plugin clean up is not correct. So please ignore the previous comment.
This issue can be easily resolved by moving our clean up code out of onAppLeave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience :ml v7.7.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants