Baseline Profiles error with com.google.apps.tiktok.tracing

380 Views Asked by At

I'm trying to run a BaselineProfileGenerator but I'm getting some errors when I try on two devices (pixel2XL and Pixel 5) both using Android 11.

The macrobenchmark lib version is 1.2.0-alpha09.

The output running the test using Gradle is the next:

./gradlew :libraries:macrobenchmark:connectedGoogleBenchmarkAndroidTest -P android.testInstrumentationRunnerArguments.class=com.me.macrobenchmark.baselineprofile.BaselineProfileGenerator
com.google.testing.platform.api.plugin.PluginException: Exception thrown during onBeforeAll invocation of plugin com.google.testing.platform.plugin.android.AndroidDevicePlugin.
        at com.google.testing.platform.plugin.PluginLifecycleKt.invokeOrThrow(PluginLifecycle.kt:216)
        at com.google.testing.platform.plugin.PluginLifecycleKt.invokeOrThrow$default(PluginLifecycle.kt:205)
        at com.google.testing.platform.plugin.PluginLifecycle$onBeforeAll$1.invoke(PluginLifecycle.kt:92)
        at com.google.testing.platform.plugin.PluginLifecycle$onBeforeAll$1.invoke(PluginLifecycle.kt:88)
        at com.google.testing.platform.core.telemetry.common.noop.NoopDiagnosticsScope.recordEvent(NoopDiagnosticsScope.kt:35)
        at com.google.testing.platform.core.telemetry.TelemetryKt.recordEvent(Telemetry.kt:105)
        at com.google.testing.platform.core.telemetry.TelemetryKt.recordEvent$default(Telemetry.kt:98)
        at com.google.testing.platform.plugin.PluginLifecycle.onBeforeAll(PluginLifecycle.kt:88)
        at com.google.testing.platform.executor.SingleDeviceExecutor$execute$4.invoke(SingleDeviceExecutor.kt:86)
        at com.google.testing.platform.executor.SingleDeviceExecutor$execute$4.invoke(SingleDeviceExecutor.kt:86)
        at com.google.testing.platform.executor.SingleDeviceExecutor.runUnlessCancelled(SingleDeviceExecutor.kt:105)
        at com.google.testing.platform.executor.SingleDeviceExecutor.execute(SingleDeviceExecutor.kt:86)
        at com.google.testing.platform.RunnerImpl.run(RunnerImpl.kt:108)
        at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy$run$4.invoke(NonInteractiveServerStrategy.kt:80)
        at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy$run$4.invoke(NonInteractiveServerStrategy.kt:79)
        at com.google.testing.platform.core.telemetry.common.noop.NoopDiagnosticsScope.recordEvent(NoopDiagnosticsScope.kt:35)
        at com.google.testing.platform.core.telemetry.TelemetryKt.recordEvent(Telemetry.kt:66)
        at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy.run(NonInteractiveServerStrategy.kt:79)
        at com.google.testing.platform.main.MainKt$main$4.invokeSuspend(Main.kt:67)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
        at com.google.testing.platform.main.MainKt.main(Main.kt:66)
        at com.google.testing.platform.main.MainKt.main$default(Main.kt:34)
        at com.google.testing.platform.main.MainKt.main(Main.kt)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at com.google.testing.platform.launcher.Launcher.main(Launcher.java:149)
Caused by: com.google.testing.platform.core.error.UtpException: ErrorName: UNKNOWN
NameSpace: DdmlibAndroidDeviceController
ErrorCode: 1

I'm also trying to run the test by using the adb shell am instrument command:

adb shell am instrument -w -e class com.me.macrobenchmark.baselineprofile.BaselineProfileGenerator#startup com.me.macrobenchmark/androidx.test.runner.AndroidJUnitRunner

But this error is thrown:

