Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent UI test failure - org.mozilla.reference.browser.ui.CustomTabsTest.customTabOpenInBrowserTest - androidx.test.espresso.NoMatchingViewException #1775

Open
Archaeopteryx opened this issue Jan 3, 2022 · 2 comments
Labels
eng:intermittent-test Evil test failures that only happen now-and-then and are a productivity killer eng:ui-test UI Tests

Comments

@Archaeopteryx
Copy link

Archaeopteryx commented Jan 3, 2022

Firebase Test Run:

Failed 2/2 runs

Stacktrace:

androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (with text: a string containing "http://localhost:40643/pages/generic1.html" and with id: 2131296620 and is descendant of a: with id: 2131296612)

View Hierarchy:
+>PopupDecorView{id=-1, visibility=VISIBLE, width=741, height=756, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(981,1021)(wrapxwrap) gr=TOP START CENTER DISPLAY_CLIP_VERTICAL sim={state=unchanged} ty=APPLICATION_PANEL fmt=TRANSLUCENT wanim=0x7f120101 surfaceInsets=Rect(0, 0 - 0, 0) (manual)
  fl=SPLIT_TOUCH HARDWARE_ACCELERATED FLAG_LAYOUT_ATTACHED_IN_DECOR
  pfl=WILL_NOT_REPLACE_ON_RELAUNCH LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
|
+->MenuView{id=-1, visibility=VISIBLE, width=741, height=756, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@bccb331, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
|
+-->CardView{id=2131296592, res-name=mozac_browser_menu_cardView, visibility=VISIBLE, width=741, height=756, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@da76a16, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
|
+--->RecyclerView{id=2131296594, res-name=mozac_browser_menu_recyclerView, visibility=VISIBLE, width=689, height=682, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@59f0f97, tag=null, root-is-layout-requested=false, has-input-connection=false, x=26.0, y=37.0, child-count=5} 
|
+---->LinearLayout{id=-1, visibility=VISIBLE, width=689, height=154, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@143d584, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
|
+----->AppCompatImageButton{id=-1, desc=Forward, visibility=VISIBLE, width=229, height=154, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@d08516d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0} 
|
+----->AppCompatImageButton{id=-1, desc=Refresh, visibility=VISIBLE, width=230, height=154, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@ca811a2, tag=null, root-is-layout-requested=false, has-input-connection=false, x=229.0, y=0.0} 
|
+----->AppCompatImageButton{id=-1, desc=Stop, visibility=VISIBLE, width=230, height=154, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@e3b0e33, tag=null, root-is-layout-requested=false, has-input-connection=false, x=459.0, y=0.0} 
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=689, height=132, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@beac5f0, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=154.0, child-count=1} 
|
+----->AppCompatTextView{id=2131296547, res-name=label, visibility=VISIBLE, width=601, height=59, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@2e59769, tag=null, root-is-layout-requested=false, has-input-connection=false, x=44.0, y=37.0, text=Share, input-type=0, ime-target=false, has-links=false} 
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=689, height=132, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@419a5ee, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=286.0, child-count=1} 
|
+----->SwitchCompat{id=2131296547, res-name=label, visibility=VISIBLE, width=601, height=132, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@38e5a8f, tag=null, root-is-layout-requested=false, has-input-connection=false, x=44.0, y=0.0, text=Request desktop site, input-type=0, ime-target=false, has-links=false, is-checked=false} 
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=689, height=132, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@cce511c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=418.0, child-count=1} 
|
+----->AppCompatTextView{id=2131296547, res-name=label, visibility=VISIBLE, width=601, height=59, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@8374125, tag=null, root-is-layout-requested=false, has-input-connection=false, x=44.0, y=37.0, text=Find in Page, input-type=0, ime-target=false, has-links=false} 
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=689, height=132, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@cfe32fa, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=550.0, child-count=1} 
|
+----->AppCompatTextView{id=2131296547, res-name=label, visibility=VISIBLE, width=601, height=59, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@32010ab, tag=null, root-is-layout-requested=false, has-input-connection=false, x=44.0, y=37.0, text=Open in Browser, input-type=0, ime-target=false, has-links=false} 
|
	at dalvik.system.VMStack.getThreadStackTrace(Native Method)
	at java.lang.Thread.getStackTrace(Thread.java:1720)
	at androidx.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:88)
	at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:51)
	at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:312)
	at androidx.test.espresso.ViewInteraction.check(ViewInteraction.java:297)
	at org.mozilla.reference.browser.ui.robots.BrowserRobot.verifyUrl(BrowserRobot.kt:62)
	at org.mozilla.reference.browser.ui.CustomTabsTest$customTabOpenInBrowserTest$3.invoke(CustomTabsTest.kt:160)
	at org.mozilla.reference.browser.ui.CustomTabsTest$customTabOpenInBrowserTest$3.invoke(CustomTabsTest.kt:159)
	at org.mozilla.reference.browser.ui.robots.CustomTabRobot$Transition.clickOpenInBrowserButton(CustomTabRobot.kt:109)
	at org.mozilla.reference.browser.ui.CustomTabsTest.customTabOpenInBrowserTest(CustomTabsTest.kt:159)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at androidx.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80)
	at androidx.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61)
	at androidx.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:527)
	at androidx.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:527)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
	at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:56)
	at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:388)
	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2189)

