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

Characters I type in the visualization filter box are being removed #14909

Closed
LeeDr opened this issue Nov 10, 2017 · 8 comments
Closed

Characters I type in the visualization filter box are being removed #14909

LeeDr opened this issue Nov 10, 2017 · 8 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) v6.2.2 v7.0.0

Comments

@LeeDr
Copy link

LeeDr commented Nov 10, 2017

Kibana version: 6.1.0-SNAPSHOT

Elasticsearch version: 6.1.0-SNAPSHOT

Server OS version: Ubuntu 14.04 (virtualBox VM)

Browser version: Chrome 62

Browser OS version: Windows 10

Original install method (e.g. download page, yum, from source, etc.): .deb packages

Description of the problem including expected versus actual behavior:
As I type quickly in the filter box to open a saved visualization some characters get deleted.

This is Selenium typing Top Transactions for Time Period [APM];
elasticsearch2

I first noticed this while running an automated test from the integration-test repo. But I can reproduce it manually sometimes.

It looks similar to this issue (which I thought was IE only);
#14628

I could not reproduce this problem when filtering Dashboards.
Note that I have 243 visualizations loaded from metricbeat, packetbeat, filebeat, and apm-server. So that might impact query response time. And also that I'm running those beats, elasticsearch, logstash, and kibana all in a VM.

Steps to reproduce:

  1. load or create a bunch of visualizations
  2. type quickly as you filter visualizations
  3. it appears that some characters you typed get backspaced off

I reproduced it while I was on zoom so maybe that video capturing load makes it easier to reproduce.

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

I temporarily modified this method in visualize_page.js to clear and repeat typing in a saved visualization name a couple of times to help me capture a gif. The first attempt is wrapping the query in double-quotes. I left that off the subsequent attempts but I don't think that makes any difference.

I think I'll create a method that has a configurable delay between typing each character to approximate human speed.

  filterVisByName(vizName) {
    return this.remote
    .findByCssSelector('input.kuiToolBarSearchBox__input')
    .click()
    .clearValue()
    // wrapping in double quotes is a work-around for https://github.com/elastic/kibana/issues/14687
    .type('"' + vizName + '"')
    .then(() => {
      return PageObjects.common.sleep(4000);
    })
    .then(() => {
      return this.remote
      .findByCssSelector('input.kuiToolBarSearchBox__input')
      .clearValue()
      .type(vizName);
    })
    .then(() => {
      return PageObjects.common.sleep(4000);
    })
    .then(() => {
      return this.remote
      .findByCssSelector('input.kuiToolBarSearchBox__input')
      .clearValue()
      .type(vizName);
    })
    .then(() => {
      return PageObjects.common.sleep(4000);
    });
  }
@LeeDr LeeDr added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) bug Fixes for quality problems that affect the customer experience labels Nov 10, 2017
@LeeDr
Copy link
Author

LeeDr commented Nov 10, 2017

Here's another gif I captured where I turned the frames per second up higher;
elasticsearch3

@LeeDr
Copy link
Author

LeeDr commented Nov 10, 2017

I hacked this together so I could delay the typing of each character;
It seems to work OK with 100ms delay. But I'm finding the field for every character which obviously takes additional time.

  filterVisByName(vizName) {
    const vizArray = ('"' + vizName + '"').split('');
    const self = this;

    function typeChars(arr) {
      return arr.reduce(function (promise, ch) {
        return promise
        .then(function () {
          return self.remote.findByCssSelector('input.kuiToolBarSearchBox__input').type(ch)
          .then(() => {
            return PageObjects.common.sleep(100);
          });
        });
      }, Promise.resolve());
    }

    return this.remote.findByCssSelector('input.kuiToolBarSearchBox__input').click().clearValue()
    .then(() => {
      return typeChars(vizArray);
    });
  }

@stacey-gammon
Copy link
Contributor

I think this will fix it lee: #15003

@stacey-gammon
Copy link
Contributor

Going to assume this is fixed by #15003. If you can repro again @LeeDr , please re-open.

@LeeDr LeeDr reopened this Dec 7, 2017
@LeeDr
Copy link
Author

LeeDr commented Dec 7, 2017

Still a problem on 6.1.0.

I just typed log and got lg. I tried this several times and got lg. You can see the o char appear for a very brief moment.
This is on IE running locally on my laptop connecting to Kibana running on a Windows 2012 Server running in a VM on my laptop. So the performance may be a bit off.

elasticsearch4

@stacey-gammon
Copy link
Contributor

thanks @LeeDr . I think I might have an idea of what's going on. I'm guessing the flow is like this:

-> search l
-> search lo
-> search log

  • filter bar shows log
    <- receive results for l
    <- receive results for log
    <- receive results for lo
  • filter bar set to lo

If es sends us search results back not in the order we requested, i think this would happen.

The fix above for debouncing the search results should have alleviated the problem, but I suppose it's still theoretically possible to hit the bug (just seems unlikely).

The debounce filter sends every 200 ms so if you type slower than that (or your input is captured slower than that), it could still happen:
-> filter on lo
(200 ms pass)
-> filter on log

  • search bar set to log
    <- results for log received
    <- results for lo received

Seems unlikely since the results for lo would have to take a much longer time than log.

Anyway, I'll see if I can simulate the error given my above assumptions and find a better workaround.

@LeeDr
Copy link
Author

LeeDr commented Dec 7, 2017

How did this work back in 5.x? We never had this problem then. I just checked on 5.6.3 and I see a query is run every time I enter a character.

Scratch that. I do see this problem on 5.6.3 with IE 11.

I don't see the problem on 5.5.1. To me it looks like several issues were introduced in 5.6. ;

  1. Characters being deleted as I type them
  2. results match ANY words entered in the filter instead of matching ALL words (there's a different issue for this)

@stacey-gammon
Copy link
Contributor

Fixed by #15479 in 6.2 so going to close.

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 Feature:Visualizations Generic visualization features (in case no more specific feature label is available) v6.2.2 v7.0.0
Projects
None yet
Development

No branches or pull requests

5 participants