Authentication for service account with firebase test lab.

1,039 views
Skip to first unread message

Simon Matthews

unread,
Apr 26, 2017, 12:31:31 AM4/26/17
to Google Cloud Developers

I am trying to use the Firebase test lab with an android app where the build runs using gradle in a CI environment (gitlab.com).

Running directly from the command line on my local desktop, it works fine. The command
gcloud firebase test android run --app app/build/outputs/apk/app-pro-debug.apk --test  app/build/outputs/apk/app-pro-debug-androidTest.apk
 .... results in tests being submitted to the firebase test lab.

However, when trying to get this working in a CI environment, there is a problem with authentication:

ERROR: (gcloud.firebase.test.android.run) Unable to access the test environment catalog: ResponseError 403: Request had insufficient authentication scopes.
 
The VM on which the build runs has its own authentication (it is a VM that is in the same account as the gcoud account used for firebase)
$ gcloud auth list
Credentialed Accounts:
- XXXXXXXXXXX...@developer.gserviceaccount.com ACTIVE
To set the active account, run:
$ gcloud config set account `ACCOUNT`

where I have replaced the actual account with "
XXXXXXXXXXXXXXX"

How do I get the firebase test lab to recognize the VM's credentials as valid for Firebase test?

Jordan (Cloud Platform Support)

unread,
Apr 26, 2017, 4:17:15 PM4/26/17
to Google Cloud Developers
It looks as though your VM was configured with the incorrect Access Scopes to run the Firebase command. Since you look to be using the default service account, it is being limited by the scopes configured in your VM.

You can either create and use a new Service Account that has proper permissions to run the Firebase APIs, or change the scopes of your VM to add any missing Firebase scopes

Note that Google Groups is meant for general product discussions and not for technical support. If you require further Firebase technical support it is recommended you open a support ticket directly with the Firebase team. 
Reply all
Reply to author
Forward
0 new messages