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

Issue 718461 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android
Pri: 1
Type: Bug

Blocking:
issue 712833
issue 712836



Sign in to add a comment

FirstRunIntegrationTest.testDefaultSearchEngine_ShowExisting fails flakily

Project Member Reported by joh...@chromium.org, May 4 2017

Issue description

FirstRunIntegrationTest.testDefaultSearchEngine_ShowExisting was recently added by https://codereview.chromium.org/2844323003.

However it's been consistently failing on https://build.chromium.org/p/chromium.android/builders/Lollipop%20Phone%20Tester, and flakily failing on other Android bots:

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=chrome_public_test_apk&tests=FirstRunIntegrationTest%23testDefaultSearchEngine_ShowExisting

Exception:

java.lang.RuntimeException: Exception occured while waiting for runnable
	at <snip>
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.View.performClick()' on a null object reference
	at <snip>
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.View.performClick()' on a null object reference
	at org.chromium.chrome.browser.firstrun.FirstRunIntegrationTest$9.run(FirstRunIntegrationTest.java:316)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:135)
	at android.app.ActivityThread.main(ActivityThread.java:5254)
	at java.lang.reflect.Method.invoke(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:372)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
 
Cc: tedc...@chromium.org
Status: Started (was: Unconfirmed)
Fix should hopefully be easy.  Guessing the thing to click on isn't ready immediately.  Investigating.
Labels: ReleaseBlock-Stable M-60
Project Member

Comment 3 by bugdroid1@chromium.org, May 4 2017

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

commit cbb2753cfb8b54c01b163ef7e443b95a5f570c75
Author: johnme <johnme@chromium.org>
Date: Thu May 04 16:38:04 2017

Mark a FirstRunIntegrationTest flaky

FirstRunIntegrationTest.testDefaultSearchEngine_ShowExisting was
recently added by https://codereview.chromium.org/2844323003.

However it's been consistently failing on Lollipop Phone Tester, and
flakily failing on other Android bots, so this patch disables it.

BUG= 718461 
TBR=dfalcantara
NOTRY=true
SKIPTREECHECKS=true

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

[modify] https://crrev.com/cbb2753cfb8b54c01b163ef7e443b95a5f570c75/chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationTest.java

Project Member

Comment 4 by bugdroid1@chromium.org, May 4 2017

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

commit 71e4f4f52608631a084e4097585ed5fdc58d0a87
Author: dfalcantara <dfalcantara@chromium.org>
Date: Thu May 04 17:40:19 2017

🔍 Fix flaky FirstRunIntegrationTest

Seems the option isn't ready to click on immediately.
Wait until the option is non-null before moving forward.

BUG= 718461 

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

[modify] https://crrev.com/71e4f4f52608631a084e4097585ed5fdc58d0a87/chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationTest.java

Cc: dfalcant...@chromium.org
 Issue 718485  has been merged into this issue.
Status: Fixed (was: Started)
Seems to be fixed.  At least it started passing on the Lollipop phone bot where it used to constantly fail.  Still monitoring; will re-open if it continues being problematic.
Status: Assigned (was: Fixed)
https://uberchromegw.corp.google.com/i/chromium.android/builders/Marshmallow%2064%20bit%20Tester/builds/12588

:( Seems to have started flaking again...
Project Member

Comment 8 by bugdroid1@chromium.org, May 30 2017

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

commit 76feb802adee55d10fbd4dbfe05e1f650bc2bc14
Author: mattcary <mattcary@chromium.org>
Date: Tue May 30 09:55:37 2017

Disabling FirstRunIntegrationTest.testDefaultSearchEngine_ShowExisting.

It has started flaking again.

BUG= 718461 
TBR=dfalcantara@chromium.org,tedchoc@chromium.org

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

[modify] https://crrev.com/76feb802adee55d10fbd4dbfe05e1f650bc2bc14/chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationTest.java

Cc: yus...@chromium.org
Owner: tedc...@chromium.org
I'll take a look at this.

Hmm...it looks like "something" is calling LocaleManager#showSearchEnginePromoIfNeeded since FirstRun shouldn't be calling into the Dialog flow.

Flakiness dashboard link:
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=chrome_public_test_apk&tests=testDefaultSearchEngine_ShowExisting

https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.android%2FMarshmallow_64_bit_Tester%2F12559%2F%2B%2Frecipes%2Fsteps%2Fchrome_public_test_apk_on_Android%2F0%2Flogs%2Forg.chromium.chrome.browser.firstrun.FirstRunIntegrationTest_testDefaultSearchEngine_ShowExisting%2F0

android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@e0c9bf6 is not valid; is your activity running?
	at android.view.ViewRootImpl.setView(ViewRootImpl.java:567)
	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:310)
	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
	at android.app.Dialog.show(Dialog.java:319)
	at org.chromium.chrome.browser.locale.DefaultSearchEnginePromoDialog.show(DefaultSearchEnginePromoDialog.java:109)
	at org.chromium.chrome.browser.locale.DefaultSearchEnginePromoDialog$1.onTemplateUrlServiceLoaded(DefaultSearchEnginePromoDialog.java:59)
	at org.chromium.chrome.browser.search_engines.TemplateUrlService$1.run(TemplateUrlService.java:296)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5417)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Earliest failure I found:
https://build.chromium.org/p/chromium.android/builders/Marshmallow%2064%20bit%20Tester/builds/12504

The test does launch CTA at the end, so maybe this crash is just caught as the test is being shutdown.  We should fix it so we don't attempt to show the dialog if the activity has been destroyed/shutdown.
Status: Started (was: Assigned)
Status: Fixed (was: Started)
Has not flaked since my patch landed.
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-60; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-60 label, otherwise remove Merge-TBD label. Thanks.
Labels: Merge-Request-60
Merge request for https://bugs.chromium.org/p/chromium/issues/detail?id=718461#c12
Project Member

Comment 16 by sheriffbot@chromium.org, Jun 1 2017

Labels: -Merge-Request-60 Hotlist-Merge-Approved Merge-Approved-60
Your change meets the bar and is auto-approved for M60. Please go ahead and merge the CL to branch 3112 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-TBD
Project Member

Comment 18 by sheriffbot@chromium.org, Jun 5 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 19 by bugdroid1@chromium.org, Jun 5 2017

Labels: -merge-approved-60 merge-merged-3112
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/21f084920b4efa522b2cb60e0f779d5cec05255c

commit 21f084920b4efa522b2cb60e0f779d5cec05255c
Author: Ted Choc <tedchoc@google.com>
Date: Mon Jun 05 20:46:37 2017

Do not attempt to show search engine dialog if activity is dead.

BUG= 718461 

Review-Url: https://codereview.chromium.org/2911273002
Cr-Original-Commit-Position: refs/heads/master@{#475624}
Review-Url: https://codereview.chromium.org/2924693002 .
Cr-Commit-Position: refs/branch-heads/3112@{#168}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}

[modify] https://crrev.com/21f084920b4efa522b2cb60e0f779d5cec05255c/chrome/android/java/src/org/chromium/chrome/browser/locale/DefaultSearchEnginePromoDialog.java

Sign in to add a comment