[Regression 5.0.0 (408)] Search does not display list of suggested articles until the last letter of search criteria is deleted
Closed, ResolvedPublic

Description

Repro steps

  1. Enter into the Search box one word - e.g. 'Venus'
  2. Search suggestions are not displayed
  3. Delete the last letter - the search suggestions appear

Expected results

Search suggestion should appear as users type their search criteria

Actual results

After typing one-word search criteria - a list of search suggestion does not appear. There is no indication that the request is still processing -the small spinner is not displayed. A user is presented with a blank page:

Etonkovidova updated the task description. (Show Details)
Etonkovidova raised the priority of this task from to Needs Triage.
Etonkovidova added a subscriber: Etonkovidova.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 19 2015, 7:24 PM
Mhurd claimed this task.
Mhurd set Security to None.
Mhurd added a comment.EditedOct 20 2015, 12:13 AM

This ticket is a little confusingly worded - "search suggestion" refers to the blue text in the image below. I think this ticket is actually referring to search results, which occasionally don't appear as described.

@Mhurd this should be going into the product board for triage before we work on it… we shoud let Elena know to put her bugs there.

Mhurd removed Mhurd as the assignee of this task.Oct 20 2015, 6:45 PM
Mhurd added a subscriber: Mhurd.EditedOct 20 2015, 6:47 PM

@Fjalapeno I asked Josh late yesterday if it was ok to investigate this (was looking for a quick win). I did so for a little bit before leaving last night and was able to repro the issue, just not consistently. Moving it back to needs triage as it looks like this will take some deeper investigation.

JMinor triaged this task as High priority.Oct 26 2015, 10:13 PM
JMinor added a project: iOS-app-v5-alpha.

So, here are logs that illustrate the underlying reason for missing results. I've added some notes (prefixed w/ //) to highlight the high-level events and what went wrong.

// Guess we tried to kick off a search when the user tapped on the search field and it was empty...?
2015-10-27 13:00:17:471 Wikipedia Debug[main] -[WMFSearchViewController searchForSearchTerm:]#L303 DEBUG:
Ignoring whitespace-only query.

// Type "g"
2015-10-27 13:00:19:090 Wikipedia Debug[main] -[WMFSearchViewController textFieldDidChange]#L259 DEBUG:
Search field text changed to: g

// !!!: Search for "g" starts
2015-10-27 13:00:19:523 Wikipedia Debug[main] __45-[WMFSearchViewController textFieldDidChange]_block_invoke#L273 DEBUG:
Searching for g after delay.

// Start typing some more stuff
2015-10-27 13:00:19:712 Wikipedia Debug[main] -[WMFSearchViewController textFieldDidChange]#L259 DEBUG:
Search field text changed to: go


2015-10-27 13:00:19:848 Wikipedia Debug[main] -[WMFSearchViewController textFieldDidChange]#L259 DEBUG:
Search field text changed to: goa

// The deferred (400ms) search fo "go" is aborted since the searchField is now "goa"
2015-10-27 13:00:20:136 Wikipedia Debug[main] __45-[WMFSearchViewController textFieldDidChange]_block_invoke#L276 INFO:
Aborting search for go since query has changed to goa

// !!!: Deferred search for "goa" starts.
2015-10-27 13:00:20:287 Wikipedia Debug[main] __45-[WMFSearchViewController textFieldDidChange]_block_invoke#L273 DEBUG:
Searching for goa after delay.

// !!!: Within WMFSearchFetcher, we're cancelling the previous operation for "go" (not logged), then creating a new operation & promise for "goa"
// When we overwrite the "resolver" property, this deallocates the old promise, so we get a bunch of warnings about deallocated promises that were never resolved/rejected
2015-10-27 13:00:24.231 Wikipedia Debug[90653:3843904] PromiseKit: Pending Promise deallocated! This is usually a bug
2015-10-27 13:00:24.231 Wikipedia Debug[90653:3843904] PromiseKit: Pending Promise deallocated! This is usually a bug
2015-10-27 13:00:24.231 Wikipedia Debug[90653:3843904] PromiseKit: Pending Promise deallocated! This is usually a bug
2015-10-27 13:00:24.231 Wikipedia Debug[90653:3843904] PromiseKit: Pending Promise deallocated! This is usually a bug

