You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a GitLab pipeline with Android Instrumentation tests run by Flank.
Starting from Flank version 21.07.0 I have this error in my GitLab pipeline:
400 Bad Request
POST https://testing.googleapis.com/v1/applicationDetailService/getApkDetails
{
"code": 400,
"errors": [
{
"domain": "global",
"message": "Request contains an invalid argument.",
"reason": "badRequest"
}
],
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
Full stack trace:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
POST https://testing.googleapis.com/v1/applicationDetailService/getApkDetails
{
"code": 400,
"errors": [
{
"domain": "global",
"message": "Request contains an invalid argument.",
"reason": "badRequest"
}
],
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:146)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:118)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:37)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:428)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1111)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:514)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:455)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:565)
at ftl.client.google.AppDetailsKt.getAndroidAppDetails(AppDetails.kt:7)
at ftl.run.platform.RunAndroidTestsKt.reportPackageName(RunAndroidTests.kt:101)
at ftl.run.platform.RunAndroidTestsKt.access$reportPackageName(RunAndroidTests.kt:1)
at ftl.run.platform.RunAndroidTestsKt$runAndroidTests$2.invokeSuspend(RunAndroidTests.kt:54)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
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 ftl.domain.RunTestAndroidKt.invoke(RunTestAndroid.kt:66)
at ftl.presentation.cli.firebase.test.android.AndroidRunCommand.run(AndroidRunCommand.kt:54)
at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at ftl.Main$main$1.invoke(Main.kt:12)
at ftl.Main$main$1.invoke(Main.kt:10)
at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:28)
at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:17)
at ftl.Main.main(Main.kt:10)
After investigation I found out that getApkDetails expects gcsPath to .apk file to be sent, but Flank is supporting .aab as well and I'm using it.
There is a link to getApkDetails documentation - getApkDetails
And there is a link to FileReference object documentation - FileReference. In example we can see .apk file.
To Reproduce
Preconditions:
Flank version 21.07.0 or higher
app attribute in flank.yml contains path to .aab file
APP_AAB contains local path to .aab ANDROID_TEST_APK contains local path to Android Test .apk
Run java -jar ./flank.jar firebase test android run
See error
Test Matrix is not created, tests are not running
Expected behavior
Error is not appearing
Test Matrix is created, tests are running
Details
It wasn't checked on the latest snapshot, but due to changes between it and version 21.11.0, I believe that the issue will be reproducible there.
Issue is reproducible on versions:
21.07.0
21.07.1
21.08.1
21.11.0
Issue is not reproducible on versions:
21.05.0
21.06.1
Other versions weren't tested.
If I replace my .aab file by .apk file in the flank.yml - issue disappears, so looks like it is a root cause.
The text was updated successfully, but these errors were encountered:
Describe the bug
I have a GitLab pipeline with Android Instrumentation tests run by Flank.
Starting from Flank version 21.07.0 I have this error in my GitLab pipeline:
Full stack trace:
After investigation I found out that
getApkDetails
expectsgcsPath
to.apk
file to be sent, but Flank is supporting.aab
as well and I'm using it.There is a link to
getApkDetails
documentation - getApkDetailsAnd there is a link to
FileReference
object documentation - FileReference. In example we can see.apk
file.To Reproduce
Preconditions:
app
attribute inflank.yml
contains path to.aab
fileflank.yml example
APP_AAB
contains local path to.aab
ANDROID_TEST_APK
contains local path to Android Test.apk
java -jar ./flank.jar firebase test android run
Expected behavior
Error is not appearing
Test Matrix is created, tests are running
Details
It wasn't checked on the latest snapshot, but due to changes between it and version 21.11.0, I believe that the issue will be reproducible there.
Issue is reproducible on versions:
Issue is not reproducible on versions:
Other versions weren't tested.
If I replace my
.aab
file by.apk
file in theflank.yml
- issue disappears, so looks like it is a root cause.The text was updated successfully, but these errors were encountered: