android-components icon indicating copy to clipboard operation
android-components copied to clipboard

Intermittent feature-tabs - mozilla.components.feature.tabs.TabsUseCasesTest - AddNewPrivateTabUseCase will load URL if flag is set to true

Open Archaeopteryx opened this issue 3 years ago • 0 comments

Firebase Test Run:

https://treeherder.mozilla.org/logviewer?job_id=353789672&repo=android-components

Stacktrace:

TEST: AddNewPrivateTabUseCase will load URL if flag is set to true
  D [WebExtensionsMiddleware] No engine session for new active tab (4bc93d8c-083b-46f8-a49b-504211a0dd19)
  Exception in thread "BrowserStore-thread-1 @coroutine#35" java.lang.IllegalStateException: Module with the Main dispatcher had failed to initialize. For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used
  at kotlinx.coroutines.internal.MissingMainCoroutineDispatcher.missing(MainDispatchers.kt:110)
  at kotlinx.coroutines.internal.MissingMainCoroutineDispatcher.isDispatchNeeded(MainDispatchers.kt:91)
  at kotlinx.coroutines.test.internal.TestMainDispatcher.isDispatchNeeded(MainTestDispatcher.kt:39)
  at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:329)
  at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:30)
  at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:25)
  at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:110)
  at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
  at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
  at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
  at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
  at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
  at mozilla.components.browser.state.engine.middleware.EngineDelegateMiddleware.loadUrl(EngineDelegateMiddleware.kt:53)
  at mozilla.components.browser.state.engine.middleware.EngineDelegateMiddleware.invoke(EngineDelegateMiddleware.kt:36)
  at mozilla.components.browser.state.engine.middleware.EngineDelegateMiddleware.invoke(EngineDelegateMiddleware.kt:27)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$threadCheck$1.invoke(ReducerChainBuilder.kt:57)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$threadCheck$1.invoke(ReducerChainBuilder.kt:55)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.lib.state.Store$dispatch$1.invokeSuspend(Store.kt:94)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  at java.base/java.lang.Thread.run(Thread.java:829)
  Caused by: java.lang.RuntimeException: Method getMainLooper in android.os.Looper not mocked. See http://g.co/androidstudio/not-mocked for details.
  at android.os.Looper.getMainLooper(Looper.java)
  at kotlinx.coroutines.android.AndroidDispatcherFactory.createDispatcher(HandlerDispatcher.kt:55)
  at kotlinx.coroutines.android.AndroidDispatcherFactory.createDispatcher(HandlerDispatcher.kt:52)
  at kotlinx.coroutines.internal.MainDispatchersKt.tryCreateDispatcher(MainDispatchers.kt:57)
  at kotlinx.coroutines.test.internal.TestMainDispatcher.getDelegate(MainTestDispatcher.kt:19)
  at kotlinx.coroutines.test.internal.TestMainDispatcher.isDispatchNeeded(MainTestDispatcher.kt:39)
  at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:329)
  at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:30)
  at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:25)
  at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:110)
  at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
  at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
  at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
  at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
  at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
  at mozilla.components.browser.state.engine.middleware.CreateEngineSessionMiddleware.createEngineSession(CreateEngineSessionMiddleware.kt:63)
  at mozilla.components.browser.state.engine.middleware.CreateEngineSessionMiddleware.invoke(CreateEngineSessionMiddleware.kt:40)
  at mozilla.components.browser.state.engine.middleware.CreateEngineSessionMiddleware.invoke(CreateEngineSessionMiddleware.kt:26)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.browser.state.engine.middleware.EngineDelegateMiddleware.invoke(EngineDelegateMiddleware.kt:46)
  ... 13 more
  Exception in thread "BrowserStore-thread-1 @coroutine#31" java.lang.IllegalStateException: Module with the Main dispatcher had failed to initialize. For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used
  at kotlinx.coroutines.internal.MissingMainCoroutineDispatcher.missing(MainDispatchers.kt:110)
  at kotlinx.coroutines.internal.MissingMainCoroutineDispatcher.isDispatchNeeded(MainDispatchers.kt:91)
  at kotlinx.coroutines.test.internal.TestMainDispatcher.isDispatchNeeded(MainTestDispatcher.kt:39)
  at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:329)
  at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:30)
  at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:25)
  at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:110)
  at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
  at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
  at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
  at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
  at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
  at mozilla.components.browser.state.engine.middleware.CreateEngineSessionMiddleware.createEngineSession(CreateEngineSessionMiddleware.kt:63)
  at mozilla.components.browser.state.engine.middleware.CreateEngineSessionMiddleware.invoke(CreateEngineSessionMiddleware.kt:40)
  at mozilla.components.browser.state.engine.middleware.CreateEngineSessionMiddleware.invoke(CreateEngineSessionMiddleware.kt:26)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.browser.state.engine.middleware.EngineDelegateMiddleware.invoke(EngineDelegateMiddleware.kt:46)
  at mozilla.components.browser.state.engine.middleware.EngineDelegateMiddleware.invoke(EngineDelegateMiddleware.kt:27)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$threadCheck$1.invoke(ReducerChainBuilder.kt:57)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$threadCheck$1.invoke(ReducerChainBuilder.kt:55)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.lib.state.internal.ReducerChainBuilder$build$1$1.invoke(ReducerChainBuilder.kt:62)
  at mozilla.components.lib.state.Store$dispatch$1.invokeSuspend(Store.kt:94)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  at java.base/java.lang.Thread.run(Thread.java:829)
  Caused by: java.lang.RuntimeException: Method getMainLooper in android.os.Looper not mocked. See http://g.co/androidstudio/not-mocked for details.
  at android.os.Looper.getMainLooper(Looper.java)
  at kotlinx.coroutines.android.AndroidDispatcherFactory.createDispatcher(HandlerDispatcher.kt:55)
  at kotlinx.coroutines.android.AndroidDispatcherFactory.createDispatcher(HandlerDispatcher.kt:52)
  at kotlinx.coroutines.internal.MainDispatchersKt.tryCreateDispatcher(MainDispatchers.kt:57)
  at kotlinx.coroutines.test.internal.TestMainDispatcher.getDelegate(MainTestDispatcher.kt:19)
  ... 29 more
FAILURE

Build:

https://github.com/mozilla-mobile/android-components/commit/f0b9d7facc2bf570ce46f2154738506cf939532b

┆Issue is synchronized with this Jira Task

Archaeopteryx avatar Oct 06 '21 08:10 Archaeopteryx