Flank: Kotlin | Bug when running "IosCatalogTest"

Created on 25 May 2018  路  5Comments  路  Source: Flank/flank

The tests may fail on some systems with the following exception.
ServiceOptions.getDefaultProjectId() is set to delta-essence-114723, but when running the tests the project id does not match.

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
  "code" : 403,
  "errors" : [ {
    "domain" : "usageLimits",
    "message" : "Cloud Testing API has not been used in project 764086051850 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/testing.googleapis.com/overview?project=764086051850 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
    "reason" : "accessNotConfigured",
    "extendedHelp" : "https://console.developers.google.com"
  } ],
  "message" : "Cloud Testing API has not been used in project 764086051850 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/testing.googleapis.com/overview?project=764086051850 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
  "status" : "PERMISSION_DENIED"
}

    at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:146)
    at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
    at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321)
    at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1065)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
    at ftl.ios.IosCatalog$iosDeviceCatalog$2.invoke(IosCatalog.kt:11)
    at ftl.ios.IosCatalog$iosDeviceCatalog$2.invoke(IosCatalog.kt:10)
    at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:131)
    at ftl.ios.IosCatalog.getIosDeviceCatalog(IosCatalog.kt)
    at ftl.ios.IosCatalog.access$getIosDeviceCatalog$p(IosCatalog.kt:10)
    at ftl.ios.IosCatalog$iosModelIds$2.invoke(IosCatalog.kt:12)
    at ftl.ios.IosCatalog$iosModelIds$2.invoke(IosCatalog.kt:10)
    at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:131)
    at ftl.ios.IosCatalog.getIosModelIds(IosCatalog.kt)
    at ftl.ios.IosCatalog.model(IosCatalog.kt:17)
    at ftl.ios.IosCatalogTest.validatesModelAndVersion(IosCatalogTest.kt:20)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Bug iOS

All 5 comments

Same thing happened to me and I get the same project 764086051850.
Try running from gcloud with gcloud alpha firebase test ios run --test your.zip

I still get an error, so I think it might be a firebase permission issue.

I am also seeing this same error with project "764086051850". gcloud alpha firebase test ios run --test your.zip passed though

@rolyatwilson do you have a service account set up for gclould? I fixed this issue (I think the same) by using a service api key instead of just web login.

service account works, user accounts will be supported once https://github.com/TestArmada/flank/pull/209 is merged.

I added a flank doctor command to easily test if the authorization is setup properly.

Was this page helpful?
0 / 5 - 0 ratings