Build:

a503db5

@Archaeopteryx Archaeopteryx added the eng:ui-test UI Tests label Jan 3, 2022
@sv-ohorvath sv-ohorvath added the eng:intermittent-test Evil test failures that only happen now-and-then and are a productivity killer label Jan 4, 2022
@AndiAJ
Copy link
Contributor

AndiAJ commented Nov 7, 2022

Flaky 1x on 11/4 Main Firebase link

androidx.test.espresso.AmbiguousViewMatcherException: 'an instance of android.widget.TextView and view.getText() with or without transformation to match: is "Open in Browser"' matches multiple views in the hierarchy.
Problem views are marked with 'MATCHES' below.

View Hierarchy:
+>PopupDecorView{id=-1, visibility=VISIBLE, width=706, height=721, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(985,1063)(wrapxwrap) gr=TOP START CENTER DISPLAY_CLIP_VERTICAL sim={state=unchanged} ty=APPLICATION_PANEL fmt=TRANSLUCENT wanim=0x7f13013e surfaceInsets=Rect(0, 0 - 0, 0) (manual)
fl=ALT_FOCUSABLE_IM SPLIT_TOUCH HARDWARE_ACCELERATED FLAG_LAYOUT_ATTACHED_IN_DECOR
pfl=WILL_NOT_REPLACE_ON_RELAUNCH LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME
fitTypes=STATUS_BARS NAVIGATION_BARS CAPTION_BAR}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+->MenuView{id=-1, visibility=VISIBLE, width=706, height=721, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@7708196, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+-->CardView{id=2131296666, res-name=mozac_browser_menu_cardView, visibility=VISIBLE, width=706, height=721, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@2671117, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+--->RecyclerView{id=2131296668, res-name=mozac_browser_menu_recyclerView, visibility=VISIBLE, width=656, height=651, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@ef7eeed, tag=null, root-is-layout-requested=false, has-input-connection=false, x=25.0, y=35.0, child-count=9}
|
+---->LinearLayout{id=-1, visibility=VISIBLE, width=656, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@2ab2122, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3}
|
+----->AppCompatImageButton{id=-1, desc=Forward, visibility=VISIBLE, width=218, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@941a7b3, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+----->AppCompatImageButton{id=-1, desc=Refresh, visibility=VISIBLE, width=219, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@97f2170, tag=null, root-is-layout-requested=false, has-input-connection=false, x=218.0, y=0.0}
|
+----->AppCompatImageButton{id=-1, desc=Stop, visibility=VISIBLE, width=219, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@3f18ce9, tag=null, root-is-layout-requested=false, has-input-connection=false, x=437.0, y=0.0}
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=656, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@bfe2d6e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=147.0, child-count=1}
|
+----->AppCompatTextView{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@e250c0f, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=35.0, text=Share, input-type=0, ime-target=false, has-links=false}
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=656, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@20ce49c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=273.0, child-count=1}
|
+----->SwitchCompat{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@9cd0ea5, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=0.0, text=Request desktop site, input-type=0, ime-target=false, has-links=false, is-checked=false}
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=656, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@2305a2b, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=399.0, child-count=1}
|
+----->AppCompatTextView{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@251ae88, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=35.0, text=Find in Page, input-type=0, ime-target=false, has-links=false}
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=656, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@524f021, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=525.0, child-count=1}
|
+----->AppCompatTextView{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@c6a7c46, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=35.0, text=Open in Browser, input-type=0, ime-target=false, has-links=false} MATCHES
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=656, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@f586e07, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=525.0, child-count=1}
|
+----->AppCompatTextView{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@a972b34, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=35.0, text=Open in Browser, input-type=0, ime-target=false, has-links=false} MATCHES
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=656, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@ac216d2, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=273.0, child-count=1}
|
+----->SwitchCompat{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@3e3a3, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=0.0, text=Request desktop site, input-type=0, ime-target=false, has-links=false, is-checked=false}
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=656, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@f8a8259, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=147.0, child-count=1}
|
+----->AppCompatTextView{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@b86ce1e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=35.0, text=Share, input-type=0, ime-target=false, has-links=false}
|
+---->LinearLayout{id=-1, visibility=VISIBLE, width=656, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@34dae2a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3}
|
+----->AppCompatImageButton{id=-1, desc=Forward, visibility=VISIBLE, width=218, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@1a0241b, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+----->AppCompatImageButton{id=-1, desc=Refresh, visibility=VISIBLE, width=219, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@411c9b8, tag=null, root-is-layout-requested=false, has-input-connection=false, x=218.0, y=0.0}
|
+----->AppCompatImageButton{id=-1, desc=Stop, visibility=VISIBLE, width=219, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@3592391, tag=null, root-is-layout-requested=false, has-input-connection=false, x=437.0, y=0.0}
at dalvik.system.VMStack.getThreadStackTrace(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:1736)
at androidx.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:12)
at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:7)
at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:8)
at androidx.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:11)
at androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:4)
at org.mozilla.reference.browser.helpers.ViewInteractionKt.click(ViewInteraction.kt:11)
at org.mozilla.reference.browser.ui.robots.CustomTabRobot$Transition.clickOpenInBrowserButton(CustomTabRobot.kt:109)
at org.mozilla.reference.browser.ui.CustomTabsTest.customTabOpenInBrowserTest(CustomTabsTest.kt:168)

@AndiAJ
Copy link
Contributor

AndiAJ commented Nov 10, 2022

Flaky 1x on 11/9 Main Firebase link

androidx.test.espresso.AmbiguousViewMatcherException: 'an instance of android.widget.TextView and view.getText() with or without transformation to match: is "Open in Browser"' matches 2 views in the hierarchy:

  • [1] AppCompatTextView{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=35.0, text=Open in Browser, input-type=0, ime-target=false, has-links=false}
  • [2] AppCompatTextView{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=57, has-focus=false, has-focusable=false, has-window-focus=false, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=35.0, text=Open in Browser, input-type=0, ime-target=false, has-links=false}
    Problem views are marked with 'MATCHES' below.

View Hierarchy:
+>PopupDecorView{id=-1, visibility=VISIBLE, width=706, height=721, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(985,1063)(wrapxwrap) gr=TOP START CENTER DISPLAY_CLIP_VERTICAL sim={state=unchanged} ty=APPLICATION_PANEL fmt=TRANSLUCENT wanim=0x7f13013e surfaceInsets=Rect(0, 0 - 0, 0) (manual)
fl=ALT_FOCUSABLE_IM SPLIT_TOUCH HARDWARE_ACCELERATED FLAG_LAYOUT_ATTACHED_IN_DECOR
pfl=WILL_NOT_REPLACE_ON_RELAUNCH LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME
fitTypes=STATUS_BARS NAVIGATION_BARS CAPTION_BAR}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+->MenuView{id=-1, visibility=VISIBLE, width=706, height=721, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+-->CardView{id=2131296666, res-name=mozac_browser_menu_cardView, visibility=VISIBLE, width=706, height=721, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+--->RecyclerView{id=2131296668, res-name=mozac_browser_menu_recyclerView, visibility=VISIBLE, width=656, height=651, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=25.0, y=35.0, child-count=5}
|
+---->LinearLayout{id=-1, visibility=VISIBLE, width=656, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3}
|
+----->AppCompatImageButton{id=-1, desc=Forward, visibility=VISIBLE, width=218, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+----->AppCompatImageButton{id=-1, desc=Refresh, visibility=VISIBLE, width=219, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=218.0, y=0.0}
|
+----->AppCompatImageButton{id=-1, desc=Stop, visibility=VISIBLE, width=219, height=147, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=437.0, y=0.0}
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=656, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=147.0, child-count=1}
|
+----->AppCompatTextView{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=35.0, text=Share, input-type=0, ime-target=false, has-links=false}
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=656, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=273.0, child-count=1}
|
+----->SwitchCompat{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=0.0, text=Request desktop site, input-type=0, ime-target=false, has-links=false, is-checked=false}
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=656, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=399.0, child-count=1}
|
+----->AppCompatTextView{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=35.0, text=Find in Page, input-type=0, ime-target=false, has-links=false}
|
+---->ConstraintLayout{id=-1, visibility=VISIBLE, width=656, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=525.0, child-count=1}
|
+----->AppCompatTextView{id=2131296597, res-name=label, visibility=VISIBLE, width=572, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=35.0, text=Open in Browser, input-type=0, ime-target=false, has-links=false} MATCHES
at androidx.test.espresso.AmbiguousViewMatcherException$Builder.build(AmbiguousViewMatcherException.java:6)
at androidx.test.espresso.base.DefaultFailureHandler.lambda$getAmbiguousViewMatcherExceptionTruncater$1(DefaultFailureHandler.java:5)
at androidx.test.espresso.base.DefaultFailureHandler$$ExternalSyntheticLambda0.truncateExceptionMessage(Unknown Source:2)
at androidx.test.espresso.base.ViewHierarchyExceptionHandler.handleSafely(ViewHierarchyExceptionHandler.java:5)
at androidx.test.espresso.base.ViewHierarchyExceptionHandler.handleSafely(ViewHierarchyExceptionHandler.java:1)
at androidx.test.espresso.base.DefaultFailureHandler$TypedFailureHandler.handle(DefaultFailureHandler.java:4)
at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:5)
at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:8)
at androidx.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:11)
at androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:8)
at org.mozilla.reference.browser.helpers.ViewInteractionKt.click(ViewInteraction.kt:11)
at org.mozilla.reference.browser.ui.robots.CustomTabRobot$Transition.clickOpenInBrowserButton(CustomTabRobot.kt:109)
at org.mozilla.reference.browser.ui.CustomTabsTest.customTabOpenInBrowserTest(CustomTabsTest.kt:168)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eng:intermittent-test Evil test failures that only happen now-and-then and are a productivity killer eng:ui-test UI Tests
Projects
None yet
Development

No branches or pull requests

3 participants