reference-browser icon indicating copy to clipboard operation
reference-browser copied to clipboard

Intermittent UI test failure - <CustomTabsTest.customTabOpenInBrowserTest>

Open AndiAJ opened this issue 3 years ago • 4 comments

Firebase Test Run: Firebase link

Stacktrace:

androidx.test.espresso.AmbiguousViewMatcherException: 'with text: 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=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@a3bd4c5, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} | +-->CardView{id=2131296584, 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@babce1a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} | +--->RecyclerView{id=2131296586, 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@7c34328, tag=null, root-is-layout-requested=false, has-input-connection=false, x=26.0, y=37.0, child-count=9} | +---->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@b9d69d4, 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@63cd77d, 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@93e0672, 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@38baac3, 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@2446e79, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=154.0, child-count=1} | +----->AppCompatTextView{id=2131296540, 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@b6217be, 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@39c1f6c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=286.0, child-count=1} | +----->SwitchCompat{id=2131296540, 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@4947935, 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@335af3b, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=418.0, child-count=1} | +----->AppCompatTextView{id=2131296540, 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@be1c658, 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@9a073b1, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=550.0, child-count=1} | +----->AppCompatTextView{id=2131296540, 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@8776096, 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} MATCHES | +---->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@4460417, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=550.0, child-count=1} | +----->AppCompatTextView{id=2131296540, 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@7d8f004, 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} MATCHES | +---->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@79799ed, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=286.0, child-count=1} | +----->SwitchCompat{id=2131296540, 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@6c0f022, 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@59ccab3, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=154.0, child-count=1} | +----->AppCompatTextView{id=2131296540, 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@2f70870, 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} | +---->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@e60e7e9, 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@d21ec6e, 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@88f5f0f, 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@89c3b9c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=459.0, y=0.0} | 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.desugaredPerform(ViewInteraction.java:173) at androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:114) at org.mozilla.reference.browser.helpers.ViewInteractionKt.click(ViewInteraction.kt:11) at org.mozilla.reference.browser.ui.robots.CustomTabRobot$Transition.clickOpenInBrowserButton(CustomTabRobot.kt:103) 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: 8/22 Master

AndiAJ avatar Aug 23 '21 08:08 AndiAJ

Test crashed once, on 8/24: Firebase link

java.lang.IllegalStateException: SET SESSION: Current activity: BrowserActivity hashcode 98552165 Other activity: ExternalAppBrowserActivity hashcode 224747276 FATAL EXCEPTION: main Process: org.mozilla.reference.browser.debug, PID: 10012 java.lang.IllegalStateException: SET SESSION: Current activity: BrowserActivity hashcode 98552165 Other activity: ExternalAppBrowserActivity hashcode 224747276 at mozilla.components.browser.engine.gecko.GeckoEngineView.render(GeckoEngineView.kt:129) at mozilla.components.feature.session.engine.EngineViewPresenter.renderTab(EngineViewPresenter.kt:85) at mozilla.components.feature.session.engine.EngineViewPresenter.onTabToRender(EngineViewPresenter.kt:61) at mozilla.components.feature.session.engine.EngineViewPresenter.access$onTabToRender(EngineViewPresenter.kt:23) at mozilla.components.feature.session.engine.EngineViewPresenter$start$1$invokeSuspend$$inlined$collect$1.emit(Collect.kt:135) at mozilla.components.support.ktx.kotlinx.coroutines.flow.FlowKt$ifAnyChanged$$inlined$filter$1$2.emit(Collect.kt:143) at mozilla.components.feature.session.engine.EngineViewPresenter$start$1$invokeSuspend$$inlined$map$1$2.emit(Collect.kt:137) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:62) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl(Channels.kt:1) at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Unknown Source:14) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at androidx.test.espresso.base.Interrogator.loopAndInterrogate(Interrogator.java:148) at androidx.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:519) at androidx.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:478) at androidx.test.espresso.base.UiControllerImpl.injectMotionEvent(UiControllerImpl.java:235) at androidx.test.espresso.action.MotionEvents.sendUp(MotionEvents.java:160) at androidx.test.espresso.action.MotionEvents.sendUp(MotionEvents.java:137) at androidx.test.espresso.action.Tap.sendSingleTap(Tap.java:170) at androidx.test.espresso.action.Tap.access$100(Tap.java:31) at androidx.test.espresso.action.Tap$1.sendTap(Tap.java:47) at androidx.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:136) at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:356) at androidx.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:248) at androidx.test.espresso.ViewInteraction.access$100(ViewInteraction.java:63) at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:153) at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:150) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.IllegalStateException: Display already acquired at org.mozilla.geckoview.GeckoSession.acquireDisplay(GeckoSession.java:2348) at org.mozilla.geckoview.GeckoView.setSession(GeckoView.java:460) at mozilla.components.browser.engine.gecko.GeckoEngineView.render(GeckoEngineView.kt:116) ... 36 more

sv-ohorvath avatar Aug 25 '21 14:08 sv-ohorvath

Let's track the crash in #1675

AndiAJ avatar Aug 26 '21 11:08 AndiAJ

Same issue I think? Crash https://bugzilla.mozilla.org/show_bug.cgi?id=1732075

AaronMT avatar Sep 22 '21 18:09 AaronMT

Crashed again 1x on 11/17: logs

sv-ohorvath avatar Nov 17 '21 13:11 sv-ohorvath

Closing, as it didn't fail recently.

AndiAJ avatar Nov 09 '22 13:11 AndiAJ