// !!!: This the bug: since we're **still the delegate of the "go" SearchResultFetcher** we end up resolving the "goa" promise with the results of the "go" fetcher!
// Since we cancelled "go", we end up **accidentally cancelling "goa"**
2015-10-27 13:00:24:233 Wikipedia Debug[main] -[WMFSearchFetcher fetchFinished:fetchedData:status:error:]#L77 DEBUG:
Resolving operation <AFHTTPRequestOperation: 0x7fd983f71a50, state: isExecuting, cancelled: NO request: <NSMutableURLRequest: 0x7fd983f71b40> { URL: https://en.m.wikipedia.org/w/api.php?action=query&continue=&format=json&generator=prefixsearch&gpslimit=24&gpsnamespace=0&gpssearch=goa&list=search&pilimit=24&piprop=thumbnail&pithumbsize=140&prop=pageterms%7Cpageimages&redirects=1&srinfo=suggestion&srlimit=1&srnamespace=0&sroffset=0&srprop=&srsearch=goa&srwhat=text&wbptterms=description }, response: (null)> with error (null)

// !!!: Once "goa" results finally come back (again WMFSearchResultFetcher is still the delegate of the "goa" SearchResultsFetcher), nothing happens because we already 
// nil-ed out the resolver when "go" results came in
2015-10-27 13:00:24:495 Wikipedia Debug[main] -[WMFSearchFetcher fetchFinished:fetchedData:status:error:]#L87 WARN:
No resolver set for results (
        {
        description = "State on the western coast of India";
        index = 1;
        ns = 0;
        pageid = 40010153;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 140;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/India_Goa_locator_map.svg/127px-India_Goa_locator_map.svg.png";
            width = 127;
        };
        title = Goa;
    },
        {
        description = "Domesticated mammal raised primarily for its milk";
        index = 2;
        ns = 0;
        pageid = 19167553;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 140;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Hausziege_04.jpg/140px-Hausziege_04.jpg";
            width = 140;
        };
        title = Goat;
    },
        {
        description = "Redirected from: Goalkeeper glove\nUniform in association football";
        index = 3;
        ns = 0;
        pageid = 5493695;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 140;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Pavel_Nedv%C4%9Bd.jpg/97px-Pavel_Nedv%C4%9Bd.jpg";
            width = 97;
        };
        title = "Kit (association football)";
    },
        {
        description = "Wikimedia disambiguation page";
        index = 4;
        ns = 0;
        pageid = 14850094;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 140;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Millennium_Development_Goals%2C_UN_Headquarters%2C_New_York_City%2C_New_York_-_20080501.jpg/105px-Millennium_Development_Goals%2C_UN_Headquarters%2C_New_York_City%2C_New_York_-_20080501.jpg";
            width = 105;
        };
        title = Goal;
    },
        {
        description = "Internet shock site displaying a man stretching his anus";
        index = 5;
        ns = 0;
        pageid = 231011;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        title = "Goatse.cx";
    },
        {
        description = "";
        index = 6;
        ns = 0;
        pageid = 4902517;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 79;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Goa_beautiful_beach.JPG/140px-Goa_beautiful_beach.JPG";
            width = 140;
        };
        title = "Goa Mix";
    },
        {
        description = "";
        index = 7;
        ns = 0;
        pageid = 4454842;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 105;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Ploughmen_Fac_simile_of_a_Miniature_in_a_very_ancient_Anglo_Saxon_Manuscript_published_by_Shaw_with_legend_God_Spede_ye_Plough_and_send_us_Korne_enow.png/140px-Ploughmen_Fac_simile_of_a_Miniature_in_a_very_ancient_Anglo_Saxon_Manuscript_published_by_Shaw_with_legend_God_Spede_ye_Plough_and_send_us_Korne_enow.png";
            width = 140;
        };
        title = Goad;
    },
        {
        description = "Person who blocks goal in ice hockey";
        index = 8;
        ns = 0;
        pageid = 567809;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 140;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Wallinheimo_Sinuhe_JYP.jpg/98px-Wallinheimo_Sinuhe_JYP.jpg";
            width = 98;
        };
        title = Goaltender;
    },
        {
        description = "Commune in Tarn-et-Garonne, France";
        index = 9;
        ns = 0;
        pageid = 15914816;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 135;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9c/France_location_map-Regions_and_departements-2015.svg/140px-France_location_map-Regions_and_departements-2015.svg.png";
            width = 140;
        };
        title = Goas;
    },
        {
        description = Airline;
        index = 10;
        ns = 0;
        pageid = 2102218;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 78;
            source = "https://upload.wikimedia.org/wikipedia/en/thumb/8/86/GoAir_Logo.png/140px-GoAir_Logo.png";
            width = 140;
        };
        title = GoAir;
    },
        {
        description = "";
        index = 11;
        ns = 0;
        pageid = 7787831;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        title = Goans;
    },
        {
        description = "Sports position played in defense of one's own goal";
        index = 12;
        ns = 0;
        pageid = 86314;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 140;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Simon_Mignolet_-_Gerrard_testimonial_2013.jpg/92px-Simon_Mignolet_-_Gerrard_testimonial_2013.jpg";
            width = 92;
        };
        title = Goalkeeper;
    },
        {
        description = "Fictional symbiotic race";
        index = 13;
        ns = 0;
        pageid = 618644;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 140;
            source = "https://upload.wikimedia.org/wikipedia/en/thumb/f/f1/Goa%27uld_in_water.jpg/110px-Goa%27uld_in_water.jpg";
            width = 110;
        };
        title = "Goa'uld";
    },
        {
        description = "";
        index = 14;
        ns = 0;
        pageid = 456031;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 140;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Lincoln-Warren-1865-03-06.jpeg/114px-Lincoln-Warren-1865-03-06.jpeg";
            width = 114;
        };
        title = Goatee;
    },
        {
        description = "Redirected from: Goat Rocks dome\nUS American volcano";
        index = 15;
        ns = 0;
        pageid = 36649;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 95;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/MSH82_st_helens_plume_from_harrys_ridge_05-19-82.jpg/140px-MSH82_st_helens_plume_from_harrys_ridge_05-19-82.jpg";
            width = 140;
        };
        title = "Mount St. Helens";
    },
        {
        description = "Method of scoring in many sports";
        index = 16;
        ns = 0;
        pageid = 400470;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 86;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Peter_Bondra_scoring.jpg/140px-Peter_Bondra_scoring.jpg";
            width = 140;
        };
        title = "Goal (sport)";
    },
        {
        description = "";
        index = 17;
        ns = 0;
        pageid = 2804660;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 140;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/7/7b/Ghana_location_map.svg/103px-Ghana_location_map.svg.png";
            width = 103;
        };
        title = Goaso;
    },
        {
        description = "";
        index = 18;
        ns = 0;
        pageid = 1119875;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 77;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Goanna_head2.jpg/140px-Goanna_head2.jpg";
            width = 140;
        };
        title = Goanna;
    },
        {
        description = "Music genre";
        index = 19;
        ns = 0;
        pageid = 197453;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        title = "Goa trance";
    },
        {
        description = "";
        index = 20;
        ns = 0;
        pageid = 495652;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 105;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Hockey_goal_cmd_2004.jpg/140px-Hockey_goal_cmd_2004.jpg";
            width = 140;
        };
        title = "Goal (ice hockey)";
    },
        {
        description = "Sami hut or tent";
        index = 21;
        ns = 0;
        pageid = 13850659;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 93;
            source = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Skansen29.jpg/140px-Skansen29.jpg";
            width = 140;
        };
        title = Goahti;
    },
        {
        description = "";
        index = 22;
        ns = 0;
        pageid = 961668;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        title = "Goal difference";
    },
        {
        description = "";
        index = 23;
        ns = 0;
        pageid = 32262532;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        title = "Goa Gap";
    },
        {
        description = "";
        index = 24;
        ns = 0;
        pageid = 34315125;
        searchterm = goa;
        searchtype = 0;
        snippet = "";
        thumbnail =         {
            height = 140;
            source = "https://upload.wikimedia.org/wikipedia/en/thumb/b/b5/Adujivitam.jpg/91px-Adujivitam.jpg";
            width = 91;
        };
        title = "Goat Days";
    }
) from operation (null)

