Issue metadata
Sign in to add a comment
|
Test page loading failure "Page did not load" in ChromeTabUtils.waitForTabPageLoaded, load progress: 100, is loading: false |
||||||||||||||||||||
Issue descriptionchrome_public_test_apk failing on chromium.linux/Android Tests Builders failed on: - Android Tests: https://build.chromium.org/p/chromium.linux/builders/Android%20Tests Specifically, this test: org.chromium.chrome.browser.contextualsearch.ContextualSearchManagerTest#testAppMenuSuppressedWhenMaximized is failing: junit.framework.AssertionFailedError: Page did not load. Tab information at time of failure -- url: null, final URL: http://127.0.0.1:37267/chrome/test/data/android/contextualsearch/tap_test.html, load progress: 100, is loading: false at org.chromium.chrome.test.util.ChromeTabUtils.waitForTabPageLoaded(ChromeTabUtils.java:84) at org.chromium.chrome.test.ChromeActivityTestCaseBase.startMainActivityFromIntent(ChromeActivityTestCaseBase.java:479) at org.chromium.chrome.test.ChromeActivityTestCaseBase.startMainActivityWithURL(ChromeActivityTestCaseBase.java:435) at org.chromium.chrome.browser.contextualsearch.ContextualSearchManagerTest.startMainActivity(ContextualSearchManagerTest.java:300) at org.chromium.chrome.test.ChromeActivityTestCaseBase.setUp(ChromeActivityTestCaseBase.java:150) at org.chromium.chrome.browser.contextualsearch.ContextualSearchManagerTest.setUp(ContextualSearchManagerTest.java:134) at org.chromium.base.test.BaseTestResult.runParameterized(BaseTestResult.java:161) at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:124) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701) This looks similar to https://crbug.com/707383 . mdjones@, can you take a peek?
,
Apr 12 2017
I've seen this a few times while sheriff the last two days, and think it's some flakiness in infrastructure. Updating the bug title etc to reflect this recent thinking.
,
May 1 2017
I'm planning to investigate this over the next few weeks.
,
May 1 2017
I see this all the time when running tests on my N5 but my newer/faster phone usually doesn't have this problem.
,
May 2 2017
#4: when you see this locally, what tests are you typically running? ContextualSearchManagerTests or something else? How is your build typically set up?
,
May 2 2017
I see this on ContextualSearchManagerTests run on a DEBUG version of the chrome public APK.
,
May 4 2017
I haven't yet been able to reproduce this locally, but after reading through the code, experimenting, and looking at https://bugs.chromium.org/p/chromium/issues/detail?id=576967, I think this can happen if we manage to run the UI thread Runnable responsible for checking whether the tab has loaded & adding the observer if it hasn't (https://codesearch.chromium.org/chromium/src/chrome/test/android/javatests/src/org/chromium/chrome/test/util/ChromeTabUtils.java?rcl=15c6e6959e859602b939bec765b9caa277fde43b&l=61) in between the tab's onPageLoadFinished and onLoadStopped calls. I've uploaded https://codereview.chromium.org/2859053004/ as a speculative fix for this.
,
May 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8e566f616c9ecf713ce7e1283405adfb756a6915 commit 8e566f616c9ecf713ce7e1283405adfb756a6915 Author: jbudorick <jbudorick@chromium.org> Date: Tue May 09 03:53:43 2017 [Android] Tweak ChromeTabUtils.waitForTabPageLoaded loading state logic. ChromeTabUtils.waitForTabPageLoaded was previously using Tab.isLoading() to determine whether a tab had previously finished loading, then using TabObserver.onPageLoadFinished to determine when a tab that hadn't previously finished loading did so. Unfortunately, Tab's loading state as tracked by Tab.mIsLoading is modified by the Tab.onLoadStopped (which, in turn, calls TabObserver.onLoadStopped), not by Tab.didPageLoadFinish (which, in turn, calls TabObserver.onPageLoadFinished). The disconnect here means that it's possible for ChromeTabUtils.waitForTabPageLoaded to see a Tab that is still loading according to mIsLoading but has already fired onPageLoadFinished. In such a scenario, waitForTabPageLoaded will time out without ever seeing a call to onPageLoadFinished even though the page has loaded. This CL changes the observer used by ChromeTabUtils. Instead of simply waiting for onPageLoadFinished, it now will: - recognize that the Tab has successfully loaded upon receiving onPageLoadFinished (same as now) - recognize that the Tab has failed to load upon receiving onCrash - note whether onLoadStopped has been called. If a timeout is hit and onLoadStopped has been called, the Tab is on the correct page, and the Tab hasn't crashed, waitForTabPageLoaded will assume that the Tab has successfully loaded. BUG= 709004 Review-Url: https://codereview.chromium.org/2859053004 Cr-Commit-Position: refs/heads/master@{#470172} [modify] https://crrev.com/8e566f616c9ecf713ce7e1283405adfb756a6915/base/test/android/javatests/src/org/chromium/base/test/util/CallbackHelper.java [modify] https://crrev.com/8e566f616c9ecf713ce7e1283405adfb756a6915/chrome/test/android/javatests/src/org/chromium/chrome/test/util/ChromeTabUtils.java
,
May 15 2017
I've been looking for occurrences of this over the last week to no avail (yay?). I'm going to keep looking; if I don't see any before next week, I'll tentatively mark this fixed.
,
May 16 2017
I just did a quick run of Contextual Search tests on my N5 which has shown lots of issues in the past, and we got 2 failures but 25 worked. It seems like the failures are most likely to happen the first time it tries to load the page -- maybe something needs to "warm up"? Let me know if I can help, e.g. lend the device, etc. [1383/1383] STAMP obj/chrome/android/chrome_public_test_apk.stamp C 428.691s Main ******************************************************************************** C 428.691s Main Detailed Logs C 428.691s Main ******************************************************************************** C 428.691s Main [FAIL] org.chromium.chrome.browser.autofill.AutofillKeyboardAccessoryTest#testTapInputFieldShowsKeyboardAccessory: C 428.691s Main junit.framework.AssertionFailedError: Tab never selected/initialized. C 428.691s Main at junit.framework.Assert.fail(Assert.java:50) C 428.691s Main at junit.framework.Assert.assertTrue(Assert.java:20) C 428.691s Main at org.chromium.content.browser.test.util.CriteriaHelper.pollInstrumentationThread(CriteriaHelper.java:79) C 428.691s Main at org.chromium.content.browser.test.util.CriteriaHelper.pollUiThread(CriteriaHelper.java:117) C 428.692s Main at org.chromium.content.browser.test.util.CriteriaHelper.pollUiThread(CriteriaHelper.java:138) C 428.692s Main at org.chromium.chrome.test.ChromeActivityTestCommon.startMainActivityFromIntent(ChromeActivityTestCommon.java:380) C 428.692s Main at org.chromium.chrome.test.ChromeActivityTestCommon.startMainActivityWithURL(ChromeActivityTestCommon.java:346) C 428.692s Main at org.chromium.chrome.test.ChromeActivityTestRule.startMainActivityWithURL(ChromeActivityTestRule.java:230) C 428.692s Main at org.chromium.chrome.browser.autofill.AutofillKeyboardAccessoryTest.loadTestPage(AutofillKeyboardAccessoryTest.java:64) C 428.692s Main at org.chromium.chrome.browser.autofill.AutofillKeyboardAccessoryTest.testTapInputFieldShowsKeyboardAccessory(AutofillKeyboardAccessoryTest.java:137) C 428.692s Main at java.lang.reflect.Method.invoke(Native Method) C 428.692s Main at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) C 428.692s Main at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) C 428.692s Main at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:52) C 428.692s Main at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) C 428.692s Main at org.chromium.base.test.ScreenshotOnFailureStatement.evaluate(ScreenshotOnFailureStatement.java:37) C 428.692s Main at org.chromium.chrome.test.ChromeActivityTestRule$1.evaluate(ChromeActivityTestRule.java:59) C 428.692s Main at android.support.test.internal.statement.UiThreadStatement.evaluate(UiThreadStatement.java:55) C 428.692s Main at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:270) C 428.692s Main at org.chromium.chrome.test.ChromeActivityTestRule$2.evaluate(ChromeActivityTestRule.java:66) C 428.692s Main at org.junit.rules.RunRules.evaluate(RunRules.java:20) C 428.692s Main at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) C 428.692s Main at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) C 428.692s Main at org.chromium.base.test.BaseJUnit4ClassRunner.runChild(BaseJUnit4ClassRunner.java:135) C 428.693s Main at org.chromium.base.test.BaseJUnit4ClassRunner.runChild(BaseJUnit4ClassRunner.java:36) C 428.693s Main at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) C 428.693s Main at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) C 428.693s Main at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) C 428.693s Main at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) C 428.693s Main at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) C 428.693s Main at org.junit.runners.ParentRunner.run(ParentRunner.java:363) C 428.693s Main at org.junit.runners.Suite.runChild(Suite.java:128) C 428.693s Main at org.junit.runners.Suite.runChild(Suite.java:27) C 428.693s Main at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) C 428.693s Main at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) C 428.693s Main at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) C 428.693s Main at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) C 428.693s Main at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) C 428.693s Main at org.junit.runners.ParentRunner.run(ParentRunner.java:363) C 428.693s Main at org.junit.runner.JUnitCore.run(JUnitCore.java:137) C 428.693s Main at org.junit.runner.JUnitCore.run(JUnitCore.java:115) C 428.693s Main at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59) C 428.693s Main at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262) C 428.693s Main at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1879) C 428.694s Main C 428.694s Main [FAIL] org.chromium.chrome.browser.contextualsearch.ContextualSearchManagerTest#testTap: C 428.694s Main junit.framework.AssertionFailedError: Tab never selected/initialized. C 428.694s Main at junit.framework.Assert.fail(Assert.java:50) C 428.694s Main at junit.framework.Assert.assertTrue(Assert.java:20) C 428.694s Main at org.chromium.content.browser.test.util.CriteriaHelper.pollInstrumentationThread(CriteriaHelper.java:79) C 428.694s Main at org.chromium.content.browser.test.util.CriteriaHelper.pollUiThread(CriteriaHelper.java:117) C 428.694s Main at org.chromium.content.browser.test.util.CriteriaHelper.pollUiThread(CriteriaHelper.java:138) C 428.694s Main at org.chromium.chrome.test.ChromeActivityTestCommon.startMainActivityFromIntent(ChromeActivityTestCommon.java:380) C 428.694s Main at org.chromium.chrome.test.ChromeActivityTestCommon.startMainActivityWithURL(ChromeActivityTestCommon.java:346) C 428.694s Main at org.chromium.chrome.test.ChromeActivityTestRule.startMainActivityWithURL(ChromeActivityTestRule.java:230) C 428.694s Main at org.chromium.chrome.browser.contextualsearch.ContextualSearchManagerTest.setUp(ContextualSearchManagerTest.java:148) C 428.694s Main at java.lang.reflect.Method.invoke(Native Method) C 428.694s Main at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) C 428.694s Main at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) C 428.694s Main at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:52) C 428.694s Main at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) C 428.694s Main at org.chromium.base.test.ScreenshotOnFailureStatement.evaluate(ScreenshotOnFailureStatement.java:37) C 428.694s Main at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) C 428.694s Main at org.chromium.chrome.test.ChromeActivityTestRule$1.evaluate(ChromeActivityTestRule.java:59) C 428.694s Main at android.support.test.internal.statement.UiThreadStatement.evaluate(UiThreadStatement.java:55) C 428.694s Main at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:270) C 428.694s Main at org.chromium.chrome.test.ChromeActivityTestRule$2.evaluate(ChromeActivityTestRule.java:66) C 428.694s Main at org.junit.rules.RunRules.evaluate(RunRules.java:20) C 428.694s Main at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) C 428.695s Main at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) C 428.695s Main at org.chromium.base.test.BaseJUnit4ClassRunner.runChild(BaseJUnit4ClassRunner.java:135) C 428.695s Main at org.chromium.base.test.BaseJUnit4ClassRunner.runChild(BaseJUnit4ClassRunner.java:36) C 428.695s Main at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) C 428.695s Main at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) C 428.695s Main at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) C 428.695s Main at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) C 428.695s Main at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) C 428.695s Main at org.junit.runners.ParentRunner.run(ParentRunner.java:363) C 428.695s Main at org.junit.runners.Suite.runChild(Suite.java:128) C 428.695s Main at org.junit.runners.Suite.runChild(Suite.java:27) C 428.695s Main at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) C 428.695s Main at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) C 428.695s Main at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) C 428.695s Main at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) C 428.695s Main at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) C 428.695s Main at org.junit.runners.ParentRunner.run(ParentRunner.java:363) C 428.695s Main at org.junit.runner.JUnitCore.run(JUnitCore.java:137) C 428.695s Main at org.junit.runner.JUnitCore.run(JUnitCore.java:115) C 428.695s Main at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59) C 428.695s Main at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262) C 428.695s Main at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1879) C 428.695s Main ******************************************************************************** C 428.695s Main Summary C 428.695s Main ******************************************************************************** C 428.696s Main [==========] 27 tests ran. C 428.696s Main [ PASSED ] 25 tests. C 428.696s Main [ FAILED ] 2 tests, listed below: C 428.696s Main [ FAILED ] org.chromium.chrome.browser.autofill.AutofillKeyboardAccessoryTest#testTapInputFieldShowsKeyboardAccessory C 428.696s Main [ FAILED ] org.chromium.chrome.browser.contextualsearch.ContextualSearchManagerTest#testTap C 428.696s Main C 428.696s Main 2 FAILED TESTS C 428.696s Main ********************************************************************************
,
May 16 2017
Neither of those failures are the same fully loaded page failure, though, which is a step forward.
,
May 16 2017
Good point -- I had seen the other message somewhere too and got them confused. :-)
,
Jun 15 2017
Slightly more than a week since #9. Still haven't been able to find new instances of this. Marking as fixed. |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by maxmorin@chromium.org
, Apr 6 2017