Skip to content

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

Description

@joshdover

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.

Activity

  1. added
    bugFixes for quality problems that affect the customer experience
    on Mar 19, 2020
  2. elasticmachine commented on Mar 19, 2020

    @elasticmachine
    Contributor

    Pinging @elastic/ml-ui (:ml)

  3. jgowdyelastic commented on Mar 20, 2020

    @jgowdyelastic
    Member

    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.

  4. jgowdyelastic commented on Mar 21, 2020

    @jgowdyelastic
    Member

    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

Metadata

Metadata

Assignees

Labels

:mlbugFixes for quality problems that affect the customer experiencev7.7.0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions