New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 705012 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: ----


Participants' hotlists:
js-exception

Previous locations:
gerrit:5852


Sign in to add a comment

BuildBucke plugint: Uncaught TypeError: Cannot read property 'toLowerCase' of undefined

Project Member Reported by vikt...@google.com, Mar 23 2017

Issue description

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined, Stack trace: TypeError: Cannot read property 'toLowerCase' of undefined
at HTMLTemplateElement._filterFn (https://chromium-review.googlesource.com/plugins/buildbucket/static/cr-tryjob-picker.js:52:28)
at https://cdn.googlesource.com/polygerrit_ui/302.0/elements/gr-app.js:7873:13
at Array.filter (native)
at HTMLTemplateElement._applyFullRefresh (https://cdn.googlesource.com/polygerrit_ui/302.0/elements/gr-app.js:7872:13)
at HTMLTemplateElement._render (https://cdn.googlesource.com/polygerrit_ui/302.0/elements/gr-app.js:7820:6)
at Debouncer.complete (https://cdn.googlesource.com/polygerrit_ui/302.0/elements/gr-app.js:2887:10)
at Debouncer.boundComplete (https://cdn.googlesource.com/polygerrit_ui/302.0/elements/gr-app.js:2864:6)
at Object._atEndOfMicrotask (https://cdn.googlesource.com/polygerrit_ui/302.0/elements/gr-app.js:2842:1)
at MutationObserver.window.MutationObserver.observe.characterData (https://cdn.googlesource.com/polygerrit_ui/302.0/elements/gr-app.js:2857:15)
 

Comment 1 by wyatta@google.com, Mar 24 2017

Cc: andyb...@chromium.org
Status: Accepted (was: New)
Looks like CR-TRYJOB-PICKER#_computeBuilderFilterFn where it says

 return builder.name.toLowerCase().indexOf(filterStr) !== -1;
Project: chromium
Moved issue gerrit:5852 to now be  issue chromium:705012 .
Components: Infra>Codereview>Gerrit
Labels: Milestone-Dogfood Proj-Gerrit-Migration Pri-2
Owner: aga...@chromium.org
Status: Assigned (was: Accepted)
Summary: BuildBucke plugint: Uncaught TypeError: Cannot read property 'toLowerCase' of undefined (was: Uncaught TypeError: Cannot read property 'toLowerCase' of undefined)

Comment 5 by aga...@chromium.org, Mar 24 2017

this requires pluginConfig.buckets[<some bucket>].builders[<some builder>].name to be undefined. I have no idea how that would happen. I need to see the page on which this is happening so I can see the json object being fetched by the buildbucket plugin.

Do the logs this error was pulled from contain a url I can use to reproduce?

Comment 6 by vikt...@google.com, Mar 27 2017

Status: Verified (was: Assigned)
Looks like the fix went live ~March 23, since it's no longer in the logs.

Comment 7 by aga...@chromium.org, Mar 28 2017

Cc: rmis...@chromium.org
Status: Assigned (was: Verified)
This is being seen again, and I have a reliable reproduction. Reopening.

Comment 8 by aga...@chromium.org, Mar 28 2017

Status: Started (was: Assigned)
https://chromium-review.googlesource.com/461727
Project Member

Comment 9 by bugdroid1@chromium.org, Mar 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/gerrit-plugins/buildbucket/+/cca08f967c58708a019ed051c6abbc25d824b6a2

commit cca08f967c58708a019ed051c6abbc25d824b6a2
Author: Aaron Gable <agable@chromium.org>
Date: Wed Mar 29 00:15:50 2017

Stop using builder.name in filter functions

This use must have been missed when the builder objects
became bare strings.

Bug:  705012 
Change-Id: Ie45a9aab5ce7e915044c9d15a14c9ebf95d41d41
Reviewed-on: https://chromium-review.googlesource.com/461727
Reviewed-by: Andrew Bonventre <andybons@chromium.org>

[modify] https://crrev.com/cca08f967c58708a019ed051c6abbc25d824b6a2/test/cr-tryjob-picker_test.html
[modify] https://crrev.com/cca08f967c58708a019ed051c6abbc25d824b6a2/src/main/resources/static/cr-tryjob-picker.js

Status: Fixed (was: Started)
This should be deployed tomorrow or thursday.

Sign in to add a comment