Status Update
Comments
se...@google.com <se...@google.com> #2
Are you running it as an instrumented AndroidTest? If not can you give that a try?
[Deleted User] <[Deleted User]> #3
[Deleted User] <[Deleted User]> #4
Getting the same issue in our JVM tests. The test is for a data mapper where input data is provided using PagingData.from(...)
and the output is checked using asSnapshot()
.
This test works fine as a JVM test on 3.2
.
Stacktrace:
java.lang.UnsatisfiedLinkError: 'boolean android.util.Log.isLoggable(java.lang.String, int)'
at android.util.Log.isLoggable(Native Method)
at androidx.paging.PagingLogger.isLoggable(PagingLogger.android.kt:29)
at androidx.paging.PagingDataPresenter$collectFrom$2$1.emit(PagingDataPresenter.kt:521)
at androidx.paging.PagingDataPresenter$collectFrom$2$1.emit(PagingDataPresenter.kt:118)
at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:11)
at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:11)
at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:113)
at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:82)
at androidx.paging.CachedPageEventFlow$downstreamFlow$1$2.emit(CachedPageEventFlow.kt:105)
at androidx.paging.CachedPageEventFlow$downstreamFlow$1$2.emit(CachedPageEventFlow.kt:102)
at kotlinx.coroutines.flow.FlowKt__LimitKt$takeWhile$lambda$6$$inlined$collectWhile$1.emit(Limit.kt:140)
at kotlinx.coroutines.flow.SubscribedFlowCollector.emit(Share.kt)
at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:392)
at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(SharedFlow.kt)
at _COROUTINE._BOUNDARY._(CoroutineDebugging.kt:42)
at androidx.paging.SingleRunner.runInIsolation(SingleRunner.kt:49)
at androidx.paging.testing.PagerFlowSnapshotKt$asSnapshot$4$collectPagingData$1$1.invokeSuspend(PagerFlowSnapshot.kt:119)
at kotlinx.coroutines.flow.FlowKt__MergeKt$mapLatest$1.invokeSuspend(Merge.kt:213)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invokeSuspend(Merge.kt:30)
at kotlinx.coroutines.flow.internal.ChannelFlow$collectToFun$1.invokeSuspend(ChannelFlow.kt:56)
at androidx.paging.testing.PagerFlowSnapshotKt$asSnapshot$4$collectPagingData$1.invokeSuspend(PagerFlowSnapshot.kt:117)
at com.theguardian.myguardian.followed.feed.list.ListContentUiStateTest$when data is emitted from source then it is mapped to blueprint rows$1.invokeSuspend(ListContentUiStateTest.kt:73)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$1.invokeSuspend(TestBuilders.kt:316)
Caused by: java.lang.UnsatisfiedLinkError: 'boolean android.util.Log.isLoggable(java.lang.String, int)'
at android.util.Log.isLoggable(Native Method)
at androidx.paging.PagingLogger.isLoggable(PagingLogger.android.kt:29)
at androidx.paging.PagingDataPresenter$collectFrom$2$1.emit(PagingDataPresenter.kt:521)
at androidx.paging.PagingDataPresenter$collectFrom$2$1.emit(PagingDataPresenter.kt:118)
at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:11)
at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:11)
at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:113)
at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:82)
at androidx.paging.CachedPageEventFlow$downstreamFlow$1$2.emit(CachedPageEventFlow.kt:105)
at androidx.paging.CachedPageEventFlow$downstreamFlow$1$2.emit(CachedPageEventFlow.kt:102)
at kotlinx.coroutines.flow.FlowKt__LimitKt$takeWhile$lambda$6$$inlined$collectWhile$1.emit(Limit.kt:140)
at kotlinx.coroutines.flow.SubscribedFlowCollector.emit(Share.kt)
at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:392)
at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(SharedFlow.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.test.TestDispatcher.processEvent$kotlinx_coroutines_test(TestDispatcher.kt:24)
at kotlinx.coroutines.test.TestCoroutineScheduler.tryRunNextTaskUnless$kotlinx_coroutines_test(TestCoroutineScheduler.kt:99)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$workRunner$1.invokeSuspend(TestBuilders.kt:322)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at kotlinx.coroutines.test.TestBuildersJvmKt.createTestResult(TestBuildersJvm.kt:10)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0(TestBuilders.kt:310)
at kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0(Unknown Source)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0(TestBuilders.kt:168)
at kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0(Unknown Source)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0$default(TestBuilders.kt:160)
at kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0$default(Unknown Source)
at com.theguardian.myguardian.followed.feed.list.ListContentUiStateTest.when data is emitted from source then it is mapped to blueprint rows(ListContentUiStateTest.kt:44)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
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 org.mockito.internal.runners.DefaultInternalRunner$1$1.evaluate(DefaultInternalRunner.java:55)
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.mockito.internal.runners.DefaultInternalRunner$1.run(DefaultInternalRunner.java:100)
at org.mockito.internal.runners.DefaultInternalRunner.run(DefaultInternalRunner.java:107)
at org.mockito.internal.runners.StrictRunner.run(StrictRunner.java:42)
at org.mockito.junit.MockitoJUnitRunner.run(MockitoJUnitRunner.java:163)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:112)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:40)
at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:60)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:52)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
at jdk.proxy1/jdk.proxy1.$Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:176)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
se...@google.com <se...@google.com> #5
It seems the problem here is using paging-runtime 3.2.x
along with paging-common 3.3.0
.
You likely see this error here because paging-common 3.3.0
(along with paging-compose / paging-testing) was commonized into kmp structure.
In the stacktrace you'll notice the file name PagingLogger.android.kt:29
has an android.kt
suffix, meaning it was intended only for android platform (androidTests
).
Re:androidTest
and see if it passes, or upload a sample app?
We should probably add a constraint to ensure paging-common 3.3.0
is used with paging-runtime 3.3.0
[Deleted User] <[Deleted User]> #6
Hey!
You were right, there were different minor versions - paging-runtime 3.2.1
and paging-compose 3.3.0
. However, updating both to 3.3.0
didn't fix the test issue either.
The tests do pass when running in an androidTest
.
Does this mean that all paging related tests now need to run as androidTest
s instead of jvm test
s? That'd be a bummer with the cost and time of instrumented tests :(
Description
1 Speaker diarization results from GCP for videos with multiple speakers (any number between 2 and 15) always says only 2 or 3 speakers.
2 Though the number of speakers predicted are only 2, we get speaker tag output from GCP as 1 and 3 (instead of expected tags 1 and 2).
Steps to Reproduce:
1 Take any video (preferably a zoom recording) with multiple speakers (preferably between 4 and 10) and convert it into wav file using FFMPEG library with the below mentioned attributes:
16K sample rate
pcms16le audio codec
output audio channels = 1 and vn for output
map metadata -1
2 Then that wav file is input to longrunningrecognize of GCP's speech to text v1p1beta1 library along with config's mentioned below:
enableSpeakerDiarization: true,
originalMediaType: google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType.VIDEO,
interactionType:
google.cloud.speech.v1.RecognitionMetadata.InteractionType
.PHONE_CALL,
const encoding = google.cloud.speech.v1.RecognitionConfig.AudioEncoding.LINEAR16;
const languageCode = 'en-US';
const sampleRateHertz = 16000;
enableWordTimeOffsets: true,
enableAutomaticPunctuation: true,
maxAlternatives: 1,
profanityFilter: true,
model: 'video',
3 Expected Behaviour:
1 Speaker diarization is expected to accurately identify the number of speakers and corresponding utterances, not say 2 or 3 speakers for any number of speakers.
2 Speaker tags are supposed to be continous numbers starting from 1 to N-1, where N=predicted number of speakers. Not say number of speakers=2 and then give speaker tags as 1 and 3.