Checked with 5.0.0.438 on iPhone 5 iOS 9.02 - the bug is still there. To better see the regression nature of the bug, compare searches between 5.0.0.438 and 4.1.7(171)- production.

iPhone 5 iOS 9.02 was used.

  • delete all recent searches
  • type with a normal typing speed - e.g. 'goa'(a tricky search term), 'venus'
  • when a word is typed - nothing is displayed in terms of search results
  • clicking Search button on the keyboard does nothing
  • adding a whitespace or deleting the last letter triggers the search
  • when you click on the small x to clear typed searches, it's hard to dismiss Search page by clicking on the big X icon.

I filed T117111: [Regression 5.0.0.438] Recent searches display only articles titles which were clicked from the list - but not sure that it's a real bug. Can be viewed as an improvement of search relevance (sort of).

JMinor added a subscriber: JMinor.Oct 29 2015, 10:57 PM

@Etonkovidova can you try this test one more time using the 454 build (current build from hockey app?

For this:
"when you click on the small x to clear typed searches, it's hard to dismiss Search page by clicking on the big X icon."

Not a bug but a valid usability issue with the current double "X" on search UI, We will revisit this decision.

Re-checked with 5.0.0.454 on iPhone 5 iOS 9.02 - all issues that were on 5.0.0.438 have been resolved.

JMinor closed this task as Resolved.Nov 18 2015, 9:01 PM