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

Issue 664518 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 664505



Sign in to add a comment

System health browse stories failing on ScrollPageToElement

Project Member Reported by perezju@chromium.org, Nov 11 2016

Issue description

Stories failing:

- browse:social:facebook
- browse:media:imgur

On at least the following bots:

- Android Nexus5 Perf (2)
- Android Nexus5X Perf (2)
- Android Nexus5X WebView Perf (2)
- Android Nexus6 WebView Perf (1)
- Android Nexus7v2 Perf (2)

Sample Python traceback:

Traceback (most recent call last):
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/telemetry/telemetry/internal/story_runner.py", line 87, in _RunStoryAndProcessErrorIfNeeded
    state.RunStory(results)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 75, in traced_function
    return func(*args, **kwargs)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/telemetry/telemetry/page/shared_page_state.py", line 299, in RunStory
    self._current_page.Run(self)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/telemetry/telemetry/page/__init__.py", line 109, in Run
    self.RunPageInteractions(action_runner)
  File "/b/rr/tmpLlosmu/w/src/tools/perf/page_sets/system_health/system_health_story.py", line 112, in RunPageInteractions
    self._DidLoadDocument(action_runner)
  File "/b/rr/tmpLlosmu/w/src/tools/perf/page_sets/system_health/browsing_stories.py", line 247, in _DidLoadDocument
    self._NavigateToItem(action_runner, index)
  File "/b/rr/tmpLlosmu/w/src/tools/perf/page_sets/system_health/browsing_stories.py", line 33, in _NavigateToItem
    action_runner.ScrollPageToElement(element_function=item_selector)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 75, in traced_function
    return func(*args, **kwargs)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/telemetry/telemetry/internal/actions/action_runner.py", line 429, in ScrollPageToElement
    speed_in_pixels_per_second=speed_in_pixels_per_second))
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 75, in traced_function
    return func(*args, **kwargs)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/telemetry/telemetry/internal/actions/action_runner.py", line 54, in _RunAction
    action.WillRunAction(self._tab)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 75, in traced_function
    return func(*args, **kwargs)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/telemetry/telemetry/internal/actions/scroll_to_element.py", line 54, in WillRunAction
    self._distance = tab.EvaluateJavaScript(get_distance_js)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 75, in traced_function
    return func(*args, **kwargs)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/telemetry/telemetry/internal/browser/web_contents.py", line 193, in EvaluateJavaScript
    expr, context_id=None, timeout=timeout)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 75, in traced_function
    return func(*args, **kwargs)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/telemetry/telemetry/internal/browser/web_contents.py", line 221, in EvaluateJavaScriptInContext
    expr, context_id=context_id, timeout=timeout)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 75, in traced_function
    return func(*args, **kwargs)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/telemetry/telemetry/internal/backends/chrome_inspector/inspector_backend.py", line 36, in inner
    return func(inspector_backend, *args, **kwargs)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/telemetry/telemetry/internal/backends/chrome_inspector/inspector_backend.py", line 211, in EvaluateJavaScript
    return self._runtime.Evaluate(expr, context_id, timeout)
  File "/b/rr/tmpLlosmu/w/src/third_party/catapult/telemetry/telemetry/internal/backends/chrome_inspector/inspector_runtime.py", line 53, in Evaluate
    raise exceptions.EvaluateException(text)
EvaluateException: Uncaught
https://uberchromegw.corp.google.com/i/chromium.perf/builders/Android%20Nexus5%20Perf%20%282%29/builds/4296/steps/system_health.common_mobile/logs/stdio

 
Cc: -rnep...@chromium.org
Owner: rnep...@chromium.org
This is probably a bug in javascript. There is no sign of the page being malformed:

browse:social:facebook
https://console.developers.google.com/m/cloudstorage/b/chrome-telemetry-output/o/profiler-file-id_6-2016-11-11_02-54-0511081.png

browse:media:imgur
https://console.developers.google.com/m/cloudstorage/b/chrome-telemetry-output/o/profiler-file-id_10-2016-11-11_02-54-0649223.png


Randy, can you take a look at this?


It's also worth noting that these 2 are not caught on CQ because they are currently disabled in smoke test:
https://cs.chromium.org/chromium/src/tools/perf/benchmarks/system_health_smoke_test.py?rcl=0&l=54

https://cs.chromium.org/chromium/src/tools/perf/benchmarks/system_health_smoke_test.py?rcl=0&l=50
Summary: System health browse stories failing on ScrollPageToElement (was: System health common browse stories failing on ScrollPageToElement)
FYI: these two stories are also failing on the mobile_memory version of the benchmark at least on:

- Android Nexus5X Perf (1)
- Android Nexus5X WebView Perf (1)
- Android Nexus6 Perf (1)

Example:
https://build.chromium.org/p/chromium.perf/builders/Android%20Nexus5X%20Perf%20%281%29/builds/3743/steps/system_health.memory_mobile/logs/stdio

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 11 2016

Cc: rnep...@chromium.org nednguyen@chromium.org perezju@chromium.org
 Issue 664172  has been merged into this issue.
I have discovered why the exception is being thrown.

Immediately upon page load the <Next Post> button is not present. It is attempting to find it before it is on screen, therefor is coming back as undefined. It is then trying to call getBoundingClientRect on undefined and getting this "cannot read property 'getBoundingClientRect' of undefined"

I think add a WaitForElement() call in _NavigateToItem() on the _BrowsingStory class is the correct way to fix this. Thoughts?
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8b8aefd36998a2e90cdc58b509df4702fc61f3e5

commit 8b8aefd36998a2e90cdc58b509df4702fc61f3e5
Author: nednguyen <nednguyen@google.com>
Date: Fri Nov 11 21:39:59 2016

Reenable system health smoke tests that were disabled because they took too long.

BUG= 664518 ,  660608 

Review-Url: https://codereview.chromium.org/2493203002
Cr-Commit-Position: refs/heads/master@{#431653}

[modify] https://crrev.com/8b8aefd36998a2e90cdc58b509df4702fc61f3e5/tools/perf/benchmarks/system_health_smoke_test.py

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5548da5191e81c648f35dd9a13897fcbbb4cbc4b

commit 5548da5191e81c648f35dd9a13897fcbbb4cbc4b
Author: rnephew <rnephew@chromium.org>
Date: Fri Nov 11 21:54:48 2016

[SystemHealth] Wait for element to exist before trying to scroll to it in browsing stories.

BUG= 664518 

Review-Url: https://codereview.chromium.org/2497023002
Cr-Commit-Position: refs/heads/master@{#431656}

[modify] https://crrev.com/5548da5191e81c648f35dd9a13897fcbbb4cbc4b/tools/perf/page_sets/system_health/browsing_stories.py

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/38c2eac67d10cd0a519f2e76b2b0287d283c0454

commit 38c2eac67d10cd0a519f2e76b2b0287d283c0454
Author: rnephew <rnephew@chromium.org>
Date: Sat Nov 12 00:19:02 2016

[System Health] Reenable tests failing due to bug in ScrollToElement

Fix is landing in:
https://codereview.chromium.org/2497023002/

BUG= 664518 

Review-Url: https://codereview.chromium.org/2498613004
Cr-Commit-Position: refs/heads/master@{#431693}

[modify] https://crrev.com/38c2eac67d10cd0a519f2e76b2b0287d283c0454/tools/perf/page_sets/system_health/browsing_stories.py

Since my fix landed, on the bot listed there has been 8 failures of system_health.common_mobile. 2/6 has been the failure that was seen before. The other 4 are unrelated to it (devtool crashes and timeouts while navigating to the page). The occurrence of this problem before my fix was 100%. 

The strange thing here is that it is making it through the WaitForElement. It means that it has found the element, but in those two cases when trying to scroll to it immediately after seeing that its there fails.

Both cases have it failing only on the facebook test, so I think whatever strangeness we are seeing is tied to the facebook page.
I tried running the facebook page locally... but it crashed 10/10 times I tried.
Issue 664132 has been merged into this issue.
Whatever was causing the crash is fixed. I ran it locally 70 times total, one set of 20 one set of 50 using --pageset-repeat and --story-filter="browse:social:facebook" and zero problems.
Status: Fixed (was: Assigned)
I spent some time this morning and afternoon looking for more recent occurrences of this problem. I did not find any. Feel free to reopen if it starts happening again.

Sign in to add a comment