Reputation: 515
The problem is I can not authorise in Firebase (App Distribution could not generate credentials from the refresh token specified). I got an error:
App Distribution could not generate credentials from the refresh token specified.
Refresh token used: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXfE-VQ" (redacted)
Authorization failed. Server message:
{
"error": "invalid_grant",
"error_description": "Bad Request"
}
Response status: 400
+------+------------------------------------+-------------+
| fastlane summary |
+------+------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | :app:assembleSkRelease | 5 |
| 3 | Switch to android defineGroup lane | 0 |
| 4 | Switch to android distributeFB | 0 |
| | lane | |
| š„ | firebase_app_distribution | 0 |
+------+------------------------------------+-------------+
I tried to generate new refresh token via firebase plugin: bundle exec fastlane run firebase_app_distribution_login
several times, but there is no effect. I checked that I correctly setup new $FIREBASE_TOKEN
in my environment.
Plugin info:
+-------------------------------------+---------+-------------------------------------+
| Used plugins |
+-------------------------------------+---------+-------------------------------------+
| Plugin | Version | Action |
+-------------------------------------+---------+-------------------------------------+
| fastlane-plugin-firebase_app_distr | 0.3.3 | firebase_app_distribution, |
| ibution | | firebase_app_distribution_add_test |
| | | ers, |
| | | firebase_app_distribution_get_late |
| | | st_release, |
| | | firebase_app_distribution_get_udid |
| | | s, |
| | | firebase_app_distribution_login, |
| | | firebase_app_distribution_remove_t |
| | | esters |
+-------------------------------------+---------+-------------------------------------+
How can I fix it?
Upvotes: 1
Views: 4751
Reputation: 61
I came across the same problem and solved the following steps.
This problem comes from your FIREBASE_CLI_TOKEN is expired.
$ firebase login:ci
Waiting for authentication...
ā Success! Use this token to login on a CI server:
{TOKEN can be shown here}
Example: firebase deploy --token "$FIREBASE_TOKEN"
Following the above steps, and I could build and deploy.
Upvotes: 0
Reputation: 110
Check that the value you're setting to $FIREBASE_TOKEN is the one that's printed in the terminal after you enter the code from the website, not this last one.
Upvotes: 3