02-15 12:56:03.774 I/ActivityManager( 1518): Start proc 23855:com.me.macrobenchmark/u0a9964 for added application com.me.macrobenchmark
02-15 12:56:03.784 I/.macrobenchmar(23855): Late-enabling -Xcheck:jni
02-15 12:56:03.816 I/.macrobenchmar(23855): Unquickening 12 vdex files!
02-15 12:56:03.816 D/ConnectivityService( 1518): NetReassign [no changes]
02-15 12:56:03.825 I/adbd    ( 1153): jdwp connection from 23855
02-15 12:56:03.872 D/ApplicationLoaders(23855): Returning zygote-cached class loader: /system/framework/android.test.base.jar
02-15 12:56:03.873 D/ApplicationLoaders(23855): Returning zygote-cached class loader: /system/framework/android.test.base.jar
02-15 12:56:03.876 I/.macrobenchmar(23855): The ClassLoaderContext is a special shared library.
02-15 12:56:03.879 D/ApplicationLoaders(23855): Returning zygote-cached class loader: /system/framework/android.test.base.jar
02-15 12:56:03.879 D/ApplicationLoaders(23855): Returning zygote-cached class loader: /system/framework/android.test.base.jar
02-15 12:56:03.881 I/.macrobenchmar(23855): The ClassLoaderContext is a special shared library.
02-15 12:56:03.952 D/NetworkSecurityConfig(23855): No Network Security Config specified, using platform default
02-15 12:56:03.954 D/NetworkSecurityConfig(23855): No Network Security Config specified, using platform default
02-15 12:56:03.954 I/MonitoringInstr(23855): newApplication called!
02-15 12:56:03.958 I/MonitoringInstr(23855): Instrumentation started!
02-15 12:56:03.965 V/TestEventClient(23855): No service name argument was given (testDiscoveryService, testRunEventService or orchestratorService)
02-15 12:56:03.967 I/MonitoringInstr(23855): No JSBridge.
02-15 12:56:03.978 D/InfraTrack(23855): Tracking disabled due to lack of internet permissions
02-15 12:56:03.978 I/UsageTrackerFacilitator(23855): Usage tracking disabled
02-15 12:56:04.044 D/TestExecutor(23855): Adding listener androidx.test.internal.runner.listener.LogRunListener
02-15 12:56:04.044 D/TestExecutor(23855): Adding listener androidx.test.internal.runner.listener.InstrumentationResultPrinter
02-15 12:56:04.044 D/TestExecutor(23855): Adding listener androidx.test.internal.runner.listener.ActivityFinisherRunListener
02-15 12:56:04.048 I/TestRunner(23855): run started: 12 tests
02-15 12:56:04.051 I/TestRunner(23855): started: startupNoCompilation[mode=COLD](com.me.macrobenchmark.startup.home.HomeFeedStartupBenchmark)
02-15 12:56:04.073 I/GrantPermissionCallable(23855): Permission: android.permission.READ_EXTERNAL_STORAGE is already granted!
02-15 12:56:04.073 I/GrantPermissionCallable(23855): Permission: android.permission.WRITE_EXTERNAL_STORAGE is already granted!
02-15 12:56:04.079 W/WindowManager( 1518): Cannot find window which accessibility connection is added to
02-15 12:56:04.081 I/A11yListener( 3247): (REDACTED) #onAccessibilityStateChanged enabled: %s
02-15 12:56:04.081 I/A11yListener( 3247): #onChange
02-15 12:56:04.081 E/TraceManager( 3247): Duplicate trace
02-15 12:56:04.081 E/TraceManager( 3247): com.google.apps.tiktok.tracing.w: Starting new trace A11yEventListener_onChange when already associated with a trace: . For more help, see http://go/tiktok-tracing#fixing-duplicate-trace-issues
02-15 12:56:04.081 E/TraceManager( 3247):   at com.google.apps.tiktok.tracing.el.f(PG:6)
02-15 12:56:04.081 E/TraceManager( 3247):   at com.google.apps.tiktok.tracing.el.g(PG:2)
02-15 12:56:04.081 E/TraceManager( 3247):   at com.google.apps.tiktok.tracing.dv.d(PG:1)
02-15 12:56:04.081 E/TraceManager( 3247):   at com.google.android.libraries.search.assistant.a.g.a(PG:7)
02-15 12:56:04.081 E/TraceManager( 3247):   at com.google.android.libraries.search.assistant.a.b.b(PG:2)
02-15 12:56:04.081 E/TraceManager( 3247):   at i.c.b.a.a.h(PG:4)
02-15 12:56:04.081 E/TraceManager( 3247):   at kotlinx.coroutines.bk.run(PG:14)
02-15 12:56:04.081 E/TraceManager( 3247):   at com.google.apps.tiktok.coroutines.g.run(PG:1)
02-15 12:56:04.081 E/TraceManager( 3247):   at com.google.android.libraries.i.z.run(PG:1)
02-15 12:56:04.081 E/TraceManager( 3247):   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
02-15 12:56:04.081 E/TraceManager( 3247):   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
02-15 12:56:04.081 E/TraceManager( 3247):   at com.google.android.libraries.i.h.run(PG:2)
02-15 12:56:04.081 E/TraceManager( 3247):   at java.lang.Thread.run(Thread.java:923)
02-15 12:56:04.081 E/TraceManager( 3247):   at com.google.android.libraries.i.ai.run(PG:5)
02-15 12:56:04.081 E/TraceManager( 3247):   Suppressed: com.google.apps.tiktok.tracing.fv: 
02-15 12:56:04.081 E/TraceManager( 3247):       at tk_trace.(Unknown Source:0)
02-15 12:56:04.081 E/TraceManager( 3247):       at tk_trace.Missing root trace(Unknown Source:0)
02-15 12:56:04.081 E/TraceManager( 3247): Caused by: com.google.apps.tiktok.tracing.aa
0

There are 0 best solutions below